fixes bug 6555 inclusão da data de devolução no relatório

git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@49536 d1611594-4594-4d17-8e1d-87c2c4800839
master
igor.rodrigo 2015-10-28 16:43:18 +00:00
parent 6b70be1829
commit d35dfed2c8
5 changed files with 50 additions and 31 deletions

View File

@ -39,6 +39,7 @@ public class RelatorioCancelamentoVendaCartao extends Relatorio {
dataResult.put("estabelecimento", rset.getString("nombpuntoventa"));
dataResult.put("cartao", rset.getString("numtarjeta").replace('*', ' ').trim());
dataResult.put("datavenda", rset.getDate("fechorventa"));
dataResult.put("datadevolucao", rset.getDate("datadevolucao"));
dataResult.put("valorvenda", rset.getBigDecimal("valor_venda"));
dataResult.put("valorcancelar", rset.getBigDecimal("valor_cancelar"));
dataResult.put("autorizacao", rset.getString("numautorizacion"));
@ -62,7 +63,7 @@ public class RelatorioCancelamentoVendaCartao extends Relatorio {
StringBuilder sql = new StringBuilder();
sql.append(" select * from (select distinct c.caja_id, p.nombpuntoventa, ctj.numtarjeta, c.fechorventa, ptovta.numsitef,");
sql.append(" (coalesce(c.preciopagado,0) + coalesce(c.importeoutros,0)+ coalesce(c.importepedagio,0)+ coalesce(c.importeseguro,0) + coalesce(c.importetaxaembarque,0)) as valor_venda,");
sql.append(" TO_CHAR(coalesce(cf.importe,0) - (coalesce(cf.importe,0)*(ocd.PENALIZACION/100)),'FM9999999.90') as valor_cancelar, m.descmotivo, ctj.numautorizacion numautorizacion, ctj.nsu, c.numfoliosistema ");
sql.append(" TO_CHAR(coalesce(cf.importe,0) - (coalesce(cf.importe,0)*(ocd.PENALIZACION/100)),'FM9999999.90') as valor_cancelar, m.descmotivo, ctj.numautorizacion, ctj.nsu, c.numfoliosistema, c.fechorventa as datadevolucao ");
sql.append(" from caja c inner join punto_venta p on c.puntoventa_id = p.puntoventa_id ");
sql.append(" inner join caja_formapago cf on c.caja_id = cf.caja_id ");
sql.append(" inner join forma_pago f on cf.formapago_id = f.formapago_id ");
@ -87,7 +88,7 @@ public class RelatorioCancelamentoVendaCartao extends Relatorio {
sql.append(" select * from (select distinct c.caja_id, p.nombpuntoventa, ctj.numtarjeta, c.fechorventa, ptovta.numsitef,");
sql.append(" (coalesce(c.preciopagado,0) + coalesce(c.importeoutros,0)+ coalesce(c.importepedagio,0)+ coalesce(c.importeseguro,0) + coalesce(c.importetaxaembarque,0)) as valor_venda,");
sql.append(" TO_CHAR(coalesce(o.VALOR_TARJETA,0),'FM9999999.90') as valor_cancelar,");
sql.append(" 'OCD' as descmotivo, ctj.numautorizacion numautorizacion, ctj.nsu, c.numfoliosistema");
sql.append(" 'OCD' as descmotivo, ctj.numautorizacion, ctj.nsu, c.numfoliosistema, o.fecmodif as datadevolucao");
sql.append(" from OCD o");
sql.append(" inner join boleto b on o.BOLETO_ID = b.BOLETO_ID");
sql.append(" inner join caja_det_pago cdt on cdt.NUMOPERACION = b.NUMOPERACION");

View File

@ -18,7 +18,8 @@ label.data=Data da compra
label.valor.venda=Valor da venda
label.valor.cancelar=Valor a cancelar
label.autorizacao=Autorização
label.motivo=Motivo Cancelamento
label.motivo=Motivo do Cancel.
label.devolucao=Data da Dev.
label.sitef=Sitef
label.sitef=Sitef
label.nsu=NSU

View File

@ -18,7 +18,8 @@ label.data=Data da compra
label.valor.venda=Valor da venda
label.valor.cancelar=Valor a cancelar
label.autorizacao=Autorização
label.motivo=Motivo do Cancelamento
label.motivo=Motivo do Cancel.
label.devolucao=Data da Dev.
label.sitef=Sitef
label.nsu=NSU
label.numfoliosistema=N. do Bilhete

View File

@ -24,6 +24,7 @@
<field name="numerositef" class="java.lang.String"/>
<field name="nsu" class="java.lang.String"/>
<field name="numfoliosistema" class="java.lang.String"/>
<field name="datadevolucao" class="java.util.Date"/>
<background>
<band splitType="Stretch"/>
</background>
@ -46,7 +47,7 @@
<textFieldExpression><![CDATA[$R{cabecalho.periodo}]]></textFieldExpression>
</textField>
<textField pattern="" isBlankWhenNull="false">
<reportElement uuid="8948c0fc-e878-45e2-8505-7934add98ab9" mode="Transparent" x="107" y="35" width="10" height="14" forecolor="#000000" backcolor="#FFFFFF"/>
<reportElement uuid="8948c0fc-e878-45e2-8505-7934add98ab9" mode="Transparent" x="116" y="35" width="10" height="14" forecolor="#000000" backcolor="#FFFFFF"/>
<textElement textAlignment="Left" verticalAlignment="Top" rotation="None" markup="none">
<font fontName="SansSerif" size="9" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
<paragraph lineSpacing="Single"/>
@ -54,7 +55,7 @@
<textFieldExpression><![CDATA[$R{cabecalho.periodoA}]]></textFieldExpression>
</textField>
<textField pattern="dd/MM/yyyy" isBlankWhenNull="false">
<reportElement uuid="7f1b9715-baaf-4e20-9a9d-a7ec4c696587" mode="Transparent" x="46" y="35" width="51" height="14" forecolor="#000000" backcolor="#FFFFFF"/>
<reportElement uuid="7f1b9715-baaf-4e20-9a9d-a7ec4c696587" mode="Transparent" x="46" y="35" width="62" height="14" forecolor="#000000" backcolor="#FFFFFF"/>
<textElement textAlignment="Left" verticalAlignment="Top" rotation="None" markup="none">
<font fontName="SansSerif" size="9" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
<paragraph lineSpacing="Single"/>
@ -62,7 +63,7 @@
<textFieldExpression><![CDATA[$P{DATA_INICIAL}]]></textFieldExpression>
</textField>
<textField pattern="dd/MM/yyyy" isBlankWhenNull="false">
<reportElement uuid="64632058-9466-479c-ae28-0a11c9ed2c7f" mode="Transparent" x="132" y="35" width="51" height="14" forecolor="#000000" backcolor="#FFFFFF"/>
<reportElement uuid="64632058-9466-479c-ae28-0a11c9ed2c7f" mode="Transparent" x="132" y="35" width="62" height="14" forecolor="#000000" backcolor="#FFFFFF"/>
<textElement textAlignment="Left" verticalAlignment="Top" rotation="None" markup="none">
<font fontName="SansSerif" size="9" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
<paragraph lineSpacing="Single"/>
@ -129,77 +130,84 @@
<reportElement uuid="a11636cc-5ee1-44cc-8cd1-cbe2ebc47abb" x="1" y="34" width="802" height="1"/>
</line>
<textField>
<reportElement uuid="337f441e-ca7f-402c-8407-f3406ec2b4b0" x="2" y="15" width="156" height="21"/>
<reportElement uuid="337f441e-ca7f-402c-8407-f3406ec2b4b0" x="2" y="16" width="156" height="21"/>
<textElement>
<font size="11"/>
<font size="10"/>
</textElement>
<textFieldExpression><![CDATA[$R{label.Estabelecimento}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="0ddedacd-7ebc-4aa7-9535-2f5695ee9c8c" x="509" y="15" width="185" height="21"/>
<reportElement uuid="0ddedacd-7ebc-4aa7-9535-2f5695ee9c8c" x="553" y="16" width="132" height="21"/>
<textElement>
<font size="11"/>
<font size="10"/>
</textElement>
<textFieldExpression><![CDATA[$R{label.motivo}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="8506ac47-d72f-4ef5-b53a-da3970fb7edc" x="377" y="15" width="126" height="21"/>
<reportElement uuid="8506ac47-d72f-4ef5-b53a-da3970fb7edc" x="418" y="16" width="126" height="21"/>
<textElement textAlignment="Right">
<font size="11"/>
<font size="10"/>
</textElement>
<textFieldExpression><![CDATA[$R{label.valor.cancelar}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="859d4892-377e-4313-8a88-6454a88ce936" x="316" y="15" width="102" height="21"/>
<reportElement uuid="859d4892-377e-4313-8a88-6454a88ce936" x="365" y="16" width="102" height="21"/>
<textElement textAlignment="Right">
<font size="11"/>
<font size="10"/>
</textElement>
<textFieldExpression><![CDATA[$R{label.valor.venda}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="d9a2225c-8883-4a35-9c16-8af9bcfe6577" x="260" y="15" width="101" height="21"/>
<reportElement uuid="d9a2225c-8883-4a35-9c16-8af9bcfe6577" x="260" y="16" width="101" height="21"/>
<textElement>
<font size="11"/>
<font size="10"/>
</textElement>
<textFieldExpression><![CDATA[$R{label.data}]]></textFieldExpression>
</textField>
<textField pattern="" isBlankWhenNull="false">
<reportElement uuid="0583701e-920a-473b-b1e4-6137f8d022df" mode="Transparent" x="221" y="15" width="79" height="21" forecolor="#000000" backcolor="#FFFFFF"/>
<reportElement uuid="0583701e-920a-473b-b1e4-6137f8d022df" mode="Transparent" x="221" y="16" width="79" height="21" forecolor="#000000" backcolor="#FFFFFF"/>
<textElement textAlignment="Left" verticalAlignment="Top" rotation="None" markup="none">
<font fontName="SansSerif" size="11" isBold="false" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
<font fontName="SansSerif" size="10" isBold="false" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
<paragraph lineSpacing="Single"/>
</textElement>
<textFieldExpression><![CDATA[$R{label.cartao}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="82e75550-fae7-4cea-acf9-f9f56f083400" x="638" y="15" width="86" height="21"/>
<reportElement uuid="82e75550-fae7-4cea-acf9-f9f56f083400" x="642" y="15" width="86" height="21"/>
<textElement>
<font size="11"/>
<font size="10"/>
</textElement>
<textFieldExpression><![CDATA[$R{label.autorizacao}]]></textFieldExpression>
</textField>
<textField pattern="" isBlankWhenNull="false">
<reportElement uuid="f9ea7239-48e1-4207-b957-dc4aadcaa590" mode="Transparent" x="157" y="16" width="79" height="20" forecolor="#000000" backcolor="#FFFFFF"/>
<textElement verticalAlignment="Top" rotation="None" markup="none">
<font fontName="SansSerif" size="11" isBold="false" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
<font fontName="SansSerif" size="10" isBold="false" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
<paragraph lineSpacing="Single"/>
</textElement>
<textFieldExpression><![CDATA[$R{label.sitef}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="80e816ef-5cd3-40f5-a4a3-889987dd4809" x="701" y="15" width="24" height="21"/>
<reportElement uuid="80e816ef-5cd3-40f5-a4a3-889987dd4809" x="701" y="16" width="24" height="21"/>
<textElement>
<font size="11"/>
<font size="10"/>
</textElement>
<textFieldExpression><![CDATA[$R{label.nsu}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="c6bbe161-315b-43a3-bc6d-bd1ebad05d0a" x="741" y="16" width="70" height="21"/>
<textElement>
<font size="11"/>
<font size="10"/>
</textElement>
<textFieldExpression><![CDATA[$R{label.numfoliosistema}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="876fa163-5ff5-4eef-b32c-0f5b6b40672c" x="337" y="16" width="101" height="21"/>
<textElement>
<font size="10"/>
</textElement>
<textFieldExpression><![CDATA[$R{label.devolucao}]]></textFieldExpression>
</textField>
</band>
</columnHeader>
<detail>
@ -212,14 +220,14 @@
<textFieldExpression><![CDATA[$F{cartao}]]></textFieldExpression>
</textField>
<textField isBlankWhenNull="true">
<reportElement uuid="73582b2a-b21b-4637-990c-aff7423a8e27" x="158" y="-3" width="78" height="20"/>
<reportElement uuid="73582b2a-b21b-4637-990c-aff7423a8e27" x="156" y="-3" width="78" height="20"/>
<textElement>
<font size="10" isBold="false" isItalic="false"/>
</textElement>
<textFieldExpression><![CDATA[$F{numerositef}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" pattern="dd/MM/yyyy" isBlankWhenNull="true">
<reportElement uuid="29ae3fa8-9db1-46c8-bcf7-cb9aa7bc6eb3" mode="Transparent" x="262" y="-3" width="80" height="20" forecolor="#000000" backcolor="#FFFFFF"/>
<reportElement uuid="29ae3fa8-9db1-46c8-bcf7-cb9aa7bc6eb3" mode="Transparent" x="260" y="-3" width="80" height="20" forecolor="#000000" backcolor="#FFFFFF"/>
<textElement verticalAlignment="Top" rotation="None" markup="none">
<font fontName="SansSerif" size="10" isBold="false" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
<paragraph lineSpacing="Single"/>
@ -227,7 +235,7 @@
<textFieldExpression><![CDATA[$F{datavenda}]]></textFieldExpression>
</textField>
<textField pattern="¤ #,##0.00">
<reportElement uuid="49faea3b-2ce4-469a-b07c-3b4869aaa9e5" x="637" y="-3" width="86" height="20"/>
<reportElement uuid="49faea3b-2ce4-469a-b07c-3b4869aaa9e5" x="641" y="-3" width="86" height="20"/>
<textElement>
<font size="10" isBold="false" isItalic="false"/>
</textElement>
@ -241,14 +249,14 @@
<textFieldExpression><![CDATA[$F{estabelecimento}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" pattern="¤ #,##0.00" isBlankWhenNull="true">
<reportElement uuid="48c368c2-dd11-4724-a5e9-b3f139464d4a" x="383" y="-3" width="119" height="20"/>
<reportElement uuid="48c368c2-dd11-4724-a5e9-b3f139464d4a" x="424" y="-3" width="119" height="20"/>
<textElement textAlignment="Right">
<font size="10" isBold="false" isItalic="false"/>
</textElement>
<textFieldExpression><![CDATA[$F{valorcancelar}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" pattern="¤ #,##0.00" isBlankWhenNull="true">
<reportElement uuid="22208383-347b-421f-9528-08d231f9acd3" mode="Transparent" x="326" y="-3" width="92" height="20" forecolor="#000000" backcolor="#FFFFFF"/>
<reportElement uuid="22208383-347b-421f-9528-08d231f9acd3" mode="Transparent" x="375" y="-3" width="92" height="20" forecolor="#000000" backcolor="#FFFFFF"/>
<textElement textAlignment="Right" verticalAlignment="Top" rotation="None" markup="none">
<font fontName="SansSerif" size="10" isBold="false" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
<paragraph lineSpacing="Single"/>
@ -256,7 +264,7 @@
<textFieldExpression><![CDATA[$F{valorvenda}]]></textFieldExpression>
</textField>
<textField pattern="¤ #,##0.00">
<reportElement uuid="a40b0fab-d6bd-4673-a150-d85c0c576816" x="510" y="-3" width="151" height="20"/>
<reportElement uuid="a40b0fab-d6bd-4673-a150-d85c0c576816" x="554" y="-3" width="151" height="20"/>
<textElement>
<font size="10" isBold="false" isItalic="false"/>
</textElement>
@ -276,6 +284,14 @@
</textElement>
<textFieldExpression><![CDATA[$F{numfoliosistema}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" pattern="dd/MM/yyyy" isBlankWhenNull="true">
<reportElement uuid="c25823fc-1130-4b93-bb7b-c6dd9c8fb6b3" mode="Transparent" x="337" y="-3" width="80" height="20" forecolor="#000000" backcolor="#FFFFFF"/>
<textElement verticalAlignment="Top" rotation="None" markup="none">
<font fontName="SansSerif" size="10" isBold="false" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
<paragraph lineSpacing="Single"/>
</textElement>
<textFieldExpression><![CDATA[$F{datadevolucao}]]></textFieldExpression>
</textField>
</band>
</detail>
<summary>