diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/impl/RelatorioDepositosDetalhado.java b/src/java/com/rjconsultores/ventaboletos/relatorios/impl/RelatorioDepositosDetalhado.java index 8b9786019..8a1dd7110 100644 --- a/src/java/com/rjconsultores/ventaboletos/relatorios/impl/RelatorioDepositosDetalhado.java +++ b/src/java/com/rjconsultores/ventaboletos/relatorios/impl/RelatorioDepositosDetalhado.java @@ -13,6 +13,7 @@ import java.util.Map; import org.apache.log4j.Logger; +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.RelatorioDepositosDetalhadosBean; @@ -34,6 +35,7 @@ public class RelatorioDepositosDetalhado extends Relatorio { private Timestamp fecFinal; private Integer marcaId; private Integer instFinanceira; + private PuntoVenta puntoVenta; public RelatorioDepositosDetalhado(Map parametros, Connection conexao) throws Exception { super(parametros, conexao); @@ -51,6 +53,10 @@ public class RelatorioDepositosDetalhado extends Relatorio { if (parametros.get("INST_FINANCEIRA") != null) { instFinanceira = Integer.valueOf(parametros.get("INST_FINANCEIRA").toString()); } + + if (parametros.get("puntoVenta") != null) { + puntoVenta = (PuntoVenta) parametros.get("puntoVenta"); + } Connection conexao = this.relatorio.getConexao(); processarDepositosDetalhados(conexao); @@ -123,7 +129,7 @@ public class RelatorioDepositosDetalhado extends Relatorio { lsDadosRelatorio.add(relatorioDepositosDetalhadosBean); } } - + protected String getSqlPacotes() { StringBuilder sQuery = new StringBuilder(); @@ -172,6 +178,9 @@ public class RelatorioDepositosDetalhado extends Relatorio { if (parametros.get("INST_FINANCEIRA") != null) { sQuery.append(" and if.INSTIFINANCEIRA_ID =:INST_FINANCEIRA "); } + if (puntoVenta != null) { + sQuery.append("and pv.PUNTOVENTA_ID = " + puntoVenta.getPuntoventaId()); + } sQuery.append(" and FD.FECCREACION between :fecInicio and :fecFinal"); sQuery.append(" GROUP BY "); sQuery.append(" fd.FECHAMENTODEPOSITO_ID, "); diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/internacionalizacao/RelatorioDepositosDetalhado_es.properties b/src/java/com/rjconsultores/ventaboletos/relatorios/internacionalizacao/RelatorioDepositosDetalhado_es.properties index 7dd40d0d9..e8d0adc42 100644 --- a/src/java/com/rjconsultores/ventaboletos/relatorios/internacionalizacao/RelatorioDepositosDetalhado_es.properties +++ b/src/java/com/rjconsultores/ventaboletos/relatorios/internacionalizacao/RelatorioDepositosDetalhado_es.properties @@ -20,4 +20,5 @@ label.fechaInclusion=Fec. Inclusion label.banco=Banco label.numConta=Cuenta label.numAgencia=Agencia -label.valorDeposito=Valor \ No newline at end of file +label.valorDeposito=Valor +label.puntoVenta=Punto Venta \ No newline at end of file diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/internacionalizacao/RelatorioDepositosDetalhado_pt_BR.properties b/src/java/com/rjconsultores/ventaboletos/relatorios/internacionalizacao/RelatorioDepositosDetalhado_pt_BR.properties index 54ad61783..964739104 100644 --- a/src/java/com/rjconsultores/ventaboletos/relatorios/internacionalizacao/RelatorioDepositosDetalhado_pt_BR.properties +++ b/src/java/com/rjconsultores/ventaboletos/relatorios/internacionalizacao/RelatorioDepositosDetalhado_pt_BR.properties @@ -20,4 +20,5 @@ label.fechaInclusion=Dt. Inclus label.banco=Banco label.numConta=Conta label.numAgencia=Ag\u00EAncia -label.valorDeposito=Valor \ No newline at end of file +label.valorDeposito=Valor +label.puntoVenta=Agência \ No newline at end of file diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioDepositosDetalhado.jasper b/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioDepositosDetalhado.jasper index cac0f1822..372d08ae5 100644 Binary files a/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioDepositosDetalhado.jasper and b/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioDepositosDetalhado.jasper differ diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioDepositosDetalhado.jrxml b/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioDepositosDetalhado.jrxml index 50e5a3033..f6e01f2db 100644 --- a/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioDepositosDetalhado.jrxml +++ b/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioDepositosDetalhado.jrxml @@ -1,13 +1,14 @@ - + + @@ -58,7 +59,7 @@ - <band height="82" splitType="Stretch"> + <band height="110" splitType="Stretch"> <textField> <reportElement uuid="43b2c28d-4760-4890-b00d-25e931e79c74" x="0" y="0" width="620" height="20"/> <textElement markup="none"> @@ -81,25 +82,37 @@ <textFieldExpression><![CDATA[$R{cabecalho.periodo} + " " + $P{fecInicio} + " " + $R{cabecalho.periodoA} + " " + $P{fecFinal}]]></textFieldExpression> </textField> <textField> - <reportElement uuid="8fa1c53b-1da7-4d4d-a75c-ab1543acae2a" x="53" y="41" width="263" height="20"/> + <reportElement uuid="8fa1c53b-1da7-4d4d-a75c-ab1543acae2a" x="60" y="41" width="263" height="20"/> <textElement/> <textFieldExpression><![CDATA[$P{empresa}]]></textFieldExpression> </textField> <staticText> - <reportElement uuid="a91f6081-4740-4e36-8965-41b6cde4cc20" x="0" y="41" width="53" height="20"/> + <reportElement uuid="a91f6081-4740-4e36-8965-41b6cde4cc20" x="0" y="41" width="60" height="20"/> <textElement/> <text><![CDATA[Empresa:]]></text> </staticText> <textField> - <reportElement uuid="a0d7c1c5-7a17-477e-929a-b0d9665b409c" x="53" y="61" width="263" height="20"/> + <reportElement uuid="a0d7c1c5-7a17-477e-929a-b0d9665b409c" x="60" y="61" width="263" height="20"/> <textElement/> <textFieldExpression><![CDATA[$P{banco}]]></textFieldExpression> </textField> <staticText> - <reportElement uuid="2a1c0967-7154-4aa5-bc93-577d682a1e5a" x="0" y="61" width="53" height="20"/> + <reportElement uuid="2a1c0967-7154-4aa5-bc93-577d682a1e5a" x="0" y="61" width="60" height="20"/> <textElement/> <text><![CDATA[Banco:]]></text> </staticText> + <textField> + <reportElement uuid="d65cc40d-662b-4159-b0ed-a1b5b3148d30" x="0" y="81" width="60" height="20"/> + <textElement/> + <textFieldExpression><![CDATA[$R{label.puntoVenta}]]></textFieldExpression> + </textField> + <textField> + <reportElement uuid="d5a28828-ff2f-407c-b0b3-7c9154a27d5d" x="60" y="81" width="181" height="20"/> + <textElement> + <font isBold="true"/> + </textElement> + <textFieldExpression><![CDATA[$P{nombPuntoVenta}]]></textFieldExpression> + </textField> </band> diff --git a/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/relatorios/RelatorioDepositosDetalhadosController.java b/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/relatorios/RelatorioDepositosDetalhadosController.java index 99c55db5a..6a57ab341 100644 --- a/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/relatorios/RelatorioDepositosDetalhadosController.java +++ b/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/relatorios/RelatorioDepositosDetalhadosController.java @@ -24,12 +24,14 @@ import org.zkoss.zul.Messagebox; import com.rjconsultores.ventaboletos.entidad.Empresa; import com.rjconsultores.ventaboletos.entidad.InstiFinanceira; +import com.rjconsultores.ventaboletos.entidad.PuntoVenta; import com.rjconsultores.ventaboletos.relatorios.impl.RelatorioDepositosDetalhado; import com.rjconsultores.ventaboletos.relatorios.utilitarios.Relatorio; import com.rjconsultores.ventaboletos.service.EmpresaService; import com.rjconsultores.ventaboletos.service.InstiFinanceiraService; 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; /** @@ -53,6 +55,7 @@ private static final long serialVersionUID = 1L; private MyComboboxEstandar cmbEmpresa; private List lsEmpresa; + private MyComboboxPuntoVenta cmbPuntoVenta; private MyComboboxEstandar cmbBanco; private List lsBanco; @@ -99,6 +102,7 @@ private static final long serialVersionUID = 1L; } else{ parametros.put("empresa", "Todas;"); } + Comboitem itemBanco = cmbBanco.getSelectedItem(); if (itemBanco != null) { InstiFinanceira banco = (InstiFinanceira) itemBanco.getValue(); @@ -108,6 +112,15 @@ private static final long serialVersionUID = 1L; parametros.put("banco", "Todos;"); } + Comboitem cmbItemPuntoVenta = cmbPuntoVenta.getSelectedItem(); + if (cmbItemPuntoVenta != null) { + PuntoVenta puntoVenta = (PuntoVenta) cmbItemPuntoVenta.getValue(); + parametros.put("puntoVenta", puntoVenta); + parametros.put("nombPuntoVenta", puntoVenta.getNombpuntoventa()); + } else { + parametros.put("nombPuntoVenta", "Todos;"); + } + Relatorio relatorio = new RelatorioDepositosDetalhado(parametros, dataSourceRead.getConnection()); Map args = new HashMap(); diff --git a/web/WEB-INF/i3-label_es_MX.label b/web/WEB-INF/i3-label_es_MX.label index d4df75533..2d90c99d9 100644 --- a/web/WEB-INF/i3-label_es_MX.label +++ b/web/WEB-INF/i3-label_es_MX.label @@ -6445,6 +6445,7 @@ relatorioDepositosDetalhadosController.lbEmpresa.value = Empresa relatorioDepositosDetalhadosController.lbBanco.value = Banco relatorioDepositosDetalhadosController.window.title=Depositos Detallados relatorioDepositosDetalhadosController.MSG.busquedaPeriodo = Fecha de inicio retrasado hasta la fecha final. +relatorioDepositosDetalhadosController.lbPuntoVenta=Punto Venta # Calculo Comissao busquedaCalculoComissaoController.window.title = Cálculo de Comisión diff --git a/web/WEB-INF/i3-label_pt_BR.label b/web/WEB-INF/i3-label_pt_BR.label index 2b62a9d7a..490fd4ef9 100644 --- a/web/WEB-INF/i3-label_pt_BR.label +++ b/web/WEB-INF/i3-label_pt_BR.label @@ -6636,6 +6636,7 @@ relatorioDepositosDetalhadosController.lbEmpresa.value = Empresa relatorioDepositosDetalhadosController.lbBanco.value = Banco relatorioDepositosDetalhadosController.window.title=Depósitos Detalhados relatorioDepositosDetalhadosController.MSG.busquedaPeriodo = Data de início posterior a data Final. +relatorioDepositosDetalhadosController.lbPuntoVenta=Agência # Calculo Comissao busquedaCalculoComissaoController.window.title = Cálculo de Comissão diff --git a/web/gui/relatorios/filtroRelatorioDepositosDetalhados.zul b/web/gui/relatorios/filtroRelatorioDepositosDetalhados.zul index f841430dd..5b69df016 100644 --- a/web/gui/relatorios/filtroRelatorioDepositosDetalhados.zul +++ b/web/gui/relatorios/filtroRelatorioDepositosDetalhados.zul @@ -36,6 +36,10 @@ use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar" model="@{winFiltroRelatorioDepositosDetalhados$composer.lsEmpresa}" width="95%" /> +