fixes bug 6555 - Adição de campos de novos campos e inclusão de query para busca de devoluções OCD
git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@49329 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
25a9f38e60
commit
2f5b095011
|
@ -37,13 +37,15 @@ public class RelatorioCancelamentoVendaCartao extends Relatorio {
|
|||
while (rset.next()) {
|
||||
Map<String, Object> dataResult = new HashMap<String, Object>();
|
||||
dataResult.put("estabelecimento", rset.getString("nombpuntoventa"));
|
||||
dataResult.put("cartao", rset.getString("numtarjeta"));
|
||||
dataResult.put("cartao", rset.getString("numtarjeta").replace('*', ' ').trim());
|
||||
dataResult.put("datavenda", rset.getDate("fechorventa"));
|
||||
dataResult.put("valorvenda", rset.getBigDecimal("valor_venda"));
|
||||
dataResult.put("valorcancelar", rset.getBigDecimal("valor_cancelar"));
|
||||
dataResult.put("autorizacao", rset.getString("numautorizacion"));
|
||||
dataResult.put("motivo", rset.getString("descmotivo"));
|
||||
dataResult.put("numerositef", rset.getString("numsitef"));
|
||||
dataResult.put("nsu", rset.getString("nsu"));
|
||||
dataResult.put("numfoliosistema", rset.getString("numfoliosistema") != null ? rset.getString("numfoliosistema") : "");
|
||||
this.dados.add(dataResult);
|
||||
}
|
||||
|
||||
|
@ -58,9 +60,9 @@ public class RelatorioCancelamentoVendaCartao extends Relatorio {
|
|||
|
||||
private String getSql() {
|
||||
StringBuilder sql = new StringBuilder();
|
||||
sql.append(" select distinct c.caja_id, p.nombpuntoventa, ctj.numtarjeta, c.fechorventa, ptovta.numsitef,");
|
||||
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 ");
|
||||
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(" 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 ");
|
||||
|
@ -78,8 +80,31 @@ public class RelatorioCancelamentoVendaCartao extends Relatorio {
|
|||
sql.append(" and p.puntoventa_id IN (" + parametros.get("NUMPUNTOVENTA").toString() + ")");
|
||||
}
|
||||
sql.append(" inner join ocd_param ocd on ocd.empresa_id = p.empresa_id ");
|
||||
sql.append(" and p.empresa_id = ptovta.empresa_id ");
|
||||
sql.append(" order by c.fechorventa ");
|
||||
sql.append(" and p.empresa_id = ptovta.empresa_id )");
|
||||
|
||||
sql.append(" union ");
|
||||
|
||||
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)*(o.PENALIZACION/100)),'FM9999999.90') as valor_cancelar,");
|
||||
sql.append(" 'OCD' as descmotivo, ctj.numautorizacion numautorizacion, ctj.nsu, c.numfoliosistema");
|
||||
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");
|
||||
sql.append(" inner join caja_tarjeta ctj on cdt.cajadetpago_id = ctj.cajadetpago_id");
|
||||
sql.append(" inner join punto_venta p on p.puntoventa_id = b.puntoventa_id");
|
||||
sql.append(" inner join ptovta_empresa ptovta on b.puntoventa_id = ptovta.puntoventa_id");
|
||||
if(parametros.get("EMPRESA_ID") != null){
|
||||
sql.append(" inner join empresa e on p.empresa_id = e.empresa_id and p.empresa_id = " + parametros.get("EMPRESA_ID") );
|
||||
}
|
||||
sql.append(" inner join caja c on c.NUMOPERACION = b.NUMOPERACION");
|
||||
sql.append(" inner join caja_formapago cf on c.caja_id = cf.caja_id");
|
||||
sql.append(" and c.fechorventa >= :data_inicial and c.fechorventa <= :data_final ");
|
||||
if (parametros.get("NUMPUNTOVENTA") != null) {
|
||||
sql.append(" and p.puntoventa_id IN (" + parametros.get("NUMPUNTOVENTA").toString() + ")");
|
||||
}
|
||||
sql.append(" order by c.fechorventa )");
|
||||
|
||||
return sql.toString();
|
||||
}
|
||||
|
||||
|
|
|
@ -14,9 +14,12 @@ cabecalho.filtros=Filtros:
|
|||
#Labels header
|
||||
label.Estabelecimento=Estabelecimento
|
||||
label.cartao=Cartão
|
||||
label.data=Data
|
||||
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.sitef=Sitef
|
||||
label.sitef=Sitef
|
||||
label.sitef=Sitef
|
||||
label.nsu=NSU
|
||||
label.numfoliosistema=N. do Bilhete
|
|
@ -14,9 +14,11 @@ cabecalho.filtros=Filtros:
|
|||
#Labels header
|
||||
label.Estabelecimento=Estabelecimento
|
||||
label.cartao=Cartão
|
||||
label.data=Data
|
||||
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.sitef=Sitef
|
||||
label.sitef=Sitef
|
||||
label.nsu=NSU
|
||||
label.numfoliosistema=N. do Bilhete
|
Binary file not shown.
|
@ -22,6 +22,8 @@
|
|||
<field name="autorizacao" class="java.lang.String"/>
|
||||
<field name="motivo" class="java.lang.String"/>
|
||||
<field name="numerositef" class="java.lang.String"/>
|
||||
<field name="nsu" class="java.lang.String"/>
|
||||
<field name="numfoliosistema" class="java.lang.String"/>
|
||||
<background>
|
||||
<band splitType="Stretch"/>
|
||||
</background>
|
||||
|
@ -129,123 +131,151 @@
|
|||
<textField>
|
||||
<reportElement uuid="337f441e-ca7f-402c-8407-f3406ec2b4b0" x="2" y="15" width="156" height="21"/>
|
||||
<textElement>
|
||||
<font size="12"/>
|
||||
<font size="11"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$R{label.Estabelecimento}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField>
|
||||
<reportElement uuid="0ddedacd-7ebc-4aa7-9535-2f5695ee9c8c" x="573" y="15" width="185" height="21"/>
|
||||
<reportElement uuid="0ddedacd-7ebc-4aa7-9535-2f5695ee9c8c" x="509" y="15" width="185" height="21"/>
|
||||
<textElement>
|
||||
<font size="12"/>
|
||||
<font size="11"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$R{label.motivo}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField>
|
||||
<reportElement uuid="8506ac47-d72f-4ef5-b53a-da3970fb7edc" x="430" y="15" width="126" height="21"/>
|
||||
<reportElement uuid="8506ac47-d72f-4ef5-b53a-da3970fb7edc" x="377" y="15" width="126" height="21"/>
|
||||
<textElement textAlignment="Right">
|
||||
<font size="12"/>
|
||||
<font size="11"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$R{label.valor.cancelar}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField>
|
||||
<reportElement uuid="859d4892-377e-4313-8a88-6454a88ce936" x="355" y="15" width="102" height="21"/>
|
||||
<reportElement uuid="859d4892-377e-4313-8a88-6454a88ce936" x="316" y="15" width="102" height="21"/>
|
||||
<textElement textAlignment="Right">
|
||||
<font size="12"/>
|
||||
<font size="11"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$R{label.valor.venda}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField>
|
||||
<reportElement uuid="d9a2225c-8883-4a35-9c16-8af9bcfe6577" x="307" y="15" width="80" height="21"/>
|
||||
<reportElement uuid="d9a2225c-8883-4a35-9c16-8af9bcfe6577" x="260" y="15" width="80" height="21"/>
|
||||
<textElement>
|
||||
<font size="12"/>
|
||||
<font size="11"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$R{label.data}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField pattern="" isBlankWhenNull="false">
|
||||
<reportElement uuid="0583701e-920a-473b-b1e4-6137f8d022df" mode="Transparent" x="240" y="15" width="79" height="21" forecolor="#000000" backcolor="#FFFFFF"/>
|
||||
<reportElement uuid="0583701e-920a-473b-b1e4-6137f8d022df" mode="Transparent" x="221" y="15" width="79" height="21" forecolor="#000000" backcolor="#FFFFFF"/>
|
||||
<textElement textAlignment="Left" verticalAlignment="Top" rotation="None" markup="none">
|
||||
<font fontName="SansSerif" size="12" isBold="false" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
|
||||
<font fontName="SansSerif" size="11" 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="715" y="15" width="86" height="21"/>
|
||||
<reportElement uuid="82e75550-fae7-4cea-acf9-f9f56f083400" x="638" y="15" width="86" height="21"/>
|
||||
<textElement>
|
||||
<font size="12"/>
|
||||
<font size="11"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$R{label.autorizacao}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField pattern="" isBlankWhenNull="false">
|
||||
<reportElement uuid="f9ea7239-48e1-4207-b957-dc4aadcaa590" mode="Transparent" x="157" y="15" width="79" height="20" forecolor="#000000" backcolor="#FFFFFF"/>
|
||||
<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="12" isBold="false" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
|
||||
<font fontName="SansSerif" size="11" 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"/>
|
||||
<textElement>
|
||||
<font size="11"/>
|
||||
</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"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$R{label.numfoliosistema}]]></textFieldExpression>
|
||||
</textField>
|
||||
</band>
|
||||
</columnHeader>
|
||||
<detail>
|
||||
<band height="28" splitType="Stretch">
|
||||
<textField>
|
||||
<reportElement uuid="c35afacb-b160-4ace-b7be-c2e2f54ac1c0" x="240" y="-3" width="79" height="20"/>
|
||||
<reportElement uuid="c35afacb-b160-4ace-b7be-c2e2f54ac1c0" x="221" y="-3" width="79" height="20"/>
|
||||
<textElement>
|
||||
<font size="11" isBold="false" isItalic="false"/>
|
||||
<font size="10" isBold="false" isItalic="false"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$F{cartao}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField isBlankWhenNull="true">
|
||||
<reportElement uuid="73582b2a-b21b-4637-990c-aff7423a8e27" x="158" y="-4" width="78" height="20"/>
|
||||
<reportElement uuid="73582b2a-b21b-4637-990c-aff7423a8e27" x="158" y="-3" width="78" height="20"/>
|
||||
<textElement>
|
||||
<font size="11" isBold="false" isItalic="false"/>
|
||||
<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="307" y="-4" width="80" height="20" forecolor="#000000" backcolor="#FFFFFF"/>
|
||||
<reportElement uuid="29ae3fa8-9db1-46c8-bcf7-cb9aa7bc6eb3" mode="Transparent" x="262" y="-3" width="80" 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[$F{datavenda}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField pattern="¤ #,##0.00">
|
||||
<reportElement uuid="49faea3b-2ce4-469a-b07c-3b4869aaa9e5" x="715" y="-1" width="86" height="20"/>
|
||||
<reportElement uuid="49faea3b-2ce4-469a-b07c-3b4869aaa9e5" x="637" y="-3" width="86" height="20"/>
|
||||
<textElement>
|
||||
<font size="11" isBold="false" isItalic="false"/>
|
||||
<font size="10" isBold="false" isItalic="false"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$F{autorizacao}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField pattern="dd/MM/yyyy">
|
||||
<reportElement uuid="bfb9d635-bbc1-4e92-890a-df8299bc8daa" x="2" y="-3" width="155" height="20"/>
|
||||
<textElement>
|
||||
<font size="11" isBold="false" isItalic="false"/>
|
||||
<font size="10" isBold="false" isItalic="false"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$F{estabelecimento}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField isStretchWithOverflow="true" pattern="¤ #,##0.00" isBlankWhenNull="true">
|
||||
<reportElement uuid="48c368c2-dd11-4724-a5e9-b3f139464d4a" x="436" y="-4" width="119" height="20"/>
|
||||
<reportElement uuid="48c368c2-dd11-4724-a5e9-b3f139464d4a" x="383" y="-3" width="119" height="20"/>
|
||||
<textElement textAlignment="Right">
|
||||
<font size="11" isBold="false" isItalic="false"/>
|
||||
<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="365" y="-3" width="92" height="20" forecolor="#000000" backcolor="#FFFFFF"/>
|
||||
<reportElement uuid="22208383-347b-421f-9528-08d231f9acd3" mode="Transparent" x="326" y="-3" width="92" height="20" forecolor="#000000" backcolor="#FFFFFF"/>
|
||||
<textElement textAlignment="Right" 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[$F{valorvenda}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField pattern="¤ #,##0.00">
|
||||
<reportElement uuid="a40b0fab-d6bd-4673-a150-d85c0c576816" x="572" y="-2" width="151" height="20"/>
|
||||
<reportElement uuid="a40b0fab-d6bd-4673-a150-d85c0c576816" x="510" y="-3" width="151" height="20"/>
|
||||
<textElement>
|
||||
<font size="11" isBold="false" isItalic="false"/>
|
||||
<font size="10" isBold="false" isItalic="false"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$F{motivo}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField pattern="">
|
||||
<reportElement uuid="0b04641c-aa1f-4f64-b79f-fe5ad46c9758" x="701" y="-3" width="42" height="17"/>
|
||||
<textElement>
|
||||
<font size="10" isBold="false" isItalic="false"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$F{nsu}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField pattern="">
|
||||
<reportElement uuid="1c166449-6aa5-4558-8bc1-56750b9d8b0a" x="740" y="-3" width="33" height="17"/>
|
||||
<textElement>
|
||||
<font size="10" isBold="false" isItalic="false"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$F{numfoliosistema}]]></textFieldExpression>
|
||||
</textField>
|
||||
</band>
|
||||
</detail>
|
||||
<summary>
|
||||
|
|
Loading…
Reference in New Issue