wilian 2016-11-25 20:47:13 +00:00
parent 2af5de7cc5
commit 6023cff897
8 changed files with 135 additions and 63 deletions

View File

@ -74,7 +74,7 @@ public class RelatorioDevolucaoBilhetes extends Relatorio {
DevolucaoBilhetes db = new DevolucaoBilhetes();
db.setEstado((String) rset.getObject("ESTADO"));
db.setAidf((String) rset.getObject("AIDF"));
db.setNumFolioSistema((String) rset.getObject("AIDF") == null ? (String) rset.getObject("NUMFOLIOSISTEMA") : (String) rset.getObject("AIDF"));
db.setNumFolioSistema((String) rset.getObject("NUMFOLIOSISTEMA"));
db.setSerieSubSerie((String) rset.getObject("SERIE_SUBSERIE"));
db.setFolio((String) rset.getObject("FOLIO"));
db.setUf((String) rset.getObject("UF"));
@ -85,6 +85,7 @@ public class RelatorioDevolucaoBilhetes extends Relatorio {
db.setPrecioPagado((BigDecimal) rset.getObject("PRECIOPAGADO"));
db.setEmpresaId(rset.getObject("EMPRESA_ID") == null ? null : ((BigDecimal) rset.getObject("EMPRESA_ID")).intValue());
db.setEmpresa((String) rset.getObject("NOMB_EMPRESA"));
db.setTotalBilhete(rset.getBigDecimal("TOTAL"));
BigDecimal valorIcms = BigDecimal.ZERO;
valorIcms = db.getPrecioPagado().multiply(db.getIcms().divide(BigDecimal.valueOf(100)));
@ -136,7 +137,8 @@ public class RelatorioDevolucaoBilhetes extends Relatorio {
sql.append(" TO_CHAR(B.FECHORVENTA, 'DD/MM/YYYY') AS FECHOR_VENTA, ");
sql.append(" CASE WHEN CO.ESTADO_ID <> CD.ESTADO_ID THEN 1 ELSE 0 END IS_ESTADUAL, ");
sql.append(" EI.PORCREDMUNICIPAL AS PORC_MUNICIPAL, ");
sql.append(" EI.PORCREDESTADUAL AS PORC_ESTADUAL ");
sql.append(" EI.PORCREDESTADUAL AS PORC_ESTADUAL, ");
sql.append(" NVL(B.PRECIOPAGADO,0) + NVL(B.IMPORTEOUTROS,0) + NVL(B.IMPORTEPEDAGIO,0) + NVL(B.IMPORTESEGURO,0) + NVL(B.IMPORTETAXAEMBARQUE,0) AS TOTAL ");
sql.append("FROM BOLETO B ");
sql.append("INNER JOIN EMPRESA E ON E.EMPRESA_ID = B.MARCA_ID ");
sql.append("INNER JOIN PUNTO_VENTA PTV ON PTV.PUNTOVENTA_ID = B.PUNTOVENTA_ID ");
@ -174,7 +176,8 @@ public class RelatorioDevolucaoBilhetes extends Relatorio {
sql.append(" TO_CHAR(B.FECHORVENTA, 'DD/MM/YYYY'), ");
sql.append(" (CASE WHEN CO.ESTADO_ID <> CD.ESTADO_ID THEN 1 ELSE 0 END), ");
sql.append(" EI.PORCREDMUNICIPAL, ");
sql.append(" EI.PORCREDESTADUAL ");
sql.append(" EI.PORCREDESTADUAL, ");
sql.append(" NVL(B.PRECIOPAGADO,0) + NVL(B.IMPORTEOUTROS,0) + NVL(B.IMPORTEPEDAGIO,0) + NVL(B.IMPORTESEGURO,0) + NVL(B.IMPORTETAXAEMBARQUE,0) ");
sql.append("ORDER BY NOMB_EMPRESA, ESTADO, FECHOR_VENTA ");
return sql.toString();

View File

@ -88,37 +88,37 @@ public class RelatorioVendasComissao extends Relatorio {
private void processarResultado(ResultSet rset) throws SQLException {
while (rset.next()) {
RelatorioVendasComissaoBean relatorioVendasPacotesBoletosBean = new RelatorioVendasComissaoBean();
relatorioVendasPacotesBoletosBean.setNumPuntoVenta(rset.getString("NUMPUNTOVENTA"));
relatorioVendasPacotesBoletosBean.setNombPuntoVenta(rset.getString("NOMBPUNTOVENTA"));
RelatorioVendasComissaoBean relatorioVendaComissao = new RelatorioVendasComissaoBean();
relatorioVendaComissao.setNumPuntoVenta(rset.getString("NUMPUNTOVENTA"));
relatorioVendaComissao.setNombPuntoVenta(rset.getString("NOMBPUNTOVENTA"));
boolean indreimpresion = rset.getBoolean("INDREIMPRESION");
String indstatusboleto = rset.getString("INDSTATUSBOLETO");
Long motivocancelacionId = rset.getLong("MOTIVOCANCELACION_ID");
if(isDevolucaoOrCancelamentoCaja(indstatusboleto, motivocancelacionId, indreimpresion) && StringUtils.isNotBlank(rset.getString("NUMPTOVTAVENTA"))) {
relatorioVendasPacotesBoletosBean.setNumPuntoVenta(rset.getString("NUMPTOVTAVENTA"));
relatorioVendasPacotesBoletosBean.setNombPuntoVenta(rset.getString("NOMBPTOVTAVENTA"));
relatorioVendaComissao.setNumPuntoVenta(rset.getString("NUMPTOVTAVENTA"));
relatorioVendaComissao.setNombPuntoVenta(rset.getString("NOMBPTOVTAVENTA"));
}
int indice = lsDadosRelatorio.indexOf(relatorioVendasPacotesBoletosBean);
int indice = lsDadosRelatorio.indexOf(relatorioVendaComissao);
if(indice > -1) {
relatorioVendasPacotesBoletosBean = lsDadosRelatorio.get(indice);
relatorioVendaComissao = lsDadosRelatorio.get(indice);
}
if(isVenda(indstatusboleto, indreimpresion) || isTroca(indstatusboleto, indreimpresion)) {
relatorioVendasPacotesBoletosBean.setTotalVendas(relatorioVendasPacotesBoletosBean.getTotalVendas().add(rset.getBigDecimal("TOTAL") != null ? rset.getBigDecimal("TOTAL") : new BigDecimal(0)));
relatorioVendasPacotesBoletosBean.setTotalTaxasVendas(relatorioVendasPacotesBoletosBean.getTotalTaxasVendas().add(rset.getBigDecimal("TOTAL_TAXAS") != null ? rset.getBigDecimal("TOTAL_TAXAS") : new BigDecimal(0)));
relatorioVendaComissao.setTotalVendas(relatorioVendaComissao.getTotalVendas().add(rset.getBigDecimal("TOTAL") != null ? rset.getBigDecimal("TOTAL") : new BigDecimal(0)));
relatorioVendaComissao.setTotalTaxasVendas(relatorioVendaComissao.getTotalTaxasVendas().add(rset.getBigDecimal("TOTAL_TAXAS") != null ? rset.getBigDecimal("TOTAL_TAXAS") : new BigDecimal(0)));
} else if(isCancelamentoCaja(indstatusboleto, motivocancelacionId, indreimpresion)) {
relatorioVendasPacotesBoletosBean.setTotalVendasCanceladas(relatorioVendasPacotesBoletosBean.getTotalVendasCanceladas().add(rset.getBigDecimal("TOTAL") != null ? rset.getBigDecimal("TOTAL") : new BigDecimal(0)));
relatorioVendasPacotesBoletosBean.setTotalTaxasVendasCanceladas(relatorioVendasPacotesBoletosBean.getTotalTaxasVendasCanceladas().add(rset.getBigDecimal("TOTAL_TAXAS") != null ? rset.getBigDecimal("TOTAL_TAXAS") : new BigDecimal(0)));
relatorioVendaComissao.setTotalVendasCanceladas(relatorioVendaComissao.getTotalVendasCanceladas().add(rset.getBigDecimal("TOTAL") != null ? rset.getBigDecimal("TOTAL") : new BigDecimal(0)));
relatorioVendaComissao.setTotalTaxasVendasCanceladas(relatorioVendaComissao.getTotalTaxasVendasCanceladas().add(rset.getBigDecimal("TOTAL_TAXAS") != null ? rset.getBigDecimal("TOTAL_TAXAS") : new BigDecimal(0)));
} else if(isDevolucaoCaja(indstatusboleto, motivocancelacionId, indreimpresion) ||
isDevolucaoOcdCaja(indstatusboleto, motivocancelacionId, indreimpresion) ||
isDevolucaoTrocaCaja(indstatusboleto, motivocancelacionId, indreimpresion)) {
relatorioVendasPacotesBoletosBean.setTotalVendasDevolucao(relatorioVendasPacotesBoletosBean.getTotalVendasDevolucao().add(rset.getBigDecimal("TOTAL") != null ? rset.getBigDecimal("TOTAL") : new BigDecimal(0)));
relatorioVendasPacotesBoletosBean.setTotalTaxasVendasDevolucao(relatorioVendasPacotesBoletosBean.getTotalTaxasVendasDevolucao().add(rset.getBigDecimal("TOTAL_TAXAS") != null ? rset.getBigDecimal("TOTAL_TAXAS") : new BigDecimal(0)));
relatorioVendaComissao.setTotalVendasDevolucao(relatorioVendaComissao.getTotalVendasDevolucao().add(rset.getBigDecimal("TOTAL") != null ? rset.getBigDecimal("TOTAL") : new BigDecimal(0)));
relatorioVendaComissao.setTotalTaxasVendasDevolucao(relatorioVendaComissao.getTotalTaxasVendasDevolucao().add(rset.getBigDecimal("TOTAL_TAXAS") != null ? rset.getBigDecimal("TOTAL_TAXAS") : new BigDecimal(0)));
}
if(indice == -1) {
lsDadosRelatorio.add(relatorioVendasPacotesBoletosBean);
lsDadosRelatorio.add(relatorioVendaComissao);
}
}
@ -160,7 +160,7 @@ public class RelatorioVendasComissao extends Relatorio {
}
private NamedParameterStatement carregarNamedParameterStatement(Connection conexao) throws SQLException {
String sql = getSqlPacotes();
String sql = getSql();
log.info(sql);
NamedParameterStatement stmt = new NamedParameterStatement(conexao, sql);
@ -178,7 +178,7 @@ public class RelatorioVendasComissao extends Relatorio {
return stmt;
}
protected String getSqlPacotes() {
protected String getSql() {
StringBuilder sQuery = new StringBuilder();
sQuery.append("SELECT PV.PUNTOVENTA_ID, PV.NUMPUNTOVENTA, PV.NOMBPUNTOVENTA, C.PTOVTAVENTA_ID, PV1.NUMPUNTOVENTA as NUMPTOVTAVENTA, PV1.NOMBPUNTOVENTA AS NOMBPTOVTAVENTA, C.INDSTATUSBOLETO, C.MOTIVOCANCELACION_ID, C.INDREIMPRESION, ")

View File

@ -14,4 +14,6 @@ label.aliquota=Al
label.icms=ICMS
label.pagina=Página:
label.total=Total
label.qtdeBilhetes=Quantidade de Bilhetes:
label.qtdeBilhetes=Quantidade de Bilhetes:
label.totalBilhete=Total Bilhete
label.numeroBilhete=Nº Bilhete

View File

@ -14,4 +14,6 @@ label.aliquota=Al
label.icms=ICMS
label.pagina=Página:
label.total=Total
label.qtdeBilhetes=Quantidade de Bilhetes:
label.qtdeBilhetes=Quantidade de Bilhetes:
label.totalBilhete=Total Bilhete
label.numeroBilhete=Nº Bilhete

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="RelatorioDevolucaoBilhetes" pageWidth="595" pageHeight="842" whenNoDataType="NoDataSection" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="efbc89d4-6f08-4ea5-802f-d4f48ed208e2">
<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="RelatorioDevolucaoBilhetes" pageWidth="842" pageHeight="595" orientation="Landscape" whenNoDataType="NoDataSection" columnWidth="802" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="efbc89d4-6f08-4ea5-802f-d4f48ed208e2">
<property name="ireport.zoom" value="1.5"/>
<property name="ireport.x" value="0"/>
<property name="ireport.y" value="90"/>
<property name="ireport.x" value="506"/>
<property name="ireport.y" value="100"/>
<style name="textStyle" isDefault="true" fontSize="6" isBold="false" isItalic="false" isUnderline="false" isStrikeThrough="false"/>
<style name="table">
<box>
@ -53,6 +53,7 @@
<field name="porcEstadual" class="java.math.BigDecimal"/>
<field name="estornoMunicipal" class="java.math.BigDecimal"/>
<field name="estornoEstadual" class="java.math.BigDecimal"/>
<field name="totalBilhete" class="java.math.BigDecimal"/>
<variable name="precioPagado_1" class="java.math.BigDecimal" resetType="Group" resetGroup="data_group" calculation="Sum">
<variableExpression><![CDATA[$F{precioPagado}]]></variableExpression>
</variable>
@ -77,6 +78,12 @@
<variable name="somaEstorno" class="java.math.BigDecimal" resetType="Group" resetGroup="estado_empresa" calculation="Sum">
<variableExpression><![CDATA[$F{estornoEstadual}.add($F{estornoMunicipal})]]></variableExpression>
</variable>
<variable name="vTotalBilhete" class="java.math.BigDecimal" calculation="Sum">
<variableExpression><![CDATA[$F{totalBilhete}]]></variableExpression>
</variable>
<variable name="vSubTotalBilhete" class="java.math.BigDecimal" resetType="Group" resetGroup="data_group" calculation="Sum">
<variableExpression><![CDATA[$F{totalBilhete}]]></variableExpression>
</variable>
<group name="empresa">
<groupExpression><![CDATA[$F{empresaId}]]></groupExpression>
<groupHeader>
@ -114,7 +121,7 @@
<textFieldExpression><![CDATA["Imposto a Estornar Interestadual (" + $F{porcEstadual} + " % )"]]></textFieldExpression>
</textField>
<line>
<reportElement x="2" y="0" width="553" height="1" uuid="9f5bfcdb-8a1f-45b5-bf7c-76fe28f72e9f"/>
<reportElement x="2" y="0" width="800" height="1" uuid="9f5bfcdb-8a1f-45b5-bf7c-76fe28f72e9f"/>
</line>
<textField>
<reportElement x="2" y="18" width="271" height="17" uuid="5726d4b8-da32-4b50-8531-3c31285e03d6"/>
@ -124,21 +131,21 @@
<textFieldExpression><![CDATA["Imposto a Estornar Intermunicipal (" + $F{porcMunicipal} + " % )"]]></textFieldExpression>
</textField>
<textField pattern="###0.00">
<reportElement x="483" y="19" width="72" height="17" uuid="cf8b4127-af83-4ef1-9913-fbd00f0ffe35"/>
<reportElement x="728" y="19" width="72" height="17" uuid="cf8b4127-af83-4ef1-9913-fbd00f0ffe35"/>
<textElement textAlignment="Right">
<font size="9"/>
</textElement>
<textFieldExpression><![CDATA[$V{estornoMunicipal_1}]]></textFieldExpression>
</textField>
<textField pattern="###0.00">
<reportElement x="483" y="2" width="72" height="17" uuid="c9cec4e3-dd36-4806-b32f-010b4f2c4705"/>
<reportElement x="728" y="2" width="72" height="17" uuid="c9cec4e3-dd36-4806-b32f-010b4f2c4705"/>
<textElement textAlignment="Right">
<font size="9"/>
</textElement>
<textFieldExpression><![CDATA[$V{estornoEstadual_1}]]></textFieldExpression>
</textField>
<textField pattern="###0.00">
<reportElement x="483" y="36" width="72" height="16" uuid="693122b4-eb19-463d-8061-76a4b58b458f"/>
<reportElement x="728" y="36" width="72" height="16" uuid="693122b4-eb19-463d-8061-76a4b58b458f"/>
<textElement textAlignment="Right">
<font size="9"/>
</textElement>
@ -159,31 +166,31 @@
<textFieldExpression><![CDATA[$F{fechorVenta}]]></textFieldExpression>
</textField>
<line>
<reportElement x="1" y="15" width="553" height="1" uuid="fc2f690d-3659-4d11-a671-9c004341d03d"/>
<reportElement x="1" y="15" width="800" height="1" uuid="fc2f690d-3659-4d11-a671-9c004341d03d"/>
</line>
</band>
</groupHeader>
<groupFooter>
<band height="15">
<textField pattern="###0.00" isBlankWhenNull="true">
<reportElement x="365" y="1" width="60" height="14" uuid="67bdceb4-d6ed-42c5-871f-d809ffec832b"/>
<reportElement x="610" y="1" width="60" height="14" uuid="67bdceb4-d6ed-42c5-871f-d809ffec832b"/>
<textElement textAlignment="Right">
<font size="9"/>
</textElement>
<textFieldExpression><![CDATA[$V{precioPagado_1}]]></textFieldExpression>
</textField>
<textField pattern="###0.00" isBlankWhenNull="true">
<reportElement x="295" y="1" width="70" height="14" uuid="943bc881-8248-4da5-999a-62b2f67a573a"/>
<reportElement x="540" y="1" width="70" height="14" uuid="943bc881-8248-4da5-999a-62b2f67a573a"/>
<textElement textAlignment="Right">
<font size="9"/>
</textElement>
<textFieldExpression><![CDATA[$V{precioPagado_1}]]></textFieldExpression>
</textField>
<line>
<reportElement x="1" y="0" width="554" height="1" uuid="eb29c074-35dc-47d8-855b-78b95676b7ae"/>
<reportElement x="1" y="0" width="800" height="1" uuid="eb29c074-35dc-47d8-855b-78b95676b7ae"/>
</line>
<textField pattern="###0.00" isBlankWhenNull="true">
<reportElement x="483" y="2" width="72" height="13" uuid="6e65196e-b844-4c3d-9697-44aadad52344"/>
<reportElement x="728" y="2" width="72" height="13" uuid="6e65196e-b844-4c3d-9697-44aadad52344"/>
<textElement textAlignment="Right">
<font size="9"/>
</textElement>
@ -196,6 +203,13 @@
</textElement>
<textFieldExpression><![CDATA["Subtotal - " + $F{fechorVenta}]]></textFieldExpression>
</textField>
<textField pattern="###0.00" isBlankWhenNull="true">
<reportElement x="426" y="1" width="111" height="14" uuid="49c16eb0-9d9d-4e17-a1a7-20391bde4035"/>
<textElement textAlignment="Right">
<font size="9"/>
</textElement>
<textFieldExpression><![CDATA[$V{vSubTotalBilhete}]]></textFieldExpression>
</textField>
</band>
</groupFooter>
</group>
@ -205,7 +219,7 @@
<pageHeader>
<band height="62" splitType="Stretch">
<textField pattern="" isBlankWhenNull="false">
<reportElement mode="Transparent" x="1" y="1" width="257" height="15" forecolor="#000000" backcolor="#FFFFFF" uuid="2ed4524d-5c06-487c-a8f1-abc59a8ef7fc"/>
<reportElement mode="Transparent" x="1" y="1" width="577" height="15" forecolor="#000000" backcolor="#FFFFFF" uuid="2ed4524d-5c06-487c-a8f1-abc59a8ef7fc"/>
<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"/>
@ -213,7 +227,7 @@
<textFieldExpression><![CDATA[$P{NOME_RELATORIO}]]></textFieldExpression>
</textField>
<textField>
<reportElement mode="Transparent" x="461" y="16" width="93" height="14" forecolor="#000000" backcolor="#FFFFFF" uuid="1e340cae-0c0a-48a3-b2b8-6667a44078af"/>
<reportElement mode="Transparent" x="593" y="16" width="209" height="14" forecolor="#000000" backcolor="#FFFFFF" uuid="1e340cae-0c0a-48a3-b2b8-6667a44078af"/>
<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"/>
@ -245,7 +259,7 @@
<textFieldExpression><![CDATA[$R{label.ate}]]></textFieldExpression>
</textField>
<textField pattern="dd/MM/yyyy HH:mm" isBlankWhenNull="false">
<reportElement mode="Transparent" x="461" y="0" width="93" height="15" forecolor="#000000" backcolor="#FFFFFF" uuid="ea4dfc22-27b5-4600-8e8b-7d74460ed744"/>
<reportElement mode="Transparent" x="593" y="0" width="207" height="15" forecolor="#000000" backcolor="#FFFFFF" uuid="ea4dfc22-27b5-4600-8e8b-7d74460ed744"/>
<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"/>
@ -253,7 +267,7 @@
<textFieldExpression><![CDATA[new java.util.Date()]]></textFieldExpression>
</textField>
<line>
<reportElement x="1" y="45" width="553" height="1" uuid="d9b398e6-2fe9-4a3d-bceb-f9db7a06e5a9"/>
<reportElement x="1" y="45" width="800" height="1" uuid="d9b398e6-2fe9-4a3d-bceb-f9db7a06e5a9"/>
</line>
<textField>
<reportElement mode="Transparent" x="1" y="46" width="43" height="14" forecolor="#000000" backcolor="#FFFFFF" uuid="11b7c338-166a-4149-b45c-b47698bd88ea"/>
@ -264,7 +278,7 @@
<textFieldExpression><![CDATA[$R{label.filtros}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="46" y="46" width="508" height="14" uuid="98fc1c7e-3fee-4c70-924f-2cbb17fd243f"/>
<reportElement x="46" y="46" width="756" height="14" uuid="98fc1c7e-3fee-4c70-924f-2cbb17fd243f"/>
<textElement verticalAlignment="Middle">
<font size="8"/>
</textElement>
@ -283,13 +297,13 @@
<columnHeader>
<band height="16">
<line>
<reportElement x="0" y="0" width="554" height="1" uuid="04a75f17-3686-484b-be43-7b7e22e9def7"/>
<reportElement x="0" y="0" width="800" height="1" uuid="04a75f17-3686-484b-be43-7b7e22e9def7"/>
<graphicElement>
<pen lineWidth="0.5"/>
</graphicElement>
</line>
<line>
<reportElement x="0" y="15" width="555" height="1" uuid="d9f712d0-01a8-4241-a1e6-dc096b4ee773"/>
<reportElement x="0" y="15" width="800" height="1" uuid="d9f712d0-01a8-4241-a1e6-dc096b4ee773"/>
<graphicElement>
<pen lineWidth="0.5"/>
</graphicElement>
@ -302,21 +316,21 @@
<textFieldExpression><![CDATA[$R{label.aidf}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="140" y="1" width="96" height="14" uuid="d6813bb4-94c3-4f9b-af61-54e3676c31bb"/>
<reportElement x="265" y="1" width="96" height="14" uuid="d6813bb4-94c3-4f9b-af61-54e3676c31bb"/>
<textElement markup="none">
<font size="10" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[$R{label.serieSubs}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="236" y="2" width="59" height="14" uuid="60cc6a71-4f40-49de-9f78-08b65931d16d"/>
<reportElement x="361" y="2" width="59" height="14" uuid="60cc6a71-4f40-49de-9f78-08b65931d16d"/>
<textElement markup="none">
<font size="10" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[$R{label.numero}]]></textFieldExpression>
</textField>
<textField>
<reportElement mode="Transparent" x="365" y="2" width="60" height="14" forecolor="#000000" backcolor="#FFFFFF" uuid="0b598d85-e93d-4916-b9a1-c80e694aabb6"/>
<reportElement mode="Transparent" x="610" y="2" width="60" height="14" forecolor="#000000" backcolor="#FFFFFF" uuid="0b598d85-e93d-4916-b9a1-c80e694aabb6"/>
<textElement textAlignment="Right" verticalAlignment="Top" rotation="None" markup="none">
<font fontName="SansSerif" size="10" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
<paragraph lineSpacing="Single"/>
@ -324,7 +338,7 @@
<textFieldExpression><![CDATA[$R{label.baseCalc}]]></textFieldExpression>
</textField>
<textField>
<reportElement mode="Transparent" x="425" y="2" width="58" height="14" forecolor="#000000" backcolor="#FFFFFF" uuid="e647ff9e-f7e2-4c90-a75f-d831980391b6"/>
<reportElement mode="Transparent" x="670" y="2" width="58" height="14" forecolor="#000000" backcolor="#FFFFFF" uuid="e647ff9e-f7e2-4c90-a75f-d831980391b6"/>
<textElement textAlignment="Right" verticalAlignment="Top" rotation="None" markup="none">
<font fontName="SansSerif" size="10" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
<paragraph lineSpacing="Single"/>
@ -332,7 +346,7 @@
<textFieldExpression><![CDATA[$R{label.aliquota}]]></textFieldExpression>
</textField>
<textField>
<reportElement mode="Transparent" x="483" y="2" width="72" height="14" forecolor="#000000" backcolor="#FFFFFF" uuid="a1a4be94-54f7-42f0-bdd3-5b0b2d6a37c4"/>
<reportElement mode="Transparent" x="728" y="2" width="72" height="14" forecolor="#000000" backcolor="#FFFFFF" uuid="a1a4be94-54f7-42f0-bdd3-5b0b2d6a37c4"/>
<textElement textAlignment="Right" verticalAlignment="Top" rotation="None" markup="none">
<font fontName="SansSerif" size="10" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
<paragraph lineSpacing="Single"/>
@ -340,12 +354,26 @@
<textFieldExpression><![CDATA[$R{label.icms}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="295" y="2" width="70" height="14" uuid="ed400846-62e0-4199-8c0d-c4b7741d934c"/>
<reportElement x="540" y="2" width="70" height="14" uuid="ed400846-62e0-4199-8c0d-c4b7741d934c"/>
<textElement textAlignment="Right" markup="none">
<font size="10" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[$R{label.vrContabil}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="426" y="2" width="111" height="14" uuid="2b804e18-71b2-44b5-89c3-4393430c94f3"/>
<textElement textAlignment="Right" markup="none">
<font size="10" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[$R{label.totalBilhete}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="142" y="1" width="118" height="14" uuid="a46545d1-264f-4dd1-8d6e-fa62df9cf49b"/>
<textElement markup="none">
<font size="10" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[$R{label.numeroBilhete}]]></textFieldExpression>
</textField>
</band>
</columnHeader>
<detail>
@ -355,50 +383,64 @@
<textElement>
<font size="9"/>
</textElement>
<textFieldExpression><![CDATA[$F{numFolioSistema}]]></textFieldExpression>
<textFieldExpression><![CDATA[$F{aidf}]]></textFieldExpression>
</textField>
<textField isBlankWhenNull="true">
<reportElement x="140" y="0" width="96" height="14" uuid="73fc6712-d370-49e2-ac39-55e2fa5ce9e2"/>
<reportElement x="265" y="0" width="96" height="14" uuid="73fc6712-d370-49e2-ac39-55e2fa5ce9e2"/>
<textElement>
<font size="9"/>
</textElement>
<textFieldExpression><![CDATA[$F{serieSubSerie}]]></textFieldExpression>
</textField>
<textField pattern=" ###0.00">
<reportElement x="295" y="0" width="70" height="14" uuid="b14dbaab-e9a1-4aae-a12c-6305da9d2f80"/>
<reportElement x="540" y="0" width="70" height="14" uuid="b14dbaab-e9a1-4aae-a12c-6305da9d2f80"/>
<textElement textAlignment="Right">
<font size="9"/>
</textElement>
<textFieldExpression><![CDATA[$F{precioPagado}]]></textFieldExpression>
</textField>
<textField pattern=" ###0.00">
<reportElement x="426" y="0" width="111" height="14" uuid="a1bcec7c-0ca6-4f9f-a4c7-9757842b1b4f"/>
<textElement textAlignment="Right">
<font size="9"/>
</textElement>
<textFieldExpression><![CDATA[$F{totalBilhete}]]></textFieldExpression>
</textField>
<textField pattern="###0.00">
<reportElement x="425" y="0" width="58" height="14" uuid="3285bf53-66f1-4dc2-b3db-d12875efa546"/>
<reportElement x="670" y="0" width="58" height="14" uuid="3285bf53-66f1-4dc2-b3db-d12875efa546"/>
<textElement textAlignment="Right">
<font size="9"/>
</textElement>
<textFieldExpression><![CDATA[$F{icms}]]></textFieldExpression>
</textField>
<textField pattern="###0.00">
<reportElement x="365" y="0" width="60" height="14" uuid="6772d6a9-3611-4cb6-9c3b-f78dc3fb5dc0"/>
<reportElement x="610" y="0" width="60" height="14" uuid="6772d6a9-3611-4cb6-9c3b-f78dc3fb5dc0"/>
<textElement textAlignment="Right">
<font size="9"/>
</textElement>
<textFieldExpression><![CDATA[$F{precioPagado}]]></textFieldExpression>
</textField>
<textField pattern=" ###0.00" isBlankWhenNull="true">
<reportElement x="483" y="0" width="72" height="14" uuid="e948b0e2-03c4-47c9-91f1-90d3a3fc4bf4"/>
<reportElement x="728" y="0" width="72" height="14" uuid="e948b0e2-03c4-47c9-91f1-90d3a3fc4bf4"/>
<textElement textAlignment="Right">
<font size="9"/>
</textElement>
<textFieldExpression><![CDATA[$F{valorIcms}]]></textFieldExpression>
</textField>
<textField isBlankWhenNull="true">
<reportElement x="236" y="0" width="59" height="14" uuid="755796e0-1c3a-470a-a226-35e01d006653"/>
<reportElement x="361" y="0" width="59" height="14" uuid="755796e0-1c3a-470a-a226-35e01d006653"/>
<textElement>
<font size="9"/>
</textElement>
<textFieldExpression><![CDATA[$F{folio}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="142" y="0" width="118" height="14" uuid="46bc3410-c01a-4e91-a8e9-17f02536e23d"/>
<textElement markup="none">
<font size="10" isBold="false"/>
</textElement>
<textFieldExpression><![CDATA[$F{numFolioSistema}]]></textFieldExpression>
</textField>
</band>
</detail>
<lastPageFooter>
@ -414,7 +456,7 @@
<textFieldExpression><![CDATA[$R{label.total}]]></textFieldExpression>
</textField>
<line>
<reportElement x="0" y="0" width="555" height="1" uuid="c2a4d216-ecbf-4690-876b-3263188595ad"/>
<reportElement x="0" y="0" width="800" height="1" uuid="c2a4d216-ecbf-4690-876b-3263188595ad"/>
</line>
<textField>
<reportElement stretchType="RelativeToTallestObject" x="236" y="1" width="59" height="14" uuid="0dcac787-43f7-4e9f-84c8-06567671ddb7"/>
@ -431,35 +473,42 @@
<textFieldExpression><![CDATA[$R{label.qtdeBilhetes}]]></textFieldExpression>
</textField>
<line>
<reportElement positionType="Float" x="1" y="15" width="554" height="1" uuid="ff50b0f9-831b-428e-9177-b264920c542b"/>
<reportElement positionType="Float" x="1" y="15" width="800" height="1" uuid="ff50b0f9-831b-428e-9177-b264920c542b"/>
</line>
<textField pattern="###0.00">
<reportElement stretchType="RelativeToTallestObject" x="295" y="1" width="70" height="14" uuid="5bb73e4d-a51b-4a04-bed0-8fa3eb7f8553"/>
<reportElement stretchType="RelativeToTallestObject" x="540" y="1" width="70" height="14" uuid="5bb73e4d-a51b-4a04-bed0-8fa3eb7f8553"/>
<textElement textAlignment="Right" verticalAlignment="Middle">
<font size="9"/>
</textElement>
<textFieldExpression><![CDATA[$V{precioPagado_total}]]></textFieldExpression>
</textField>
<textField pattern="###0.00">
<reportElement stretchType="RelativeToTallestObject" x="365" y="1" width="60" height="14" uuid="7c3ce565-f549-48d2-815d-9b4d7a39b1ca"/>
<reportElement stretchType="RelativeToTallestObject" x="610" y="1" width="60" height="14" uuid="7c3ce565-f549-48d2-815d-9b4d7a39b1ca"/>
<textElement textAlignment="Right" verticalAlignment="Middle">
<font size="9"/>
</textElement>
<textFieldExpression><![CDATA[$V{precioPagado_total}]]></textFieldExpression>
</textField>
<textField pattern="###0.00">
<reportElement stretchType="RelativeToTallestObject" x="483" y="2" width="72" height="14" uuid="7a2dbe9b-868e-46db-b3b3-6e759d4dba98"/>
<reportElement stretchType="RelativeToTallestObject" x="728" y="2" width="72" height="14" uuid="7a2dbe9b-868e-46db-b3b3-6e759d4dba98"/>
<textElement textAlignment="Right" verticalAlignment="Middle">
<font size="9"/>
</textElement>
<textFieldExpression><![CDATA[$V{valorIcms_total}]]></textFieldExpression>
</textField>
<textField pattern="###0.00" isBlankWhenNull="false">
<reportElement stretchType="RelativeToTallestObject" x="426" y="1" width="111" height="14" uuid="80bddbda-0eec-4839-9510-35800aa6d742"/>
<textElement textAlignment="Right" verticalAlignment="Middle">
<font size="9"/>
</textElement>
<textFieldExpression><![CDATA[$V{vTotalBilhete}]]></textFieldExpression>
</textField>
</band>
</summary>
<noData>
<band height="22">
<textField>
<reportElement x="97" y="0" width="407" height="20" uuid="a640c0eb-ead8-4a2a-bda4-675165e8bc7d"/>
<reportElement x="97" y="0" width="573" height="20" uuid="a640c0eb-ead8-4a2a-bda4-675165e8bc7d"/>
<textElement markup="none">
<font size="11" isBold="true"/>
</textElement>

View File

@ -23,6 +23,7 @@ public class DevolucaoBilhetes {
BigDecimal porcEstadual;
BigDecimal estornoMunicipal;
BigDecimal estornoEstadual;
private BigDecimal totalBilhete;
public String getAidf() {
return aidf;
@ -168,4 +169,12 @@ public class DevolucaoBilhetes {
this.empresa = empresa;
}
public BigDecimal getTotalBilhete() {
return totalBilhete;
}
public void setTotalBilhete(BigDecimal totalBilhete) {
this.totalBilhete = totalBilhete;
}
}

View File

@ -23,9 +23,12 @@ import org.zkoss.zul.Bandbox;
import org.zkoss.zul.Combobox;
import org.zkoss.zul.Comboitem;
import org.zkoss.zul.Datebox;
import org.zkoss.zul.Listbox;
import org.zkoss.zul.Listitem;
import org.zkoss.zul.Paging;
import org.zkoss.zul.Textbox;
import com.arjuna.ats.internal.jdbc.drivers.modifiers.list;
import com.rjconsultores.ventaboletos.entidad.Empresa;
import com.rjconsultores.ventaboletos.entidad.Estado;
import com.rjconsultores.ventaboletos.entidad.PuntoVenta;
@ -110,10 +113,14 @@ public class RelatorioDevolucaoBilhetesController extends MyGenericForwardCompos
parametros.put("USUARIO", UsuarioLogado.getUsuarioLogado().getUsuarioId().toString());
filtro.append("Agência(s): ");
if (puntoVentaSelList.getSelectedsItens().size() > 0) {
parametros.put("PUNTOVENTAS", puntoVentaSelList.getSelectedsItens());
if (puntoVentaSelList.getListData().size() > 0) {
List<PuntoVenta> puntoVentas = new ArrayList<PuntoVenta>();
for (Object obj : puntoVentaSelList.getListData()) {
puntoVentas.add((PuntoVenta) obj);
}
parametros.put("PUNTOVENTAS", puntoVentas);
parametros.put("ISNUMPUNTOVENTATODOS", "N");
filtro.append(puntoVentaSelList.getSelectedsItens().size() + " selecionada(s);");
filtro.append(puntoVentaSelList.getListData().size() + " selecionada(s);");
} else {
parametros.put("ISNUMPUNTOVENTATODOS", "S");
filtro.append("Todas ;");
@ -132,7 +139,7 @@ public class RelatorioDevolucaoBilhetesController extends MyGenericForwardCompos
if (itemEmpresa != null) {
Empresa empresa = (Empresa) itemEmpresa.getValue();
parametros.put("EMPRESA_ID", empresa.getEmpresaId());
parametros.put("EMPRESA_NOME", empresa.getNombempresa());
filtro.append(empresa.getNombempresa());
} else {
filtro.append("Todos ;");
}