fixed bug #7323 - correções relatório de gratuidade

git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@57383 d1611594-4594-4d17-8e1d-87c2c4800839
master
frederico 2016-06-28 14:35:26 +00:00
parent 044088e060
commit d58760b433
6 changed files with 80 additions and 51 deletions

View File

@ -89,6 +89,7 @@ public class RelatorioGratuidade extends Relatorio {
gratuidadeBean.setPreciooriginal(rset.getBigDecimal("preciooriginal"));
gratuidadeBean.setPreciopagado(rset.getBigDecimal("preciopagado"));
gratuidadeBean.setNombempresa(rset.getString("nombempresa"));
gratuidadeBean.setCvecategoria(rset.getString("cvecategoria"));
lsDadosRelatorio.add(gratuidadeBean);
}
@ -113,7 +114,7 @@ public class RelatorioGratuidade extends Relatorio {
sql.append("SELECT b.feccorrida, ori.cveparada origen, des.cveparada destino, ");
sql.append("b.numkmviaje, r.descruta, b.corrida_id, b.fechorviaje, ");
sql.append("tv.desctipoventa, b.nombpasajero, b.descnumdoc, tar.preciooriginal, ");
sql.append("b.porccategoria, b.preciopagado, u.cveusuario, ag.nombpuntoventa, e.nombempresa ");
sql.append("b.porccategoria, b.preciopagado, u.cveusuario, ag.nombpuntoventa, e.nombempresa, cat.cvecategoria ");
sql.append("FROM boleto b ");
sql.append("JOIN categoria c ON b.categoria_id = c.categoria_id ");
sql.append("JOIN parada ori ON ori.parada_id = b.origen_id ");
@ -130,6 +131,7 @@ public class RelatorioGratuidade extends Relatorio {
sql.append(" AND tar.origen_id = b.origen_id ");
sql.append(" AND tar.destino_id = b.destino_id) ");
sql.append("JOIN empresa e ON e.empresa_id = b.empresacorrida_id ");
sql.append("JOIN categoria cat ON cat.categoria_id = b.categoria_id ");
sql.append("WHERE ");
sql.append(" b.feccorrida BETWEEN :fecInicio AND :fecFinal ");
sql.append("AND b.motivocancelacion_id IS NULL ");

View File

@ -21,7 +21,8 @@ detail.km=Km
detail.linha=Linha
detail.servicio=Serviço
detail.hora=Hora
detail.tipobilhete=Tipo Bilhete
detail.tipobilhete=Tipo Venda
detail.tipopassagem=Tipo Passagem
detail.pasajero=Passageiro
detail.documento=Doc
detail.precio=Preço

View File

@ -21,7 +21,8 @@ detail.km=Km
detail.linha=Linha
detail.servicio=Serviço
detail.hora=Hora
detail.tipobilhete=Tipo Bilhete
detail.tipobilhete=Tipo Venda
detail.tipopassagem=Tipo Passagem
detail.pasajero=Passageiro
detail.documento=Doc
detail.precio=Preço

View File

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="RelatorioEmpresaCorrida" pageWidth="842" pageHeight="595" orientation="Landscape" whenNoDataType="NoDataSection" columnWidth="822" leftMargin="10" rightMargin="10" topMargin="20" bottomMargin="20" resourceBundle="RelatorioEmpresaCorrida" whenResourceMissingType="Empty" uuid="94834362-0ecc-46da-b0a2-5cdee355da3e">
<property name="ireport.zoom" value="1.650000000000001"/>
<property name="ireport.x" value="368"/>
<property name="ireport.y" value="14"/>
<property name="ireport.zoom" value="2.196150000000002"/>
<property name="ireport.x" value="0"/>
<property name="ireport.y" value="0"/>
<parameter name="fecInicio" class="java.lang.String">
<defaultValueExpression><![CDATA[]]></defaultValueExpression>
</parameter>
@ -31,6 +31,7 @@
<field name="cveusuario" class="java.lang.String"/>
<field name="nombpuntoventa" class="java.lang.String"/>
<field name="nombempresa" class="java.lang.String"/>
<field name="cvecategoria" class="java.lang.String"/>
<variable name="qtde" class="java.lang.Integer" calculation="Count">
<variableExpression><![CDATA[$F{km}]]></variableExpression>
</variable>
@ -43,9 +44,9 @@
<group name="empresa">
<groupExpression><![CDATA[$F{nombempresa}]]></groupExpression>
<groupHeader>
<band height="67">
<band height="68">
<textField pattern="dd/MM/yyyy" isBlankWhenNull="true">
<reportElement uuid="d15af518-c902-4903-bf8a-d4cf3ff6c05e" x="50" y="10" width="144" height="16"/>
<reportElement uuid="d15af518-c902-4903-bf8a-d4cf3ff6c05e" x="121" y="10" width="144" height="16"/>
<textElement textAlignment="Left">
<font size="10"/>
</textElement>
@ -72,68 +73,77 @@
<textFieldExpression><![CDATA[$R{detail.km}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="67851ba5-cc9c-4f37-8857-9e3c5be9b362" x="164" y="51" width="142" height="16"/>
<reportElement uuid="67851ba5-cc9c-4f37-8857-9e3c5be9b362" x="164" y="51" width="114" height="16"/>
<textElement/>
<textFieldExpression><![CDATA[$R{detail.linha}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="93fedb4f-18e2-4d95-82e8-2108d3eb135c" x="306" y="51" width="44" height="16"/>
<reportElement uuid="93fedb4f-18e2-4d95-82e8-2108d3eb135c" x="278" y="51" width="44" height="16"/>
<textElement/>
<textFieldExpression><![CDATA[$R{detail.servicio}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="3de0b54a-0b10-4556-9b0a-ba8f19989716" x="350" y="51" width="42" height="16"/>
<reportElement uuid="3de0b54a-0b10-4556-9b0a-ba8f19989716" x="322" y="51" width="42" height="16"/>
<textElement/>
<textFieldExpression><![CDATA[$R{detail.hora}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="cc834009-ae90-46d4-8bbb-37578b69f621" x="392" y="51" width="44" height="16"/>
<textElement/>
<reportElement uuid="cc834009-ae90-46d4-8bbb-37578b69f621" x="364" y="40" width="44" height="27"/>
<textElement>
<font size="9"/>
</textElement>
<textFieldExpression><![CDATA[$R{detail.tipobilhete}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="842c2e2b-0a9e-4a28-9010-9b0c814c5bcb" x="436" y="51" width="72" height="16"/>
<reportElement uuid="842c2e2b-0a9e-4a28-9010-9b0c814c5bcb" x="452" y="51" width="66" height="16"/>
<textElement/>
<textFieldExpression><![CDATA[$R{detail.pasajero}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="94fe9e9b-e231-43b8-aeb8-7bc3eb2d61af" x="508" y="51" width="46" height="16"/>
<reportElement uuid="94fe9e9b-e231-43b8-aeb8-7bc3eb2d61af" x="518" y="51" width="44" height="16"/>
<textElement/>
<textFieldExpression><![CDATA[$R{detail.documento}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="952c3d60-ade1-4f57-8801-3ef6bc7f2333" x="554" y="51" width="41" height="16"/>
<reportElement uuid="952c3d60-ade1-4f57-8801-3ef6bc7f2333" x="562" y="51" width="41" height="16"/>
<textElement/>
<textFieldExpression><![CDATA[$R{detail.precio}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="e14732be-42a0-4f54-9eb2-52f10ece154b" x="595" y="51" width="48" height="16"/>
<reportElement uuid="e14732be-42a0-4f54-9eb2-52f10ece154b" x="603" y="51" width="46" height="16"/>
<textElement/>
<textFieldExpression><![CDATA[$R{detail.desconto}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="b34ce751-6969-47b0-aeb7-fff00a5de1e3" x="643" y="51" width="53" height="16"/>
<textElement/>
<reportElement uuid="b34ce751-6969-47b0-aeb7-fff00a5de1e3" x="649" y="51" width="51" height="16"/>
<textElement textAlignment="Right"/>
<textFieldExpression><![CDATA[$R{detail.tarifadesconto}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="bb3d2388-6bda-4727-ba30-0a5f4612f1a8" x="696" y="51" width="54" height="16"/>
<reportElement uuid="bb3d2388-6bda-4727-ba30-0a5f4612f1a8" x="701" y="51" width="51" height="16"/>
<textElement/>
<textFieldExpression><![CDATA[$R{detail.bilheteiro}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="e727feec-a329-4f8c-af2a-c89c3c2e9606" x="750" y="51" width="72" height="16"/>
<reportElement uuid="e727feec-a329-4f8c-af2a-c89c3c2e9606" x="752" y="51" width="70" height="16"/>
<textElement/>
<textFieldExpression><![CDATA[$R{detail.agencia}]]></textFieldExpression>
</textField>
<line>
<reportElement uuid="8e2d6686-e4d7-43d5-b3a9-46adc3e58350" x="1" y="66" width="821" height="1"/>
<reportElement uuid="8e2d6686-e4d7-43d5-b3a9-46adc3e58350" x="1" y="67" width="821" height="1"/>
</line>
<textField>
<reportElement uuid="8fb67bb3-6ff2-40d1-b338-714f199ea7f0" x="1" y="10" width="48" height="20"/>
<reportElement uuid="8fb67bb3-6ff2-40d1-b338-714f199ea7f0" x="1" y="10" width="120" height="20"/>
<textElement/>
<textFieldExpression><![CDATA[$R{header.empresa}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="6b1fac8d-c098-4893-b1dd-7b64573f0173" x="408" y="40" width="44" height="27"/>
<textElement>
<font size="9"/>
</textElement>
<textFieldExpression><![CDATA[$R{detail.tipopassagem}]]></textFieldExpression>
</textField>
</band>
</groupHeader>
</group>
@ -158,7 +168,7 @@
<textFieldExpression><![CDATA[" " + $V{PAGE_NUMBER}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="be1692e9-f130-4d08-9173-6ca3e4699030" x="732" y="20" width="42" height="20"/>
<reportElement uuid="be1692e9-f130-4d08-9173-6ca3e4699030" x="734" y="20" width="37" height="20"/>
<textElement/>
<textFieldExpression><![CDATA[$R{header.pagina}]]></textFieldExpression>
</textField>
@ -178,7 +188,7 @@
<textFieldExpression><![CDATA[new java.util.Date()]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="7548d623-fb6c-48d4-b8b7-504f5437a79a" x="774" y="20" width="24" height="20"/>
<reportElement uuid="7548d623-fb6c-48d4-b8b7-504f5437a79a" x="771" y="20" width="27" height="20"/>
<textElement textAlignment="Right"/>
<textFieldExpression><![CDATA[$V{PAGE_NUMBER}+" de"]]></textFieldExpression>
</textField>
@ -188,112 +198,119 @@
<band splitType="Stretch"/>
</columnHeader>
<detail>
<band height="17" splitType="Stretch">
<band height="16" splitType="Prevent">
<textField isStretchWithOverflow="true">
<reportElement uuid="c29b2244-5b3e-48a2-9adf-8e10ee2a3856" stretchType="RelativeToBandHeight" x="143" y="1" width="21" height="16"/>
<reportElement uuid="c29b2244-5b3e-48a2-9adf-8e10ee2a3856" stretchType="RelativeToBandHeight" x="143" y="0" width="21" height="16"/>
<textElement textAlignment="Left">
<font size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{km}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement uuid="3111776a-f727-4313-841c-55dabd804df4" stretchType="RelativeToBandHeight" x="306" y="0" width="44" height="16"/>
<reportElement uuid="3111776a-f727-4313-841c-55dabd804df4" stretchType="RelativeToBandHeight" x="278" y="0" width="44" height="16"/>
<textElement textAlignment="Left">
<font size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{corridaId}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" pattern="HH:mm:ss" isBlankWhenNull="true">
<reportElement uuid="4a68f71a-7be1-467a-b3eb-641a0c1f9a48" stretchType="RelativeToBandHeight" x="350" y="0" width="42" height="16"/>
<reportElement uuid="4a68f71a-7be1-467a-b3eb-641a0c1f9a48" stretchType="RelativeToBandHeight" x="322" y="0" width="42" height="16"/>
<textElement textAlignment="Left">
<font size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{fechorviaje}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement uuid="cee727cd-cbc7-41d0-8020-d70aa33d8c9f" stretchType="RelativeToBandHeight" x="164" y="1" width="142" height="16"/>
<reportElement uuid="cee727cd-cbc7-41d0-8020-d70aa33d8c9f" stretchType="RelativeToBandHeight" x="164" y="0" width="114" height="16"/>
<textElement textAlignment="Left">
<font size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{linha}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" pattern="dd/MM/yyyy" isBlankWhenNull="true">
<reportElement uuid="9f731da4-307a-4409-a8d5-28b2c4c40fce" stretchType="RelativeToBandHeight" x="0" y="1" width="49" height="16"/>
<reportElement uuid="9f731da4-307a-4409-a8d5-28b2c4c40fce" stretchType="RelativeToBandHeight" x="0" y="0" width="49" height="16"/>
<textElement textAlignment="Left">
<font size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{feccorrida}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement uuid="6cc780bc-645e-4f03-a7d0-b4ecf7d4eb6c" stretchType="RelativeToBandHeight" x="392" y="0" width="44" height="16"/>
<textElement textAlignment="Left">
<reportElement uuid="6cc780bc-645e-4f03-a7d0-b4ecf7d4eb6c" stretchType="RelativeToBandHeight" x="364" y="0" width="44" height="16"/>
<textElement textAlignment="Center">
<font size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{desctipoventa}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement uuid="9c9861ac-780e-4e8b-aab8-9a4f506ce62b" stretchType="RelativeToBandHeight" x="436" y="0" width="72" height="16"/>
<reportElement uuid="9c9861ac-780e-4e8b-aab8-9a4f506ce62b" stretchType="RelativeToBandHeight" x="452" y="0" width="66" height="16"/>
<textElement textAlignment="Left">
<font size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{nombpasajero}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement uuid="37fa056d-c401-4268-a455-c5caf5e4eb54" stretchType="RelativeToBandHeight" x="508" y="0" width="46" height="16"/>
<reportElement uuid="37fa056d-c401-4268-a455-c5caf5e4eb54" stretchType="RelativeToBandHeight" x="518" y="0" width="44" height="16"/>
<textElement textAlignment="Left">
<font size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{descnumdoc}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" pattern="###0.00;-###0.00" isBlankWhenNull="true">
<reportElement uuid="695d5bfa-16e3-4163-82a0-36d2a2ba21ed" stretchType="RelativeToBandHeight" x="554" y="0" width="41" height="16"/>
<textElement textAlignment="Right">
<font size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{preciooriginal}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" pattern="###0.00;-###0.00" isBlankWhenNull="true">
<reportElement uuid="d7019a40-a617-43c7-9ad2-b7c47fb38d60" stretchType="RelativeToBandHeight" x="595" y="0" width="48" height="16"/>
<reportElement uuid="d7019a40-a617-43c7-9ad2-b7c47fb38d60" stretchType="RelativeToBandHeight" x="603" y="0" width="46" height="16"/>
<textElement textAlignment="Right">
<font size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{porccategoria}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" pattern="###0.00;-###0.00" isBlankWhenNull="true">
<reportElement uuid="f0161d55-b853-4318-8028-8aec04c0487d" stretchType="RelativeToBandHeight" x="643" y="0" width="43" height="16"/>
<reportElement uuid="f0161d55-b853-4318-8028-8aec04c0487d" stretchType="RelativeToBandHeight" x="649" y="0" width="51" height="16"/>
<textElement textAlignment="Right">
<font size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{preciopagado}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement uuid="1f3bab43-ae23-41b1-b5a6-a6c4c09fd359" stretchType="RelativeToBandHeight" x="696" y="0" width="54" height="16"/>
<reportElement uuid="1f3bab43-ae23-41b1-b5a6-a6c4c09fd359" stretchType="RelativeToBandHeight" x="701" y="0" width="51" height="16"/>
<textElement textAlignment="Left">
<font size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{cveusuario}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement uuid="24dcce32-309b-48f9-8543-1e1bffdef942" isPrintRepeatedValues="false" x="750" y="0" width="72" height="16"/>
<reportElement uuid="24dcce32-309b-48f9-8543-1e1bffdef942" isPrintRepeatedValues="false" x="752" y="0" width="70" height="16"/>
<textElement textAlignment="Left">
<font size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{nombpuntoventa}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true">
<reportElement uuid="3343aea7-212b-4bd5-a29c-8dcab3cb7568" stretchType="RelativeToBandHeight" x="99" y="1" width="44" height="16"/>
<reportElement uuid="3343aea7-212b-4bd5-a29c-8dcab3cb7568" stretchType="RelativeToBandHeight" x="99" y="0" width="44" height="16"/>
<textElement textAlignment="Left">
<font size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{destino}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" pattern="dd/MM/yyyy" isBlankWhenNull="true">
<reportElement uuid="b36dbddb-2fa9-48a5-809e-0e15ad54c529" stretchType="RelativeToBandHeight" x="49" y="1" width="50" height="16"/>
<reportElement uuid="b36dbddb-2fa9-48a5-809e-0e15ad54c529" stretchType="RelativeToBandHeight" x="49" y="0" width="50" height="16"/>
<textElement textAlignment="Left">
<font size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{origen}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" pattern="###0.00;-###0.00" isBlankWhenNull="true">
<reportElement uuid="695d5bfa-16e3-4163-82a0-36d2a2ba21ed" stretchType="RelativeToBandHeight" x="562" y="0" width="41" height="16"/>
<textElement textAlignment="Right">
<font size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{preciooriginal}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement uuid="f7539e74-4ab5-45e3-b3ca-b66967acc3e2" stretchType="RelativeToBandHeight" x="408" y="0" width="44" height="16"/>
<textElement textAlignment="Center">
<font size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{cvecategoria}]]></textFieldExpression>
</textField>
</band>
</detail>
<summary>
@ -309,19 +326,19 @@
<textFieldExpression><![CDATA[$V{qtde}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="c3632bd6-baee-4919-880b-1e0f94fe44c0" x="510" y="24" width="65" height="16"/>
<reportElement uuid="c3632bd6-baee-4919-880b-1e0f94fe44c0" x="530" y="24" width="73" height="16"/>
<textElement textAlignment="Right"/>
<textFieldExpression><![CDATA[$V{total_sem_desconto}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="5bb15b93-745c-48fd-8803-3047a49c358c" x="601" y="24" width="65" height="16"/>
<reportElement uuid="5bb15b93-745c-48fd-8803-3047a49c358c" x="635" y="24" width="65" height="16"/>
<textElement textAlignment="Right"/>
<textFieldExpression><![CDATA[$V{total_com_desconto}]]></textFieldExpression>
</textField>
</band>
</summary>
<noData>
<band height="20">
<band height="22">
<textField>
<reportElement uuid="5a6c1b7b-2242-4cf1-b957-723b906ee620" x="0" y="0" width="803" height="20"/>
<textElement/>

View File

@ -20,6 +20,7 @@ public class RelatorioGratuidadeBean {
private String cveusuario;
private String nombpuntoventa;
private String nombempresa;
private String cvecategoria;
public Date getFeccorrida() {
return feccorrida;
@ -117,4 +118,11 @@ public class RelatorioGratuidadeBean {
public void setNombempresa(String nombempresa) {
this.nombempresa = nombempresa;
}
public String getCvecategoria() {
return cvecategoria;
}
public void setCvecategoria(String cvecategoria) {
this.cvecategoria = cvecategoria;
}
}