lucas.calixto 2017-03-15 17:34:40 +00:00
parent ec7ac24ec4
commit dd3b971d49
11 changed files with 141 additions and 65 deletions

View File

@ -13,6 +13,7 @@ import org.apache.commons.lang.StringUtils;
import org.apache.log4j.Logger;
import com.rjconsultores.ventaboletos.constantes.Constantes;
import com.rjconsultores.ventaboletos.entidad.PuntoVenta;
import com.rjconsultores.ventaboletos.relatorios.utilitarios.DataSource;
import com.rjconsultores.ventaboletos.relatorios.utilitarios.Relatorio;
import com.rjconsultores.ventaboletos.relatorios.utilitarios.RelatorioVendasComissaoBean;
@ -32,6 +33,7 @@ public class RelatorioVendasComissao extends Relatorio {
private Timestamp fecFinal;
private Integer empresaId;
private Boolean apenasCancelados;
private PuntoVenta puntoVenta;
public RelatorioVendasComissao(Map<String, Object> parametros, Connection conexao) throws Exception {
super(parametros, conexao);
@ -48,6 +50,13 @@ public class RelatorioVendasComissao extends Relatorio {
}
apenasCancelados = (Boolean) parametros.get("apenasCancelados");
Object puntoVentaParam = parametros.get("puntoVenta");
if (puntoVentaParam != null) {
puntoVenta = (PuntoVenta) puntoVentaParam;
parametros.put("nombPuntoVenta", puntoVenta.getNombpuntoventa());
} else {
parametros.put("nombPuntoVenta", "Todas;");
}
Connection conexao = this.relatorio.getConexao();
processarVendasComissao(conexao);
@ -119,17 +128,20 @@ public class RelatorioVendasComissao extends Relatorio {
relatorioVendaComissao = lsDadosRelatorio.get(indice);
}
BigDecimal total = rset.getBigDecimal("TOTAL");
BigDecimal totalTaxas = rset.getBigDecimal("TOTAL_TAXAS");
if(isVenda(indstatusboleto, indreimpresion) || isTroca(indstatusboleto, indreimpresion)) {
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)));
relatorioVendaComissao.setTotalVendas(relatorioVendaComissao.getTotalVendas().add(total));
relatorioVendaComissao.setTotalTaxasVendas(relatorioVendaComissao.getTotalTaxasVendas().add(totalTaxas));
} else if(isCancelamentoCaja(indstatusboleto, motivocancelacionId, indreimpresion)) {
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)));
relatorioVendaComissao.setTotalVendasCanceladas(relatorioVendaComissao.getTotalVendasCanceladas().add(total));
relatorioVendaComissao.setTotalTaxasVendasCanceladas(relatorioVendaComissao.getTotalTaxasVendasCanceladas().add(totalTaxas));
} else if(isDevolucaoCaja(indstatusboleto, motivocancelacionId, indreimpresion) ||
isDevolucaoOcdCaja(indstatusboleto, motivocancelacionId, indreimpresion) ||
isDevolucaoTrocaCaja(indstatusboleto, motivocancelacionId, indreimpresion)) {
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)));
relatorioVendaComissao.setTotalVendasDevolucao(relatorioVendaComissao.getTotalVendasDevolucao().add(total));
relatorioVendaComissao.setTotalTaxasVendasDevolucao(relatorioVendaComissao.getTotalTaxasVendasDevolucao().add(totalTaxas));
}
if(indice == -1) {
@ -151,6 +163,7 @@ public class RelatorioVendasComissao extends Relatorio {
relatorioVendaComissao.setNumAsiento(rset.getString("NUMASIENTO"));
relatorioVendaComissao.setPrecioTotalPagado(rset.getBigDecimal("TOTAL"));
relatorioVendaComissao.setFecHorVenta(rset.getDate("FECHORVENTA"));
relatorioVendaComissao.setNombPuntoVenta(rset.getString("NOMBPUNTOVENTA"));
lsDadosRelatorioCancelamento.add(relatorioVendaComissao);
}
@ -206,6 +219,9 @@ public class RelatorioVendasComissao extends Relatorio {
if(empresaId != null){
stmt.setInt("EMPRESA_ID", empresaId);
}
if (puntoVenta != null) {
stmt.setInt("puntoVentaId", puntoVenta.getPuntoventaId());
}
return stmt;
}
@ -219,15 +235,13 @@ public class RelatorioVendasComissao extends Relatorio {
.append("FROM CAJA C ")
.append("JOIN PUNTO_VENTA PV ON PV.PUNTOVENTA_ID = C.PUNTOVENTA_ID ")
.append("JOIN MARCA M ON M.MARCA_ID = C.MARCA_ID ")
.append("LEFT JOIN PUNTO_VENTA PV1 ON PV1.PUNTOVENTA_ID = C.PTOVTAVENTA_ID ");
.append("LEFT JOIN PUNTO_VENTA PV1 ON PV1.PUNTOVENTA_ID = C.PTOVTAVENTA_ID ")
.append("WHERE ((C.INDSTATUSBOLETO = 'V' AND C.INDREIMPRESION = 0) ")
.append("OR (C.INDSTATUSBOLETO = 'T' AND C.INDREIMPRESION = 0) ")
.append("OR (C.INDCANCELACION = 1 AND C.INDSTATUSBOLETO = 'C')) ");
if (apenasCancelados) {
sQuery.append(" WHERE (C.INDCANCELACION = 1 AND C.INDSTATUSBOLETO = 'C') ");
} else {
sQuery.append("WHERE ((C.INDSTATUSBOLETO = 'V' AND C.INDREIMPRESION = 0)"
+ " OR (C.INDSTATUSBOLETO = 'T' AND C.INDREIMPRESION = 0) "
+ "OR (C.INDCANCELACION = 1 AND C.INDSTATUSBOLETO = 'C')) ");
if (puntoVenta != null) {
sQuery.append("AND C.PUNTOVENTA_ID = :puntoVentaId ");
}
sQuery.append("AND C.FECHORVENTA BETWEEN :fecInicio AND :fecFinal ");
@ -244,17 +258,24 @@ public class RelatorioVendasComissao extends Relatorio {
StringBuilder sQuery = new StringBuilder();
sQuery.append("SELECT C.NUMFOLIOSISTEMA, C.CORRIDA_ID, C.FECHORVIAJE, C.NUMASIENTO, C.PRECIOPAGADO, C.FECHORVENTA, ")
sQuery.append("SELECT C.NUMFOLIOSISTEMA, C.CORRIDA_ID, C.FECHORVIAJE, C.NUMASIENTO, C.PRECIOPAGADO, C.FECHORVENTA, PV.NOMBPUNTOVENTA, ")
.append("(COALESCE (C.PRECIOPAGADO,0) + COALESCE (C.IMPORTETAXAEMBARQUE,0) + COALESCE (C.IMPORTESEGURO,0) + COALESCE (C.IMPORTEPEDAGIO,0) + COALESCE (C.IMPORTEOUTROS,0)) AS TOTAL ")
.append("FROM CAJA C ")
.append("JOIN MARCA M ON M.MARCA_ID = C.MARCA_ID ")
.append("WHERE C.INDCANCELACION = 1 AND C.INDSTATUSBOLETO = 'C' ");
.append("JOIN PUNTO_VENTA PV ON PV.PUNTOVENTA_ID = C.PUNTOVENTA_ID ")
.append("WHERE C.INDSTATUSBOLETO = 'C' ")
.append("AND ((C.MOTIVOCANCELACION_ID IN(32, 10) AND C.INDREIMPRESION = 0) ")
.append("OR (C.MOTIVOCANCELACION_ID = 99 AND C.INDREIMPRESION = 1)) ");
sQuery.append("AND C.FECHORVENTA BETWEEN :fecInicio AND :fecFinal ");
if(parametros.get("EMPRESA_ID")!= null) {
sQuery.append("AND M.EMPRESA_ID =:EMPRESA_ID ");
}
if (puntoVenta != null) {
sQuery.append("AND C.PUNTOVENTA_ID = :puntoVentaId ");
}
return sQuery.toString();
}

View File

@ -19,3 +19,5 @@ label.fecHorViaje=Data Servicio
label.numAsiento=Número de Asiento
label.precioTotalPagado=Valor de Entradas
label.fecHorVenta=Fecha de Regreso
label.puntoVenta=Agência
label.nombPuntoVenta=Nome Agência

View File

@ -19,3 +19,5 @@ label.fecHorViaje=Data do Servi
label.numAsiento=Poltrona
label.precioTotalPagado=Valor do Bilhete
label.fecHorVenta=Data da Devolução
label.puntoVenta=Agência
label.nombPuntoVenta=Nome Agência

View File

@ -21,3 +21,4 @@ label.totalTaxasVendasCanceladas=Taxas Anula
label.totalVendasDevolucao=Devolução
label.totalTaxasVendasDevolucao=Taxas Devolução
label.total=Total
label.puntoVenta=Agência:

View File

@ -21,3 +21,4 @@ label.totalTaxasVendasCanceladas=Taxas Anula
label.totalVendasDevolucao=Devolução
label.totalTaxasVendasDevolucao=Taxas Devolução
label.total=Total
label.puntoVenta=Agência:

View File

@ -7,7 +7,7 @@
<parameter name="fecFinal" class="java.lang.String"/>
<parameter name="noDataRelatorio" class="java.lang.String"/>
<parameter name="empresa" class="java.lang.String"/>
<parameter name="apenasCancelados" class="java.lang.Boolean"/>
<parameter name="nombPuntoVenta" class="java.lang.String"/>
<queryString>
<![CDATA[]]>
</queryString>
@ -74,11 +74,14 @@
<text><![CDATA[Empresa:]]></text>
</staticText>
<textField>
<reportElement uuid="f1811f21-420c-4faf-87d2-2d46e1b74118" x="0" y="61" width="139" height="20"/>
<textElement>
<font isBold="true" pdfFontName="Helvetica-Bold"/>
</textElement>
<textFieldExpression><![CDATA[$P{apenasCancelados} ? "Apenas cancelamentos" : ""]]></textFieldExpression>
<reportElement uuid="1a29d731-e121-4507-8c0b-e93f437e8d80" x="0" y="61" width="53" height="20"/>
<textElement/>
<textFieldExpression><![CDATA[$R{label.puntoVenta}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="53d53aa5-d8c9-43c6-b17d-1e6b49697237" x="53" y="61" width="100" height="20"/>
<textElement/>
<textFieldExpression><![CDATA[$P{nombPuntoVenta}]]></textFieldExpression>
</textField>
</band>
</title>

View File

@ -1,13 +1,13 @@
<?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="RelatorioVendasComissao" pageWidth="842" pageHeight="595" orientation="Landscape" whenNoDataType="NoDataSection" columnWidth="802" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="84b9dfcf-8ec5-4f51-80cc-7339e3b158b4">
<property name="ireport.zoom" value="1.0"/>
<property name="ireport.x" value="91"/>
<property name="ireport.y" value="0"/>
<property name="ireport.zoom" value="1.5"/>
<property name="ireport.x" value="0"/>
<property name="ireport.y" value="32"/>
<parameter name="fecInicio" class="java.lang.String"/>
<parameter name="fecFinal" class="java.lang.String"/>
<parameter name="noDataRelatorio" class="java.lang.String"/>
<parameter name="empresa" class="java.lang.String"/>
<parameter name="apenasCancelados" class="java.lang.Boolean"/>
<parameter name="nombPuntoVenta" class="java.lang.String"/>
<queryString>
<![CDATA[]]>
</queryString>
@ -17,6 +17,7 @@
<field name="numAsiento" class="java.lang.String"/>
<field name="precioTotalPagado" class="java.math.BigDecimal"/>
<field name="fecHorVenta" class="java.util.Date"/>
<field name="nombPuntoVenta" class="java.lang.String"/>
<variable name="vPrecioTotalPagado" class="java.math.BigDecimal" calculation="Sum">
<variableExpression><![CDATA[$F{precioTotalPagado}]]></variableExpression>
</variable>
@ -26,47 +27,52 @@
<title>
<band height="81" splitType="Stretch">
<textField>
<reportElement x="0" y="0" width="620" height="20" uuid="43b2c28d-4760-4890-b00d-25e931e79c74"/>
<reportElement uuid="43b2c28d-4760-4890-b00d-25e931e79c74" x="0" y="0" width="620" height="20"/>
<textElement markup="none">
<font size="14" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[$R{cabecalho.nome}]]></textFieldExpression>
</textField>
<textField pattern="dd/MM/yyyy HH:mm">
<reportElement x="638" y="0" width="164" height="20" uuid="4d1bcd65-c9a6-44b4-8dca-cc3c4c20c9a5"/>
<reportElement uuid="4d1bcd65-c9a6-44b4-8dca-cc3c4c20c9a5" x="638" y="0" width="164" height="20"/>
<textElement textAlignment="Right">
<font isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[new java.util.Date()]]></textFieldExpression>
</textField>
<textField>
<reportElement x="0" y="20" width="620" height="20" uuid="fd05bd35-30d9-4baf-aa56-f8e5d3c3268b"/>
<reportElement uuid="fd05bd35-30d9-4baf-aa56-f8e5d3c3268b" x="0" y="20" width="620" height="20"/>
<textElement>
<font isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[$R{cabecalho.periodo} + " " + $P{fecInicio} + " " + $R{cabecalho.periodoA} + " " + $P{fecFinal}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="53" y="41" width="139" height="20" uuid="8fa1c53b-1da7-4d4d-a75c-ab1543acae2a"/>
<reportElement uuid="8fa1c53b-1da7-4d4d-a75c-ab1543acae2a" x="53" y="41" width="139" height="20"/>
<textElement/>
<textFieldExpression><![CDATA[$P{empresa}]]></textFieldExpression>
</textField>
<staticText>
<reportElement x="0" y="41" width="53" height="20" uuid="a91f6081-4740-4e36-8965-41b6cde4cc20"/>
<reportElement uuid="a91f6081-4740-4e36-8965-41b6cde4cc20" x="0" y="41" width="53" height="20"/>
<textElement/>
<text><![CDATA[Empresa:]]></text>
</staticText>
<textField>
<reportElement x="0" y="61" width="139" height="20" uuid="f1811f21-420c-4faf-87d2-2d46e1b74118"/>
<textElement>
<font isBold="true" pdfFontName="Helvetica-Bold"/>
</textElement>
<textFieldExpression><![CDATA[$P{apenasCancelados} ? "Apenas cancelamentos" : ""]]></textFieldExpression>
<reportElement uuid="96d6ce56-5bf3-460a-b3ba-a81890a2caed" x="0" y="61" width="53" height="20"/>
<textElement/>
<textFieldExpression><![CDATA[$R{label.puntoVenta}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="b75cac86-9c93-40ec-b667-afd66f26103d" x="53" y="61" width="139" height="20"/>
<textElement/>
<textFieldExpression><![CDATA[$P{nombPuntoVenta}]]></textFieldExpression>
</textField>
</band>
</title>
<pageHeader>
<band height="21" splitType="Stretch">
<textField>
<reportElement x="607" y="0" width="195" height="20" uuid="6a8a0843-7236-40a3-98ae-5fbf59b4cfec"/>
<reportElement uuid="6a8a0843-7236-40a3-98ae-5fbf59b4cfec" x="607" y="0" width="195" height="20"/>
<textElement textAlignment="Right">
<font isBold="true"/>
</textElement>
@ -77,62 +83,82 @@
<columnHeader>
<band height="23" splitType="Stretch">
<textField>
<reportElement x="0" y="0" width="102" height="20" uuid="a3dea313-f2a7-4388-bd91-5c02e8612b8e"/>
<reportElement uuid="a3dea313-f2a7-4388-bd91-5c02e8612b8e" x="0" y="0" width="102" height="20"/>
<textElement/>
<textFieldExpression><![CDATA[$R{label.numFolioSistema}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="721" y="0" width="80" height="20" uuid="a2ea7cea-d8ab-4c0e-bee0-4dafb3866c1f"/>
<reportElement uuid="a2ea7cea-d8ab-4c0e-bee0-4dafb3866c1f" x="721" y="0" width="80" height="20"/>
<textElement textAlignment="Right"/>
<textFieldExpression><![CDATA[$R{label.precioTotalPagado}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="556" y="0" width="120" height="20" uuid="43d6ee75-8459-4b9e-8cbe-ca2819d3198a"/>
<reportElement uuid="43d6ee75-8459-4b9e-8cbe-ca2819d3198a" x="580" y="0" width="120" height="20"/>
<textElement/>
<textFieldExpression><![CDATA[$R{label.fecHorVenta}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="263" y="1" width="80" height="20" uuid="2d666aaf-65a6-4c3f-acd3-e65483a78256"/>
<reportElement uuid="2d666aaf-65a6-4c3f-acd3-e65483a78256" x="357" y="1" width="80" height="20"/>
<textElement/>
<textFieldExpression><![CDATA[$R{label.numAsiento}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="388" y="1" width="120" height="20" uuid="8a39b1b1-6ebd-4f33-adea-c28a9988eaae"/>
<reportElement uuid="8a39b1b1-6ebd-4f33-adea-c28a9988eaae" x="437" y="1" width="120" height="20"/>
<textElement/>
<textFieldExpression><![CDATA[$R{label.fecHorViaje}]]></textFieldExpression>
</textField>
<line>
<reportElement positionType="Float" x="0" y="21" width="802" height="1" uuid="811af238-a027-48e9-bd6f-eee885474929"/>
<reportElement uuid="811af238-a027-48e9-bd6f-eee885474929" positionType="Float" x="0" y="21" width="802" height="1"/>
</line>
<textField>
<reportElement x="129" y="0" width="100" height="20" uuid="cfac237e-06b7-4c98-b7f1-285f5ec2c8b3"/>
<reportElement uuid="cfac237e-06b7-4c98-b7f1-285f5ec2c8b3" x="122" y="0" width="100" height="20"/>
<textElement/>
<textFieldExpression><![CDATA[$R{label.corridaId}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="fba2b82b-5c64-4262-9f82-6a96f3c8f74e" x="244" y="0" width="112" height="20"/>
<textElement/>
<textFieldExpression><![CDATA[$R{label.nombPuntoVenta}]]></textFieldExpression>
</textField>
</band>
</columnHeader>
<detail>
<band height="22" splitType="Stretch">
<textField isStretchWithOverflow="true" pattern="#,##0.00" isBlankWhenNull="true">
<reportElement stretchType="RelativeToTallestObject" x="721" y="0" width="80" height="20" isPrintWhenDetailOverflows="true" uuid="b18fae2e-6454-42b0-a68c-04cf790ddfd6"/>
<reportElement uuid="b18fae2e-6454-42b0-a68c-04cf790ddfd6" stretchType="RelativeToTallestObject" x="721" y="0" width="80" height="20" isPrintWhenDetailOverflows="true"/>
<textElement textAlignment="Right"/>
<textFieldExpression><![CDATA[$F{precioTotalPagado}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement stretchType="RelativeToTallestObject" x="129" y="0" width="100" height="20" isPrintWhenDetailOverflows="true" uuid="cebb836f-d485-4d50-98e0-0678bb715fb9"/>
<reportElement uuid="cebb836f-d485-4d50-98e0-0678bb715fb9" stretchType="RelativeToTallestObject" x="122" y="0" width="100" height="20" isPrintWhenDetailOverflows="true"/>
<textElement/>
<textFieldExpression><![CDATA[$F{corridaId}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" pattern="#,##0.00" isBlankWhenNull="true">
<reportElement stretchType="RelativeToTallestObject" x="263" y="1" width="80" height="20" isPrintWhenDetailOverflows="true" uuid="09b0cd36-1946-406f-923a-172b8a4f1ac6"/>
<reportElement uuid="09b0cd36-1946-406f-923a-172b8a4f1ac6" stretchType="RelativeToTallestObject" x="357" y="1" width="80" height="20" isPrintWhenDetailOverflows="true"/>
<textElement/>
<textFieldExpression><![CDATA[$F{numAsiento}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" pattern="dd/MM/yyyy h.mm a" isBlankWhenNull="true">
<reportElement stretchType="RelativeToTallestObject" x="388" y="1" width="120" height="20" isPrintWhenDetailOverflows="true" uuid="8cdbdd14-c9f1-45d8-bf41-a4066930f5a4"/>
<reportElement uuid="8cdbdd14-c9f1-45d8-bf41-a4066930f5a4" stretchType="RelativeToTallestObject" x="437" y="1" width="120" height="20" isPrintWhenDetailOverflows="true"/>
<textElement/>
<textFieldExpression><![CDATA[$F{fecHorViaje}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement stretchType="RelativeToTallestObject" x="0" y="0" width="102" height="20" isPrintWhenDetailOverflows="true" uuid="c98526c0-c36f-42df-9308-452ac671044c"/>
<reportElement uuid="c98526c0-c36f-42df-9308-452ac671044c" stretchType="RelativeToTallestObject" x="0" y="0" width="102" height="20" isPrintWhenDetailOverflows="true"/>
<textElement/>
<textFieldExpression><![CDATA[$F{numFolioSistema}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" pattern="dd/MM/yyyy h.mm a" isBlankWhenNull="true">
<reportElement stretchType="RelativeToTallestObject" x="556" y="0" width="120" height="20" isPrintWhenDetailOverflows="true" uuid="040c8de3-f836-40bc-96bd-761a7f5b46ef"/>
<reportElement uuid="040c8de3-f836-40bc-96bd-761a7f5b46ef" stretchType="RelativeToTallestObject" x="580" y="0" width="120" height="20" isPrintWhenDetailOverflows="true"/>
<textElement/>
<textFieldExpression><![CDATA[$F{fecHorVenta}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement uuid="d3e27fd7-7159-4d76-8cc7-d346ecc188d4" stretchType="RelativeToTallestObject" x="244" y="0" width="112" height="20" isPrintWhenDetailOverflows="true"/>
<textElement/>
<textFieldExpression><![CDATA[$F{nombPuntoVenta}]]></textFieldExpression>
</textField>
</band>
</detail>
<columnFooter>
@ -144,15 +170,15 @@
<summary>
<band height="26" splitType="Stretch">
<line>
<reportElement positionType="Float" x="0" y="2" width="802" height="1" uuid="c8dfd524-14cc-454c-afc0-3ce9f8d0ead8"/>
<reportElement uuid="c8dfd524-14cc-454c-afc0-3ce9f8d0ead8" positionType="Float" x="0" y="2" width="802" height="1"/>
</line>
<textField>
<reportElement x="104" y="5" width="615" height="20" uuid="38a0f957-1b50-46f9-b79f-c631baf8937b"/>
<reportElement uuid="38a0f957-1b50-46f9-b79f-c631baf8937b" x="104" y="5" width="615" height="20"/>
<textElement textAlignment="Right"/>
<textFieldExpression><![CDATA[$R{label.total}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" pattern="#,##0.00" isBlankWhenNull="true">
<reportElement stretchType="RelativeToTallestObject" x="721" y="5" width="80" height="20" isPrintWhenDetailOverflows="true" uuid="f22b1a6f-2e0b-4771-acf3-b7460874f730"/>
<reportElement uuid="f22b1a6f-2e0b-4771-acf3-b7460874f730" stretchType="RelativeToTallestObject" x="721" y="5" width="80" height="20" isPrintWhenDetailOverflows="true"/>
<textElement textAlignment="Right">
<font isBold="true"/>
</textElement>
@ -163,7 +189,7 @@
<noData>
<band height="24">
<textField isBlankWhenNull="true">
<reportElement positionType="Float" x="0" y="0" width="555" height="20" isPrintWhenDetailOverflows="true" uuid="d7df66c6-4dc0-4f3b-88f4-b22094d29091"/>
<reportElement uuid="d7df66c6-4dc0-4f3b-88f4-b22094d29091" positionType="Float" x="0" y="0" width="555" height="20" isPrintWhenDetailOverflows="true"/>
<textElement verticalAlignment="Middle"/>
<textFieldExpression><![CDATA[$R{msg.noData}]]></textFieldExpression>
</textField>

View File

@ -17,6 +17,8 @@ public class RelatorioVendasComissaoCancelamentoBean {
private Date fecHorVenta;
private String nombPuntoVenta;
public String getNumFolioSistema() {
return numFolioSistema;
}
@ -65,4 +67,12 @@ public class RelatorioVendasComissaoCancelamentoBean {
this.fecHorVenta = fecHorVenta;
}
public String getNombPuntoVenta() {
return nombPuntoVenta;
}
public void setNombPuntoVenta(String nombPuntoVenta) {
this.nombPuntoVenta = nombPuntoVenta;
}
}

View File

@ -20,11 +20,13 @@ import org.zkoss.zul.Comboitem;
import org.zkoss.zul.Datebox;
import com.rjconsultores.ventaboletos.entidad.Empresa;
import com.rjconsultores.ventaboletos.entidad.PuntoVenta;
import com.rjconsultores.ventaboletos.relatorios.impl.RelatorioVendasComissao;
import com.rjconsultores.ventaboletos.relatorios.utilitarios.Relatorio;
import com.rjconsultores.ventaboletos.service.EmpresaService;
import com.rjconsultores.ventaboletos.utilerias.DateUtil;
import com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar;
import com.rjconsultores.ventaboletos.web.utilerias.MyComboboxPuntoVenta;
import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer;
@Controller("relatorioVendasComissaoController")
@ -45,6 +47,7 @@ public class RelatorioVendasComissaoController extends MyGenericForwardComposer
private Datebox dataInicial;
private Datebox dataFinal;
private Checkbox chkApenasCancelados;
private MyComboboxPuntoVenta cmbPuntoVenta;
@Override
public void doAfterCompose(Component comp) throws Exception {
@ -78,6 +81,13 @@ public class RelatorioVendasComissaoController extends MyGenericForwardComposer
parametros.put("apenasCancelados", chkApenasCancelados.isChecked());
Comboitem cmbItemPuntoVenta = cmbPuntoVenta.getSelectedItem();
if (cmbItemPuntoVenta != null) {
PuntoVenta puntoVenta = (PuntoVenta) cmbItemPuntoVenta.getValue();
parametros.put("puntoVenta", puntoVenta);
parametros.put("nombPuntoVenta", puntoVenta.getNombpuntoventa());
}
Relatorio relatorio = new RelatorioVendasComissao(parametros, dataSourceRead.getConnection());
Map<String, Object> args = new HashMap<String, Object>();