wilian 2016-03-15 20:10:56 +00:00
parent 17a6634120
commit 383a911f59
4 changed files with 212 additions and 109 deletions

View File

@ -7,7 +7,6 @@ import java.util.Date;
import java.util.HashMap;
import java.util.Map;
import com.rjconsultores.ventaboletos.entidad.Constante;
import com.rjconsultores.ventaboletos.relatorios.utilitarios.ArrayDataSource;
import com.rjconsultores.ventaboletos.relatorios.utilitarios.Relatorio;
import com.rjconsultores.ventaboletos.service.ConstanteService;
@ -35,6 +34,7 @@ public class RelatorioCancelamentoVendaCartao extends Relatorio {
stmt.setTimestamp("data_inicial", new Timestamp(DateUtil.inicioFecha((Date) parametros.get("DATA_INICIAL")).getTime()));
stmt.setTimestamp("data_final", new Timestamp(DateUtil.fimFecha((Date) parametros.get("DATA_FINAL")).getTime()));
stmt.setInt("formaPago1", CARTAO_CREDITO);
stmt.setInt("empresaId", Integer.valueOf(parametros.get("EMPRESA_ID")+""));
ResultSet rset = stmt.executeQuery();
@ -63,9 +63,114 @@ public class RelatorioCancelamentoVendaCartao extends Relatorio {
@Override
protected void processaParametros() throws Exception {
}
private String getSql() {
StringBuilder sql = new StringBuilder();
/* Boletos apenas com venda e cancelamento direto com corrida */
sql.append("SELECT DISTINCT C.CAJA_ID, B.BOLETO_ID, P.NOMBPUNTOVENTA, CTJ.NUMTARJETA, C.FECHORVENTA, PTOVTA.NUMSITEF, ")
.append("'OCD' AS DESCMOTIVO, CTJ.NUMAUTORIZACION, CTJ.NSU, C.NUMFOLIOSISTEMA, O.FECINC AS DATADEVOLUCAO, C.NUMOPERACION, ")
.append("(COALESCE(C.PRECIOPAGADO,0) + COALESCE(C.IMPORTEOUTROS,0)+ COALESCE(C.IMPORTEPEDAGIO,0)+ COALESCE(C.IMPORTESEGURO,0) + COALESCE(C.IMPORTETAXAEMBARQUE,0)) AS VALOR_VENDA, ")
.append("TO_CHAR(COALESCE(O.VALOR_TARJETA,0),'FM9999999.90') AS VALOR_CANCELAR, ")
.append("(SELECT SUM(COALESCE(B1.PRECIOPAGADO,0) + COALESCE(B1.IMPORTEOUTROS,0) + COALESCE(B1.IMPORTEPEDAGIO,0) + COALESCE(B1.IMPORTESEGURO,0) + COALESCE(B1.IMPORTETAXAEMBARQUE,0)) ")
.append(" FROM BOLETO B1 ")
.append(" WHERE B1.NUMOPERACION = B.NUMOPERACION ")
.append(" AND B1.BOLETOORIGINAL_ID IS NULL ")
.append(") AS VALOR_CESTA ")
.append("FROM OCD O ")
.append("INNER JOIN BOLETO B ON O.BOLETO_ID = B.BOLETO_ID ")
.append(" AND B.BOLETOORIGINAL_ID IS NULL ")
.append(" AND B.CORRIDA_ID IS NOT NULL ")
.append(" AND B.FECCORRIDA IS NOT NULL ")
.append("INNER JOIN CAJA C ON C.NUMOPERACION = B.NUMOPERACION ")
.append(" AND B.NUMASIENTO = C.NUMASIENTO ")
.append("INNER JOIN CAJA_DET_PAGO CDT ON CDT.CAJA_ID = C.CAJA_ID AND CDT.FORMAPAGO_ID = :formaPago1 ")
.append("INNER JOIN CAJA_TARJETA CTJ ON CDT.CAJADETPAGO_ID = CTJ.CAJADETPAGO_ID ")
.append("INNER JOIN PUNTO_VENTA P ON P.PUNTOVENTA_ID = B.PUNTOVENTA_ID ")
.append("INNER JOIN PTOVTA_EMPRESA PTOVTA ON B.PUNTOVENTA_ID = PTOVTA.PUNTOVENTA_ID ")
.append("INNER JOIN MARCA M ON M.MARCA_ID = B.MARCA_ID AND M.EMPRESA_ID = PTOVTA.EMPRESA_ID ")
.append("WHERE O.FECINC BETWEEN :data_inicial AND :data_final ")
.append("AND B.MARCA_ID = :empresaId ");
if(parametros.get("NUMPUNTOVENTA") != null) {
sql.append("AND P.PUNTOVENTA_ID IN (")
.append(parametros.get("NUMPUNTOVENTA"))
.append(") ");
}
sql.append("UNION ALL ");
/* Boletos com entrega/transferencia/troca antes do cancelamento com corrida */
sql.append("SELECT DISTINCT C.CAJA_ID, B.BOLETO_ID, P.NOMBPUNTOVENTA, CTJ.NUMTARJETA, C.FECHORVENTA, PTOVTA.NUMSITEF, ")
.append("'OCD' AS DESCMOTIVO, CTJ.NUMAUTORIZACION, CTJ.NSU, C.NUMFOLIOSISTEMA, O.FECINC AS DATADEVOLUCAO, C.NUMOPERACION, ")
.append("(COALESCE(C.PRECIOPAGADO,0) + COALESCE(C.IMPORTEOUTROS,0)+ COALESCE(C.IMPORTEPEDAGIO,0)+ COALESCE(C.IMPORTESEGURO,0) + COALESCE(C.IMPORTETAXAEMBARQUE,0)) AS VALOR_VENDA, ")
.append("TO_CHAR(COALESCE(O.VALOR_TARJETA,0),'FM9999999.90') AS VALOR_CANCELAR, ")
.append("(SELECT SUM(COALESCE(B1.PRECIOPAGADO,0) + COALESCE(B1.IMPORTEOUTROS,0) + COALESCE(B1.IMPORTEPEDAGIO,0) + COALESCE(B1.IMPORTESEGURO,0) + COALESCE(B1.IMPORTETAXAEMBARQUE,0)) ")
.append(" FROM BOLETO B1 ")
.append(" WHERE B1.NUMOPERACION = BR.NUMOPERACION ")
.append(" AND B1.BOLETOORIGINAL_ID IS NULL ")
.append(") AS VALOR_CESTA ")
.append("FROM OCD O ")
.append("INNER JOIN BOLETO B ON O.BOLETO_ID = B.BOLETO_ID ")
.append("INNER JOIN BOLETO BR ON BR.BOLETO_ID = B.BOLETOORIGINAL_ID ")
.append(" AND BR.CORRIDA_ID IS NOT NULL ")
.append(" AND BR.FECCORRIDA IS NOT NULL ")
.append("INNER JOIN CAJA C ON C.NUMOPERACION = BR.NUMOPERACION ")
.append(" AND BR.NUMASIENTO = C.NUMASIENTO ")
.append("INNER JOIN CAJA_DET_PAGO CDT ON CDT.CAJA_ID = C.CAJA_ID AND CDT.FORMAPAGO_ID = :formaPago1 ")
.append("INNER JOIN CAJA_TARJETA CTJ ON CDT.CAJADETPAGO_ID = CTJ.CAJADETPAGO_ID ")
.append("INNER JOIN PUNTO_VENTA P ON P.PUNTOVENTA_ID = BR.PUNTOVENTA_ID ")
.append("INNER JOIN PTOVTA_EMPRESA PTOVTA ON BR.PUNTOVENTA_ID = PTOVTA.PUNTOVENTA_ID ")
.append("INNER JOIN MARCA M ON M.MARCA_ID = BR.MARCA_ID AND M.EMPRESA_ID = PTOVTA.EMPRESA_ID ")
.append("WHERE O.FECINC BETWEEN :data_inicial AND :data_final ")
.append("AND BR.MARCA_ID = :empresaId ");
if(parametros.get("NUMPUNTOVENTA") != null) {
sql.append("AND P.PUNTOVENTA_ID IN (")
.append(parametros.get("NUMPUNTOVENTA"))
.append(") ");
}
sql.append("UNION ALL ");
/* Boletos apenas com venda e cancelamento direto sem corrida */
sql.append("SELECT DISTINCT C.CAJA_ID, B.BOLETO_ID, P.NOMBPUNTOVENTA, CTJ.NUMTARJETA, C.FECHORVENTA, PTOVTA.NUMSITEF, ")
.append("'OCD' AS DESCMOTIVO, CTJ.NUMAUTORIZACION, CTJ.NSU, C.NUMFOLIOSISTEMA, O.FECINC AS DATADEVOLUCAO, C.NUMOPERACION, ")
.append("(COALESCE(C.PRECIOPAGADO,0) + COALESCE(C.IMPORTEOUTROS,0)+ COALESCE(C.IMPORTEPEDAGIO,0)+ COALESCE(C.IMPORTESEGURO,0) + COALESCE(C.IMPORTETAXAEMBARQUE,0)) AS VALOR_VENDA, ")
.append("TO_CHAR(COALESCE(O.VALOR_TARJETA,0),'FM9999999.90') AS VALOR_CANCELAR, ")
.append("(SELECT SUM(COALESCE(B1.PRECIOPAGADO,0) + COALESCE(B1.IMPORTEOUTROS,0) + COALESCE(B1.IMPORTEPEDAGIO,0) + COALESCE(B1.IMPORTESEGURO,0) + COALESCE(B1.IMPORTETAXAEMBARQUE,0)) ")
.append(" FROM BOLETO B1 ")
.append(" WHERE B1.NUMOPERACION = B.NUMOPERACION ")
.append(" AND B1.BOLETOORIGINAL_ID IS NULL ")
.append(") AS VALOR_CESTA ")
.append("FROM OCD O ")
.append("INNER JOIN BOLETO B ON O.BOLETO_ID = B.BOLETO_ID ")
.append(" AND B.BOLETOORIGINAL_ID IS NULL ")
.append(" AND B.CORRIDA_ID IS NULL ")
.append(" AND B.FECCORRIDA IS NULL ")
.append("INNER JOIN CAJA C ON C.NUMOPERACION = B.NUMOPERACION ")
.append(" AND B.NUMFOLIOSISTEMA = C.NUMFOLIOSISTEMA ")
.append("INNER JOIN CAJA_DET_PAGO CDT ON CDT.CAJA_ID = C.CAJA_ID AND CDT.FORMAPAGO_ID = :formaPago1 ")
.append("INNER JOIN CAJA_TARJETA CTJ ON CDT.CAJADETPAGO_ID = CTJ.CAJADETPAGO_ID ")
.append("INNER JOIN PUNTO_VENTA P ON P.PUNTOVENTA_ID = B.PUNTOVENTA_ID ")
.append("INNER JOIN PTOVTA_EMPRESA PTOVTA ON B.PUNTOVENTA_ID = PTOVTA.PUNTOVENTA_ID ")
.append("INNER JOIN MARCA M ON M.MARCA_ID = B.MARCA_ID AND M.EMPRESA_ID = PTOVTA.EMPRESA_ID ")
.append("WHERE O.FECINC BETWEEN :data_inicial AND :data_final ")
.append("AND B.MARCA_ID = :empresaId ");
if(parametros.get("NUMPUNTOVENTA") != null) {
sql.append("AND P.PUNTOVENTA_ID IN (")
.append(parametros.get("NUMPUNTOVENTA"))
.append(") ");
}
sql.append("ORDER BY 3, 5 ");
return sql.toString();
}
/*private String getSql() {
StringBuilder sql = new StringBuilder();
//Busca os boletos originais dos boletos que foram geradas OCDS
//Esses boletos sofreram transferência.
//O intuito dessa query é recuperar os dados originais de cartões de crédito
@ -176,7 +281,7 @@ public class RelatorioCancelamentoVendaCartao extends Relatorio {
sql.append(" from OCD o");
sql.append(" inner join boleto b on o.BOLETO_ID = b.BOLETO_ID");
sql.append(" inner join caja c on c.numoperacion = b.numoperacion ");
sql.append(" and c.numfoliosistema = b.numfoliosistema ");
//sql.append(" and c.numfoliosistema = b.numfoliosistema ");
sql.append(" inner join caja_det_pago cdt ON cdt.caja_id = c.caja_id and cdt.formapago_id in (:formaPago1)");
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");
@ -253,6 +358,6 @@ public class RelatorioCancelamentoVendaCartao extends Relatorio {
return sql.toString();
}
}*/
}

View File

@ -1,6 +1,6 @@
<?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="RelatorioCancelamentoVendaCartao" pageWidth="842" pageHeight="595" orientation="Landscape" whenNoDataType="NoDataSection" columnWidth="802" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="c092ef85-9334-4225-93d7-1acb7cf4d021">
<property name="ireport.zoom" value="1.1000000000000005"/>
<property name="ireport.zoom" value="2.0"/>
<property name="ireport.x" value="0"/>
<property name="ireport.y" value="0"/>
<property name="net.sf.jasperreports.export.xls.exclude.origin.keep.first.band.2" value="pageHeader"/>
@ -32,7 +32,7 @@
<pageHeader>
<band height="73" splitType="Stretch">
<textField pattern="" isBlankWhenNull="false">
<reportElement uuid="136a5066-d141-4362-af36-0780f0d16542" mode="Transparent" x="0" y="0" width="457" height="35" forecolor="#000000" backcolor="#FFFFFF"/>
<reportElement mode="Transparent" x="0" y="0" width="457" height="35" forecolor="#000000" backcolor="#FFFFFF" uuid="136a5066-d141-4362-af36-0780f0d16542"/>
<textElement textAlignment="Left" verticalAlignment="Top" rotation="None" markup="none">
<font fontName="SansSerif" size="12" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
<paragraph lineSpacing="Single"/>
@ -40,7 +40,7 @@
<textFieldExpression><![CDATA[$P{NOME_RELATORIO}]]></textFieldExpression>
</textField>
<textField pattern="" isBlankWhenNull="false">
<reportElement uuid="3dca1764-758d-4e1c-80c0-85cc02e47813" mode="Transparent" x="0" y="42" width="46" height="15" forecolor="#000000" backcolor="#FFFFFF"/>
<reportElement mode="Transparent" x="0" y="42" width="46" height="15" forecolor="#000000" backcolor="#FFFFFF" uuid="3dca1764-758d-4e1c-80c0-85cc02e47813"/>
<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"/>
@ -48,7 +48,7 @@
<textFieldExpression><![CDATA[$R{cabecalho.periodo}]]></textFieldExpression>
</textField>
<textField pattern="" isBlankWhenNull="false">
<reportElement uuid="8948c0fc-e878-45e2-8505-7934add98ab9" mode="Transparent" x="116" y="42" width="10" height="15" forecolor="#000000" backcolor="#FFFFFF"/>
<reportElement mode="Transparent" x="116" y="42" width="10" height="15" forecolor="#000000" backcolor="#FFFFFF" uuid="8948c0fc-e878-45e2-8505-7934add98ab9"/>
<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"/>
@ -56,7 +56,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="42" width="62" height="15" forecolor="#000000" backcolor="#FFFFFF"/>
<reportElement mode="Transparent" x="46" y="42" width="62" height="15" forecolor="#000000" backcolor="#FFFFFF" uuid="7f1b9715-baaf-4e20-9a9d-a7ec4c696587"/>
<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"/>
@ -64,7 +64,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="42" width="62" height="15" forecolor="#000000" backcolor="#FFFFFF"/>
<reportElement mode="Transparent" x="132" y="42" width="62" height="15" forecolor="#000000" backcolor="#FFFFFF" uuid="64632058-9466-479c-ae28-0a11c9ed2c7f"/>
<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"/>
@ -72,14 +72,14 @@
<textFieldExpression><![CDATA[$P{DATA_FINAL}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="a9d471fb-1e1d-4d9a-9783-bbf988931192" x="615" y="0" width="100" height="25"/>
<reportElement x="615" y="0" width="100" height="25" uuid="a9d471fb-1e1d-4d9a-9783-bbf988931192"/>
<textElement textAlignment="Right">
<font size="9" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[$R{cabecalho.dataHora}]]></textFieldExpression>
</textField>
<textField pattern="dd/MM/yyyy HH:mm" isBlankWhenNull="false">
<reportElement uuid="0d200750-aabf-4c7e-b27b-c0e7af4802a9" mode="Transparent" x="715" y="0" width="86" height="25" forecolor="#000000" backcolor="#FFFFFF"/>
<reportElement mode="Transparent" x="715" y="0" width="86" height="25" forecolor="#000000" backcolor="#FFFFFF" uuid="0d200750-aabf-4c7e-b27b-c0e7af4802a9"/>
<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"/>
@ -87,7 +87,7 @@
<textFieldExpression><![CDATA[new java.util.Date()]]></textFieldExpression>
</textField>
<textField pattern="" isBlankWhenNull="false">
<reportElement uuid="bae9bec6-8c42-4bee-a070-34b0a7f1aee4" mode="Transparent" x="668" y="26" width="112" height="15" forecolor="#000000" backcolor="#FFFFFF"/>
<reportElement mode="Transparent" x="668" y="26" width="112" height="15" forecolor="#000000" backcolor="#FFFFFF" uuid="bae9bec6-8c42-4bee-a070-34b0a7f1aee4"/>
<textElement textAlignment="Right" 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"/>
@ -95,7 +95,7 @@
<textFieldExpression><![CDATA[$R{cabecalho.pagina}+" "+$V{PAGE_NUMBER}+" "+$R{cabecalho.de}]]></textFieldExpression>
</textField>
<textField evaluationTime="Report" pattern="" isBlankWhenNull="false">
<reportElement uuid="314e312c-8f24-42de-8354-3c1f7241a985" mode="Transparent" x="781" y="26" width="20" height="15" forecolor="#000000" backcolor="#FFFFFF"/>
<reportElement mode="Transparent" x="781" y="26" width="20" height="15" forecolor="#000000" backcolor="#FFFFFF" uuid="314e312c-8f24-42de-8354-3c1f7241a985"/>
<textElement textAlignment="Center" 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"/>
@ -103,16 +103,16 @@
<textFieldExpression><![CDATA[$V{PAGE_NUMBER}]]></textFieldExpression>
</textField>
<textField pattern="" isBlankWhenNull="false">
<reportElement uuid="4e030613-9cee-443e-9eaa-b19fa3090976" mode="Transparent" x="701" y="42" width="100" height="15" forecolor="#000000" backcolor="#FFFFFF"/>
<reportElement mode="Transparent" x="701" y="42" width="100" height="15" forecolor="#000000" backcolor="#FFFFFF" uuid="4e030613-9cee-443e-9eaa-b19fa3090976"/>
<textElement textAlignment="Right" verticalAlignment="Top" rotation="None" markup="none">
<font fontName="SansSerif" size="7" isBold="false" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
<paragraph lineSpacing="Single"/>
</textElement>
<textFieldExpression><![CDATA[$R{cabecalho.impressorPor}+" "+$P{USUARIO}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="b29d0494-2695-420b-bdc1-b13c08bdbcda" x="0" y="59" width="802" height="14"/>
<box>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement x="0" y="59" width="802" height="14" uuid="b29d0494-2695-420b-bdc1-b13c08bdbcda"/>
<box leftPadding="2" rightPadding="2">
<topPen lineWidth="1.0"/>
<leftPen lineWidth="1.0"/>
<bottomPen lineWidth="1.0"/>
@ -127,125 +127,125 @@
</pageHeader>
<columnHeader>
<band height="14" splitType="Stretch">
<textField isStretchWithOverflow="true">
<reportElement uuid="337f441e-ca7f-402c-8407-f3406ec2b4b0" x="2" y="0" width="110" height="14" isPrintWhenDetailOverflows="true"/>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement stretchType="RelativeToTallestObject" x="2" y="0" width="110" height="14" isPrintWhenDetailOverflows="true" uuid="337f441e-ca7f-402c-8407-f3406ec2b4b0"/>
<box>
<bottomPen lineWidth="1.0"/>
</box>
<textElement verticalAlignment="Top">
<font size="8"/>
<textElement verticalAlignment="Middle">
<font size="6"/>
</textElement>
<textFieldExpression><![CDATA[$R{label.Estabelecimento}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="0ddedacd-7ebc-4aa7-9535-2f5695ee9c8c" x="543" y="0" width="72" height="14"/>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement stretchType="RelativeToTallestObject" x="520" y="0" width="72" height="14" isPrintWhenDetailOverflows="true" uuid="0ddedacd-7ebc-4aa7-9535-2f5695ee9c8c"/>
<box>
<bottomPen lineWidth="1.0"/>
</box>
<textElement textAlignment="Center" verticalAlignment="Top">
<font size="8"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="6"/>
</textElement>
<textFieldExpression><![CDATA[$R{label.motivo}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="8506ac47-d72f-4ef5-b53a-da3970fb7edc" x="477" y="0" width="66" height="14"/>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement stretchType="RelativeToTallestObject" x="467" y="0" width="53" height="14" isPrintWhenDetailOverflows="true" uuid="8506ac47-d72f-4ef5-b53a-da3970fb7edc"/>
<box>
<bottomPen lineWidth="1.0"/>
</box>
<textElement textAlignment="Center" verticalAlignment="Top">
<font size="8"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="6"/>
</textElement>
<textFieldExpression><![CDATA[$R{label.valor.cancelar}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="859d4892-377e-4313-8a88-6454a88ce936" x="411" y="0" width="66" height="14"/>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement stretchType="RelativeToTallestObject" x="414" y="0" width="53" height="14" isPrintWhenDetailOverflows="true" uuid="859d4892-377e-4313-8a88-6454a88ce936"/>
<box>
<bottomPen lineWidth="1.0"/>
</box>
<textElement textAlignment="Center" verticalAlignment="Top">
<font size="8"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="6"/>
</textElement>
<textFieldExpression><![CDATA[$R{label.valor.venda}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="d9a2225c-8883-4a35-9c16-8af9bcfe6577" x="212" y="0" width="66" height="14"/>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement stretchType="RelativeToTallestObject" x="229" y="0" width="66" height="14" isPrintWhenDetailOverflows="true" uuid="d9a2225c-8883-4a35-9c16-8af9bcfe6577"/>
<box>
<bottomPen lineWidth="1.0"/>
</box>
<textElement textAlignment="Center" verticalAlignment="Top">
<font size="8"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="6"/>
</textElement>
<textFieldExpression><![CDATA[$R{label.data}]]></textFieldExpression>
</textField>
<textField pattern="" isBlankWhenNull="false">
<reportElement uuid="0583701e-920a-473b-b1e4-6137f8d022df" mode="Transparent" x="162" y="0" width="50" height="14" forecolor="#000000" backcolor="#FFFFFF"/>
<textField isStretchWithOverflow="true" pattern="" isBlankWhenNull="true">
<reportElement stretchType="RelativeToTallestObject" mode="Transparent" x="189" y="0" width="40" height="14" isPrintWhenDetailOverflows="true" forecolor="#000000" backcolor="#FFFFFF" uuid="0583701e-920a-473b-b1e4-6137f8d022df"/>
<box>
<bottomPen lineWidth="1.0"/>
</box>
<textElement textAlignment="Center" verticalAlignment="Top" rotation="None" markup="none">
<font fontName="SansSerif" size="8" isBold="false" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
<textElement textAlignment="Center" verticalAlignment="Middle" rotation="None" markup="none">
<font fontName="SansSerif" size="6" 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="615" y="0" width="55" height="14"/>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement stretchType="RelativeToTallestObject" x="592" y="0" width="93" height="14" isPrintWhenDetailOverflows="true" uuid="82e75550-fae7-4cea-acf9-f9f56f083400"/>
<box>
<bottomPen lineWidth="1.0"/>
</box>
<textElement textAlignment="Center" verticalAlignment="Top">
<font size="8"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="6"/>
</textElement>
<textFieldExpression><![CDATA[$R{label.autorizacao}]]></textFieldExpression>
</textField>
<textField pattern="" isBlankWhenNull="false">
<reportElement uuid="f9ea7239-48e1-4207-b957-dc4aadcaa590" mode="Transparent" x="112" y="0" width="50" height="14" forecolor="#000000" backcolor="#FFFFFF"/>
<textField isStretchWithOverflow="true" pattern="" isBlankWhenNull="true">
<reportElement stretchType="RelativeToTallestObject" mode="Transparent" x="112" y="0" width="77" height="14" isPrintWhenDetailOverflows="true" forecolor="#000000" backcolor="#FFFFFF" uuid="f9ea7239-48e1-4207-b957-dc4aadcaa590"/>
<box>
<bottomPen lineWidth="1.0"/>
</box>
<textElement textAlignment="Center" verticalAlignment="Top" rotation="None" markup="none">
<font fontName="SansSerif" size="8" isBold="false" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
<textElement textAlignment="Center" verticalAlignment="Middle" rotation="None" markup="none">
<font fontName="SansSerif" size="6" 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="670" y="0" width="75" height="14"/>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement stretchType="RelativeToTallestObject" x="685" y="0" width="75" height="14" isPrintWhenDetailOverflows="true" uuid="80e816ef-5cd3-40f5-a4a3-889987dd4809"/>
<box>
<bottomPen lineWidth="1.0"/>
</box>
<textElement textAlignment="Center" verticalAlignment="Top">
<font size="8"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="6"/>
</textElement>
<textFieldExpression><![CDATA[$R{label.nsu}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="c6bbe161-315b-43a3-bc6d-bd1ebad05d0a" x="745" y="0" width="58" height="14"/>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement stretchType="RelativeToTallestObject" x="760" y="0" width="43" height="14" isPrintWhenDetailOverflows="true" uuid="c6bbe161-315b-43a3-bc6d-bd1ebad05d0a"/>
<box>
<bottomPen lineWidth="1.0"/>
</box>
<textElement textAlignment="Center" verticalAlignment="Top">
<font size="8"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="6"/>
</textElement>
<textFieldExpression><![CDATA[$R{label.numfoliosistema}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="876fa163-5ff5-4eef-b32c-0f5b6b40672c" x="278" y="0" width="66" height="14"/>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement stretchType="RelativeToTallestObject" x="295" y="0" width="66" height="14" isPrintWhenDetailOverflows="true" uuid="876fa163-5ff5-4eef-b32c-0f5b6b40672c"/>
<box>
<bottomPen lineWidth="1.0"/>
</box>
<textElement textAlignment="Center" verticalAlignment="Top">
<font size="8"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="6"/>
</textElement>
<textFieldExpression><![CDATA[$R{label.devolucao}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="77a2f088-9771-472c-bffe-cd1345050e51" x="344" y="0" width="66" height="14"/>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement stretchType="RelativeToTallestObject" x="361" y="0" width="53" height="14" isPrintWhenDetailOverflows="true" uuid="77a2f088-9771-472c-bffe-cd1345050e51"/>
<box>
<bottomPen lineWidth="1.0"/>
</box>
<textElement textAlignment="Center" verticalAlignment="Top">
<font size="8"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="6"/>
</textElement>
<textFieldExpression><![CDATA[$R{label.valor.cesta}]]></textFieldExpression>
</textField>
@ -253,90 +253,90 @@
</columnHeader>
<detail>
<band height="10" splitType="Stretch">
<textField>
<reportElement uuid="c35afacb-b160-4ace-b7be-c2e2f54ac1c0" x="162" y="0" width="50" height="10"/>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement stretchType="RelativeToTallestObject" x="189" y="0" width="40" height="10" isPrintWhenDetailOverflows="true" uuid="c35afacb-b160-4ace-b7be-c2e2f54ac1c0"/>
<textElement textAlignment="Center" verticalAlignment="Top">
<font size="7" isBold="false" isItalic="false"/>
<font size="6" isBold="false" isItalic="false"/>
</textElement>
<textFieldExpression><![CDATA[$F{cartao}]]></textFieldExpression>
</textField>
<textField isBlankWhenNull="true">
<reportElement uuid="73582b2a-b21b-4637-990c-aff7423a8e27" x="112" y="0" width="50" height="10"/>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement stretchType="RelativeToTallestObject" x="112" y="0" width="77" height="10" isPrintWhenDetailOverflows="true" uuid="73582b2a-b21b-4637-990c-aff7423a8e27"/>
<textElement textAlignment="Center" verticalAlignment="Top">
<font size="7" isBold="false" isItalic="false"/>
<font size="6" 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="212" y="0" width="66" height="10" forecolor="#000000" backcolor="#FFFFFF"/>
<reportElement stretchType="RelativeToTallestObject" mode="Transparent" x="229" y="0" width="66" height="10" isPrintWhenDetailOverflows="true" forecolor="#000000" backcolor="#FFFFFF" uuid="29ae3fa8-9db1-46c8-bcf7-cb9aa7bc6eb3"/>
<textElement textAlignment="Center" verticalAlignment="Top" rotation="None" markup="none">
<font fontName="SansSerif" size="7" isBold="false" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
<font fontName="SansSerif" size="6" 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="615" y="0" width="55" height="10"/>
<textField isStretchWithOverflow="true" pattern="¤ #,##0.00" isBlankWhenNull="true">
<reportElement stretchType="RelativeToTallestObject" x="592" y="0" width="93" height="10" isPrintWhenDetailOverflows="true" uuid="49faea3b-2ce4-469a-b07c-3b4869aaa9e5"/>
<textElement textAlignment="Center" verticalAlignment="Top">
<font size="7" isBold="false" isItalic="false"/>
<font size="6" isBold="false" isItalic="false"/>
</textElement>
<textFieldExpression><![CDATA[$F{autorizacao}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" pattern="dd/MM/yyyy">
<reportElement uuid="bfb9d635-bbc1-4e92-890a-df8299bc8daa" x="2" y="0" width="110" height="10" isPrintWhenDetailOverflows="true"/>
<textField isStretchWithOverflow="true" pattern="dd/MM/yyyy" isBlankWhenNull="true">
<reportElement stretchType="RelativeToTallestObject" x="2" y="0" width="110" height="10" isPrintWhenDetailOverflows="true" uuid="bfb9d635-bbc1-4e92-890a-df8299bc8daa"/>
<textElement verticalAlignment="Top">
<font size="7" isBold="false" isItalic="false"/>
<font size="6" 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="477" y="0" width="66" height="10"/>
<textField isStretchWithOverflow="true" pattern="#,##0.00" isBlankWhenNull="true">
<reportElement stretchType="RelativeToTallestObject" x="467" y="0" width="53" height="10" isPrintWhenDetailOverflows="true" uuid="48c368c2-dd11-4724-a5e9-b3f139464d4a"/>
<textElement textAlignment="Center" verticalAlignment="Top">
<font size="7" isBold="false" isItalic="false"/>
<font size="6" 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="411" y="0" width="66" height="10" forecolor="#000000" backcolor="#FFFFFF"/>
<textField isStretchWithOverflow="true" pattern="#,##0.00" isBlankWhenNull="true">
<reportElement stretchType="RelativeToTallestObject" mode="Transparent" x="414" y="0" width="53" height="10" isPrintWhenDetailOverflows="true" forecolor="#000000" backcolor="#FFFFFF" uuid="22208383-347b-421f-9528-08d231f9acd3"/>
<textElement textAlignment="Center" verticalAlignment="Top" rotation="None" markup="none">
<font fontName="SansSerif" size="7" isBold="false" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
<font fontName="SansSerif" size="6" 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="543" y="0" width="72" height="10"/>
<textField isStretchWithOverflow="true" pattern="¤ #,##0.00" isBlankWhenNull="true">
<reportElement stretchType="RelativeToTallestObject" x="520" y="0" width="72" height="10" isPrintWhenDetailOverflows="true" uuid="a40b0fab-d6bd-4673-a150-d85c0c576816"/>
<textElement textAlignment="Center" verticalAlignment="Top">
<font size="7" isBold="false" isItalic="false"/>
<font size="6" isBold="false" isItalic="false"/>
</textElement>
<textFieldExpression><![CDATA[$F{motivo}]]></textFieldExpression>
</textField>
<textField pattern="">
<reportElement uuid="0b04641c-aa1f-4f64-b79f-fe5ad46c9758" x="670" y="0" width="75" height="10"/>
<textField isStretchWithOverflow="true" pattern="" isBlankWhenNull="true">
<reportElement stretchType="RelativeToTallestObject" x="685" y="0" width="75" height="10" isPrintWhenDetailOverflows="true" uuid="0b04641c-aa1f-4f64-b79f-fe5ad46c9758"/>
<textElement textAlignment="Center" verticalAlignment="Top">
<font size="7" isBold="false" isItalic="false"/>
<font size="6" isBold="false" isItalic="false"/>
</textElement>
<textFieldExpression><![CDATA[$F{nsu}]]></textFieldExpression>
</textField>
<textField pattern="">
<reportElement uuid="1c166449-6aa5-4558-8bc1-56750b9d8b0a" x="745" y="0" width="58" height="10"/>
<textField isStretchWithOverflow="true" pattern="" isBlankWhenNull="true">
<reportElement stretchType="RelativeToTallestObject" x="760" y="0" width="43" height="10" isPrintWhenDetailOverflows="true" uuid="1c166449-6aa5-4558-8bc1-56750b9d8b0a"/>
<textElement textAlignment="Center" verticalAlignment="Top">
<font size="7" isBold="false" isItalic="false"/>
<font size="6" isBold="false" isItalic="false"/>
</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="278" y="0" width="66" height="10" forecolor="#000000" backcolor="#FFFFFF"/>
<reportElement stretchType="RelativeToTallestObject" mode="Transparent" x="295" y="0" width="66" height="10" isPrintWhenDetailOverflows="true" forecolor="#000000" backcolor="#FFFFFF" uuid="c25823fc-1130-4b93-bb7b-c6dd9c8fb6b3"/>
<textElement textAlignment="Center" verticalAlignment="Top" rotation="None" markup="none">
<font fontName="SansSerif" size="7" isBold="false" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
<font fontName="SansSerif" size="6" isBold="false" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
<paragraph lineSpacing="Single"/>
</textElement>
<textFieldExpression><![CDATA[$F{datadevolucao}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" pattern="¤ #,##0.00" isBlankWhenNull="true">
<reportElement uuid="97d702dc-422a-49a2-bf61-0c4b70e1d092" mode="Transparent" x="344" y="0" width="66" height="10" forecolor="#000000" backcolor="#FFFFFF"/>
<textField isStretchWithOverflow="true" pattern="#,##0.00" isBlankWhenNull="true">
<reportElement stretchType="RelativeToTallestObject" mode="Transparent" x="361" y="0" width="53" height="10" isPrintWhenDetailOverflows="true" forecolor="#000000" backcolor="#FFFFFF" uuid="97d702dc-422a-49a2-bf61-0c4b70e1d092"/>
<textElement textAlignment="Center" verticalAlignment="Top" rotation="None" markup="none">
<font fontName="SansSerif" size="7" isBold="false" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
<font fontName="SansSerif" size="6" isBold="false" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
<paragraph lineSpacing="Single"/>
</textElement>
<textFieldExpression><![CDATA[$F{valor_total_compra}]]></textFieldExpression>
@ -349,7 +349,7 @@
<noData>
<band height="26">
<textField>
<reportElement uuid="6f13c961-dd50-4e44-ba73-65e0752b8b83" x="0" y="0" width="802" height="26"/>
<reportElement x="0" y="0" width="802" height="26" uuid="6f13c961-dd50-4e44-ba73-65e0752b8b83"/>
<textElement textAlignment="Center" markup="none">
<font size="11" isBold="true"/>
</textElement>

View File

@ -121,23 +121,21 @@ public class RelatorioCancelamentoVendaCartaoController extends MyGenericForward
}
filtro.append("Agência: ");
String puntoVentaIds = "";
String puntoVentas = "";
List<PuntoVenta> lsPuntoVentaSelecionados = new ArrayList(Arrays.asList(puntoVentaSelList.getData()));
if (lsPuntoVentaSelecionados.isEmpty()) {
puntoVentas = "Todas";
} else {
StringBuilder puntoVentaIds = new StringBuilder();
for (int i = 0; i < lsPuntoVentaSelecionados.size(); i++) {
PuntoVenta puntoVenta = lsPuntoVentaSelecionados.get(i);
puntoVentas = puntoVentas + puntoVenta.getNombpuntoventa() + ",";
puntoVentaIds = puntoVentaIds + puntoVenta.getPuntoventaId() + ",";
if(puntoVentaIds.length() > 0) {
puntoVentaIds.append(",");
}
puntoVentaIds.append(puntoVenta.getPuntoventaId());
}
// removendo ultima virgula
puntoVentaIds = puntoVentaIds.substring(0, puntoVentaIds.length() - 1);
puntoVentas = puntoVentas.substring(0, puntoVentas.length() - 1);
parametros.put("NUMPUNTOVENTA", puntoVentaIds);
parametros.put("NUMPUNTOVENTA", puntoVentaIds.toString());
}
filtro.append(puntoVentas).append(";");
parametros.put("FILTROS", filtro.toString());