From bec1c4af5545ddb97eaf0700db55298e1eba139c Mon Sep 17 00:00:00 2001 From: "alexandre.lima" Date: Thu, 20 Jul 2017 11:36:34 +0000 Subject: [PATCH] Fixes Bug #0009366 git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@71605 d1611594-4594-4d17-8e1d-87c2c4800839 --- .../impl/RelatorioFormaPagamentoAgencia.java | 102 ++++++++++ ...orioFormaPagamentoAgencia_pt_BR.properties | 1 + .../RelatorioFormaPagamentoAgencia.jasper | Bin 0 -> 27320 bytes .../RelatorioFormaPagamentoAgencia.jrxml | 175 ++++++++++++++++++ .../FormaPagamentoAgenciaController.java | 147 +++++++++++++++ ...temMenuRelatorioFormaPagamentoAgencia.java | 25 +++ .../menu/item/tarifas/ItemMenuSeguroKm.java | 4 +- .../item/tarifasOficial/ItemMenuSeguroKm.java | 5 +- .../utilerias/menu/menu_original.properties | 1 + web/WEB-INF/i3-label_es_MX.label | 8 +- web/WEB-INF/i3-label_pt_BR.label | 12 +- .../formaPagamentoAgencia.zul | 55 ++++++ 12 files changed, 522 insertions(+), 13 deletions(-) create mode 100644 src/java/com/rjconsultores/ventaboletos/relatorios/impl/RelatorioFormaPagamentoAgencia.java create mode 100644 src/java/com/rjconsultores/ventaboletos/relatorios/internacionalizacao/RelatorioFormaPagamentoAgencia_pt_BR.properties create mode 100644 src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioFormaPagamentoAgencia.jasper create mode 100644 src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioFormaPagamentoAgencia.jrxml create mode 100644 src/java/com/rjconsultores/ventaboletos/web/gui/controladores/financeiro/FormaPagamentoAgenciaController.java create mode 100644 src/java/com/rjconsultores/ventaboletos/web/utilerias/menu/item/relatorios/ItemMenuRelatorioFormaPagamentoAgencia.java create mode 100644 web/gui/informes/formaPagamentoAgencia/formaPagamentoAgencia.zul diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/impl/RelatorioFormaPagamentoAgencia.java b/src/java/com/rjconsultores/ventaboletos/relatorios/impl/RelatorioFormaPagamentoAgencia.java new file mode 100644 index 000000000..1eafa0cb5 --- /dev/null +++ b/src/java/com/rjconsultores/ventaboletos/relatorios/impl/RelatorioFormaPagamentoAgencia.java @@ -0,0 +1,102 @@ +/** + * + */ +package com.rjconsultores.ventaboletos.relatorios.impl; + +import java.sql.Connection; +import java.sql.ResultSet; +import java.sql.Timestamp; +import java.text.SimpleDateFormat; +import java.util.Calendar; +import java.util.Date; +import java.util.HashMap; +import java.util.Map; + +import com.rjconsultores.ventaboletos.relatorios.utilitarios.ArrayDataSource; +import com.rjconsultores.ventaboletos.utilerias.DateUtil; +import com.rjconsultores.ventaboletos.web.utilerias.NamedParameterStatement; + +/** + * @author Thiago + * + */ +public class RelatorioFormaPagamentoAgencia extends RelatorioDemandas { + public RelatorioFormaPagamentoAgencia(Map parametros, Connection conexao) throws Exception { + super(parametros, conexao); + this.setCustomDataSource(new ArrayDataSource(this) { + @Override + public void initDados() throws Exception { + SimpleDateFormat format = new SimpleDateFormat("dd/MM/yyyy"); + Connection conexao = this.relatorio.getConexao(); + Map parametros = this.relatorio.getParametros(); + + Date dataIncial = (Date) parametros.get("DATA_INICIAL"); + + Date dataFinal = (Date) parametros.get("DATA_FINAL"); + + Integer empresa = (Integer) parametros.get("EMPRESA"); + + Integer agencia = (Integer) parametros.get("AGENCIA"); + + StringBuilder where = new StringBuilder(); + where.append(" WHERE 1 = 1 "); + + if (dataIncial != null) { + where.append(" AND c.fechorventa >= '" + format.format(dataIncial) + "' "); + } + + if (dataFinal != null) { + where.append(" AND c.fechorventa <= '" + format.format(dataFinal) + "' "); + } + + if (empresa != null) { + where.append(" AND c.EMPRESAPUNTOVENTA_ID = " + empresa + " "); + } + + if (agencia != null) { + where.append(" AND pv.PUNTOVENTA_ID = " + agencia + " "); + } + + StringBuilder sql = new StringBuilder(); + sql.append(" select to_char(c.fechorventa, 'dd/mm/yyyy') as data, "); + sql.append(" pv.PUNTOVENTA_ID as agencia, "); + sql.append(" fp.DESCPAGO as forma_pagamento, "); + sql.append(" sum(nvl(c.PRECIOPAGADO,0)) as tarifa, "); + sql.append(" sum(nvl(c.IMPORTEPEDAGIO,0)) as pedagio, "); + sql.append(" sum(nvl(c.IMPORTESEGURO,0)) as seguro, "); + sql.append(" sum(nvl(c.IMPORTETAXAEMBARQUE,0)) as taxa, "); + sql.append(" sum((c.PRECIOPAGADO + c.IMPORTEPEDAGIO + c.IMPORTESEGURO + c.IMPORTETAXAEMBARQUE)) as total, "); + sql.append(" count(c.PRECIOPAGADO) as qtde "); + sql.append(" from caja c "); + sql.append(" join caja_formapago cfp on c.caja_id = cfp.caja_id "); + sql.append(" join forma_pago fp on cfp.formapago_id = fp.formapago_id "); + sql.append(" join punto_venta pv on pv.PUNTOVENTA_ID = c.PUNTOVENTA_ID "); + sql.append(where); + sql.append(" group by to_char(c.fechorventa, 'dd/mm/yyyy'), pv.PUNTOVENTA_ID, fp.DESCPAGO, c.EMPRESAPUNTOVENTA_ID "); + sql.append(" order by data, agencia, forma_pagamento"); + + NamedParameterStatement stmt = new NamedParameterStatement(conexao, sql.toString()); + + ResultSet rset = stmt.executeQuery(); + + while (rset.next()) { + Map dataResult = new HashMap(); + + dataResult.put("DATA", rset.getString("DATA")); + dataResult.put("AGENCIA", rset.getString("AGENCIA")); + dataResult.put("FORMA_PAGAMENTO", rset.getString("FORMA_PAGAMENTO")); + dataResult.put("TARIFA", rset.getString("TARIFA")); + dataResult.put("PEDAGIO", rset.getDouble("PEDAGIO")); + dataResult.put("SEGURO", rset.getDouble("SEGURO")); + dataResult.put("TAXA", rset.getDouble("TAXA")); + dataResult.put("TOTAL", rset.getDouble("TOTAL")); + dataResult.put("QTDE", rset.getInt("QTDE")); + + this.dados.add(dataResult); + } + + this.resultSet = rset; + } + }); + } +} diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/internacionalizacao/RelatorioFormaPagamentoAgencia_pt_BR.properties b/src/java/com/rjconsultores/ventaboletos/relatorios/internacionalizacao/RelatorioFormaPagamentoAgencia_pt_BR.properties new file mode 100644 index 000000000..4c7dfdb6a --- /dev/null +++ b/src/java/com/rjconsultores/ventaboletos/relatorios/internacionalizacao/RelatorioFormaPagamentoAgencia_pt_BR.properties @@ -0,0 +1 @@ +msg.noData=Năo foi possivel obter dados com os parâmetros informados. \ No newline at end of file diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioFormaPagamentoAgencia.jasper b/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioFormaPagamentoAgencia.jasper new file mode 100644 index 0000000000000000000000000000000000000000..acfd4cf5e4a066861bd524cafcf6f6c2ef81ad14 GIT binary patch literal 27320 zcmd^ndz@TFmH)Z(?3r{Xk4ZuVLIU#0gUlp^1R)X9Gt-mw(DR_XCm|DI=*--iY0}f( zbl*uP$O4gou7JW1K~O*zaAoD82$CS^hK)Rapu(#B1Vms_L0Q3{x-Ph@zuoVts{5$v zo9-U}`h7k-N!Pu%PCZV2>(r@JRp;LO-lf_?o|a}ztEDi~a$&NNGxK>fm(5#+7Be%N z%9t%(A~Gf-N&KDkQWaH4X~s}?JeNwF9Z4%`(SqoO$z93TRJJv4=2OXZ>f+>%w7EV? zb5ydP4QHV^=+)tg7rU_Z|Z?4~wY*_>Tk)9x`d)05>MOzg>- zQEJ?g9NIaW2Mog&9Uleut%Z?RO)grcT(mOmnPK$XEQwY}DsK)kTNbS;nbAT`t+9!W zlOdd$7)LolS&qbkyT8VXlOTz>?GzXWy9LuKShRF|$(p)i+%hEP(ud8F)9y{>esUKJv$@v4ND#a`7l%avAD)#~z9^*ItQYT8b91@2l% z#fjyl!tUJqf*hWLjqTK6nd7;1(&92&%atMZO+w{BN7Y(9YE_Gx^?{{YwYGe#wrT@X zv}`g*bSMGMI}blYs^IG5>^qLEiW60LF@>Mz5mfq$3e_f$Va`azTD`us(ySXZS(6M9 zbW}W-PFbOJI=kB(j#9JeL1sQYnai7ng3trY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zhi;|&0Q~*9dl3J=fdTjkI$%HaVU*kJ>?;2ZSybQoJNz#9Shcq%0}=*%jk7TUIfQbr@Cp>-#W zSu|-h(_VD$K4T#kp&z2_j73-i9z(aHqrYr?nC>x7!a8UvJ#3teMafD!XspJX;1v3S zu?_-p8odf3c-zC(FoB8M%bt}I*mG`%a~)FZOk)zjm1Wvah#DbRvP`rDr1|m z-WV{>G|o37#-I^}2H9#1BWBD<8aar~zx~e^oBz+Wjj;z}^KppHWe}UoAvXIUHdjJy z{uW~MX^72dAU2-edB*f+^h|RMQo97@l&qHipfY|&PV)G)z=4FV@ sD-fI4AU1D7Z2kz%2>acl`M#$O`0OAyY7YAfl5-x@g`J@xb!w9TZ!J0H0{{R3 literal 0 HcmV?d00001 diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioFormaPagamentoAgencia.jrxml b/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioFormaPagamentoAgencia.jrxml new file mode 100644 index 000000000..09a735498 --- /dev/null +++ b/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioFormaPagamentoAgencia.jrxml @@ -0,0 +1,175 @@ + + + + + + + + + + + + + + + + + + + + + + + + <band height="102" splitType="Stretch"> + <staticText> + <reportElement uuid="7f9cea32-d0e7-4c05-9efc-233cdd5137ab" x="1" y="39" width="51" height="20"/> + <textElement> + <font isBold="true"/> + </textElement> + <text><![CDATA[PERÍODO:]]></text> + </staticText> + <staticText> + <reportElement uuid="a355fd56-2041-4ca0-b9bd-c3ed0173f704" x="1" y="82" width="66" height="20"/> + <textElement> + <font isBold="true"/> + </textElement> + <text><![CDATA[DATA]]></text> + </staticText> + <staticText> + <reportElement uuid="367cee8b-2874-4078-b9c4-90285e81ec06" x="30" y="0" width="802" height="20"/> + <textElement textAlignment="Center"> + <font size="14" isBold="true"/> + </textElement> + <text><![CDATA[RelatĂłrio de Forma de Pagamento por AgĂȘncia]]></text> + </staticText> + <staticText> + <reportElement uuid="c45a1ecd-8b5e-4bd7-9139-56e0844cea7e" x="165" y="39" width="10" height="20"/> + <textElement> + <font isBold="true"/> + </textElement> + <text><![CDATA[ - ]]></text> + </staticText> + <textField pattern="dd/MM/yyyy"> + <reportElement uuid="07dfa225-148c-4de6-a428-3c91f83c4081" x="80" y="39" width="85" height="20"/> + <textElement/> + <textFieldExpression><![CDATA[$P{DATA_INICIAL}]]></textFieldExpression> + </textField> + <textField pattern="dd/MM/yyyy"> + <reportElement uuid="3948e59f-21d8-47c8-8077-a57af30605c5" x="175" y="39" width="100" height="20"/> + <textElement/> + <textFieldExpression><![CDATA[$P{DATA_FINAL}]]></textFieldExpression> + </textField> + <staticText> + <reportElement uuid="70c670fb-e9a0-49b8-8332-1eb625b27fc6" x="66" y="82" width="132" height="20"/> + <textElement> + <font isBold="true"/> + </textElement> + <text><![CDATA[AGÊNCIA]]></text> + </staticText> + <staticText> + <reportElement uuid="1fee5538-4ea6-478e-b565-0733f1433db8" x="198" y="82" width="91" height="20"/> + <textElement> + <font isBold="true"/> + </textElement> + <text><![CDATA[FORMA DE PAG.]]></text> + </staticText> + <staticText> + <reportElement uuid="aec51c2e-ed8d-47aa-ab7c-77a1f5fc365a" x="594" y="82" width="83" height="20"/> + <textElement> + <font isBold="true"/> + </textElement> + <text><![CDATA[TAXAS]]></text> + </staticText> + <staticText> + <reportElement uuid="6aa29773-39b4-4f17-a08d-e296df7df1b9" x="677" y="81" width="63" height="20"/> + <textElement> + <font isBold="true"/> + </textElement> + <text><![CDATA[TOTAL]]></text> + </staticText> + <staticText> + <reportElement uuid="73e6808f-fb41-4017-b857-2a1611fd8006" x="289" y="81" width="91" height="20"/> + <textElement/> + <text><![CDATA[TARIFA]]></text> + </staticText> + <staticText> + <reportElement uuid="d381d9e7-bb72-431f-af00-3584f9ca9f7b" x="487" y="82" width="107" height="20"/> + <textElement/> + <text><![CDATA[SEGURO]]></text> + </staticText> + <staticText> + <reportElement uuid="97055f24-9341-4ac3-8445-7f2d2ebc76e2" x="380" y="81" width="107" height="20"/> + <textElement/> + <text><![CDATA[PEDÁGIO]]></text> + </staticText> + <staticText> + <reportElement uuid="5a09d3e0-7464-4a7e-8378-544ecfd8d01e" x="740" y="81" width="63" height="20"/> + <textElement> + <font isBold="true"/> + </textElement> + <text><![CDATA[QTDE]]></text> + </staticText> + </band> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/financeiro/FormaPagamentoAgenciaController.java b/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/financeiro/FormaPagamentoAgenciaController.java new file mode 100644 index 000000000..2b5c94439 --- /dev/null +++ b/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/financeiro/FormaPagamentoAgenciaController.java @@ -0,0 +1,147 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +package com.rjconsultores.ventaboletos.web.gui.controladores.financeiro; + +import java.util.Date; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import javax.sql.DataSource; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.annotation.Scope; +import org.springframework.stereotype.Controller; +import org.zkoss.util.resource.Labels; +import org.zkoss.zk.ui.Component; +import org.zkoss.zk.ui.event.Event; +import org.zkoss.zul.Datebox; + +import com.rjconsultores.ventaboletos.entidad.PuntoVenta; +import com.rjconsultores.ventaboletos.entidad.Empresa; +import com.rjconsultores.ventaboletos.relatorios.impl.RelatorioFormaPagamentoAgencia; +import com.rjconsultores.ventaboletos.service.FormaPagamentoAgenciaService; +import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado; +import com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar; +import com.rjconsultores.ventaboletos.web.utilerias.MyComboboxPuntoVenta; +import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer; + +/** + * + * @author Administrador + */ +@Controller("formaPagamentoAgenciaController") +@Scope("prototype") +public class FormaPagamentoAgenciaController extends MyGenericForwardComposer { + + @Autowired + private FormaPagamentoAgenciaService financeiroService; + + @Autowired + private DataSource dataSourceRead; + + private Datebox fecInicio; + private Datebox fecFinal; + + private MyComboboxEstandar cmbEmpresa; + private List lsEmpresas; + + private MyComboboxPuntoVenta cmbAgencia; + + @Override + public void doAfterCompose(Component comp) throws Exception { + + lsEmpresas = UsuarioLogado.getUsuarioLogado().getEmpresa(); + + super.doAfterCompose(comp); + } + + + public MyComboboxPuntoVenta getCmbAgencia() { + return cmbAgencia; + } + + + public void setCmbAgencia(MyComboboxPuntoVenta cmbAgencia) { + this.cmbAgencia = cmbAgencia; + } + + + public FormaPagamentoAgenciaService getFinanceiroService() { + return financeiroService; + } + + public void setFinanceiroService(FormaPagamentoAgenciaService financeiroService) { + this.financeiroService = financeiroService; + } + + public DataSource getDataSourceRead() { + return dataSourceRead; + } + + public void setDataSourceRead(DataSource dataSourceRead) { + this.dataSourceRead = dataSourceRead; + } + + public MyComboboxEstandar getCmbEmpresa() { + return cmbEmpresa; + } + + public void setCmbEmpresa(MyComboboxEstandar cmbEmpresa) { + this.cmbEmpresa = cmbEmpresa; + } + + public List getLsEmpresas() { + return lsEmpresas; + } + + public void setLsEmpresas(List lsEmpresas) { + this.lsEmpresas = lsEmpresas; + } + + public Datebox getFecFinal() { + return fecFinal; + } + + public void setFecFinal(Datebox fecFinal) { + this.fecFinal = fecFinal; + } + + public Datebox getFecInicio() { + return fecInicio; + } + + public void setFecInicio(Datebox fecInicio) { + this.fecInicio = fecInicio; + } + + public void onClick$btnInforme(Event e) throws Exception { + Date dataInicio = fecInicio.getValue(); + Date dataFinal = fecFinal.getValue(); + + Map argsInforme = new HashMap(); + argsInforme.put("DATA_INICIAL", dataInicio); + argsInforme.put("DATA_FINAL", dataFinal); + + if (cmbEmpresa.isValid() && cmbEmpresa.getSelectedItem() != null) { + Integer empresaId = ((Empresa)cmbEmpresa.getSelectedItem().getValue()).getEmpresaId(); + argsInforme.put("EMPRESA", empresaId); + } + + if (cmbAgencia.getSelectedItem() != null) { + Integer agencia = ((PuntoVenta) cmbAgencia.getSelectedItem().getValue()).getPuntoventaId(); + argsInforme.put("AGENCIA", agencia); + } + + RelatorioFormaPagamentoAgencia relatorio = new RelatorioFormaPagamentoAgencia(argsInforme, dataSourceRead.getConnection()); + + Map args = new HashMap(); + args.put("relatorio", relatorio); + + openWindow("/component/reportView.zul", + Labels.getLabel("formaPagamentoAgenciaController.window.title"), args, MODAL); + + } +} diff --git a/src/java/com/rjconsultores/ventaboletos/web/utilerias/menu/item/relatorios/ItemMenuRelatorioFormaPagamentoAgencia.java b/src/java/com/rjconsultores/ventaboletos/web/utilerias/menu/item/relatorios/ItemMenuRelatorioFormaPagamentoAgencia.java new file mode 100644 index 000000000..bbbc5bf8f --- /dev/null +++ b/src/java/com/rjconsultores/ventaboletos/web/utilerias/menu/item/relatorios/ItemMenuRelatorioFormaPagamentoAgencia.java @@ -0,0 +1,25 @@ +package com.rjconsultores.ventaboletos.web.utilerias.menu.item.relatorios; + +import org.zkoss.util.resource.Labels; + +import com.rjconsultores.ventaboletos.web.utilerias.PantallaUtileria; +import com.rjconsultores.ventaboletos.web.utilerias.menu.DefaultItemMenuSistema; + +public class ItemMenuRelatorioFormaPagamentoAgencia extends DefaultItemMenuSistema { + + public ItemMenuRelatorioFormaPagamentoAgencia() { + super("formaPagamentoAgenciaController.mniRelatorioFinanceiro.label"); + } + + @Override + public String getClaveMenu() { + return "COM.RJCONSULTORES.ADMINISTRACION.GUI.RELATORIOS.MENU.RELATORIOFORMAPAGAMENTOAGENCIACONTROLLER"; + } + + @Override + public void ejecutar() { + PantallaUtileria.openWindow("/gui/informes/formaPagamentoAgencia/formaPagamentoAgencia.zul", + Labels.getLabel("formaPagamentoAgenciaController.mniRelatorioFinanceiro.label"), getArgs(), desktop); + } + +} \ No newline at end of file diff --git a/src/java/com/rjconsultores/ventaboletos/web/utilerias/menu/item/tarifas/ItemMenuSeguroKm.java b/src/java/com/rjconsultores/ventaboletos/web/utilerias/menu/item/tarifas/ItemMenuSeguroKm.java index e36b1f5f5..3b1426b3a 100644 --- a/src/java/com/rjconsultores/ventaboletos/web/utilerias/menu/item/tarifas/ItemMenuSeguroKm.java +++ b/src/java/com/rjconsultores/ventaboletos/web/utilerias/menu/item/tarifas/ItemMenuSeguroKm.java @@ -15,7 +15,7 @@ import org.zkoss.util.resource.Labels; public class ItemMenuSeguroKm extends DefaultItemMenuSistema { public ItemMenuSeguroKm() { - super("busquedaSeguroKmController.window.title"); + super("busquedaSeguroKmController.semTpp.window.title"); } @Override @@ -26,7 +26,7 @@ public class ItemMenuSeguroKm extends DefaultItemMenuSistema { @Override public void ejecutar() { PantallaUtileria.openWindow("/gui/tarifas/busquedaSeguroKm.zul", - Labels.getLabel("busquedaSeguroKmController.window.title"), getArgs() ,desktop); + Labels.getLabel("busquedaSeguroKmController.semTpp.window.title"), getArgs() ,desktop); } } diff --git a/src/java/com/rjconsultores/ventaboletos/web/utilerias/menu/item/tarifasOficial/ItemMenuSeguroKm.java b/src/java/com/rjconsultores/ventaboletos/web/utilerias/menu/item/tarifasOficial/ItemMenuSeguroKm.java index 87d64252e..c4aa26bf7 100644 --- a/src/java/com/rjconsultores/ventaboletos/web/utilerias/menu/item/tarifasOficial/ItemMenuSeguroKm.java +++ b/src/java/com/rjconsultores/ventaboletos/web/utilerias/menu/item/tarifasOficial/ItemMenuSeguroKm.java @@ -4,6 +4,7 @@ */ package com.rjconsultores.ventaboletos.web.utilerias.menu.item.tarifasOficial; +import com.rjconsultores.ventaboletos.utilerias.ApplicationProperties; import com.rjconsultores.ventaboletos.web.utilerias.PantallaUtileria; import com.rjconsultores.ventaboletos.web.utilerias.menu.DefaultItemMenuSistema; import org.zkoss.util.resource.Labels; @@ -15,7 +16,7 @@ import org.zkoss.util.resource.Labels; public class ItemMenuSeguroKm extends DefaultItemMenuSistema { public ItemMenuSeguroKm() { - super("busquedaSeguroKmController.window.title"); + super(ApplicationProperties.getInstance().exibeTpp() ? "busquedaSeguroKmController.window.title" : "busquedaSeguroKmController.semTpp.window.title"); } @Override @@ -26,7 +27,7 @@ public class ItemMenuSeguroKm extends DefaultItemMenuSistema { @Override public void ejecutar() { PantallaUtileria.openWindow("/gui/tarifas/busquedaSeguroKm.zul", - Labels.getLabel("busquedaSeguroKmController.window.title"), getArgs() ,desktop); + Labels.getLabel(ApplicationProperties.getInstance().exibeTpp() ? "busquedaSeguroKmController.window.title" : "busquedaSeguroKmController.semTpp.window.title"), getArgs() ,desktop); } } diff --git a/src/java/com/rjconsultores/ventaboletos/web/utilerias/menu/menu_original.properties b/src/java/com/rjconsultores/ventaboletos/web/utilerias/menu/menu_original.properties index b9b253428..86146f924 100644 --- a/src/java/com/rjconsultores/ventaboletos/web/utilerias/menu/menu_original.properties +++ b/src/java/com/rjconsultores/ventaboletos/web/utilerias/menu/menu_original.properties @@ -177,6 +177,7 @@ analitico.integracion=com.rjconsultores.ventaboletos.web.utilerias.menu.item.ana analitico.integracion.sisdap=com.rjconsultores.ventaboletos.web.utilerias.menu.item.relatorios.ItemMenuRelatorioSisdap analitico.integracion.aidf=com.rjconsultores.ventaboletos.web.utilerias.menu.item.relatorios.ItemMenuRelatorioAidf analitico.integracion.relatoriosAnaliticos=com.rjconsultores.ventaboletos.web.utilerias.menu.item.relatorios.impressaofiscal.relatorios.SubMenuRelatorioFiscalRelatorios +analitico.gerenciais=com.rjconsultores.ventaboletos.web.utilerias.menu.item.relatorios.ItemMenuRelatorioFormaPagamentoAgencia analitico.integracion.relatoriosAnaliticos.financeiro=com.rjconsultores.ventaboletos.web.utilerias.menu.item.relatorios.impressaofiscal.relatorios.ItemMenuFiscalRelatorioFinanceiro analitico.integracion.relatoriosAnaliticos.voucher=com.rjconsultores.ventaboletos.web.utilerias.menu.item.relatorios.impressaofiscal.relatorios.ItemMenuFiscalRelatorioVoucher analitico.integracion.relatoriosAnaliticos.voucherCancelados=com.rjconsultores.ventaboletos.web.utilerias.menu.item.relatorios.impressaofiscal.relatorios.ItemMenuFiscalRelatorioVoucherCancelados diff --git a/web/WEB-INF/i3-label_es_MX.label b/web/WEB-INF/i3-label_es_MX.label index 101ce7be5..4f221c964 100644 --- a/web/WEB-INF/i3-label_es_MX.label +++ b/web/WEB-INF/i3-label_es_MX.label @@ -348,10 +348,10 @@ indexController.mniRelatorioConferenciaFormularioFisico.label = RelatĂłrio Confe indexController.tipoConfComissao.label=Tipo Conf. Pend. Comissao # Relatorio Financeiro -financeiroController.mniRelatorioFinanceiro.label = Financeiro -financeiroController.window.title = Financeiro -financeiroController.lbDataIni.value = Data InĂ­cio -financeiroController.lbDataFin.value = Data Fim +formaPagamentoAgenciaController.mniRelatorioFinanceiro.label = Financeiro +formaPagamentoAgenciaController.window.title = Financeiro +formaPagamentoAgenciaController.lbDataIni.value = Data InĂ­cio +formaPagamentoAgenciaController.lbDataFin.value = Data Fim #PARTE REALIZADA POR MANUEL indexController.mnCortesias.label = Cortesias para empleados diff --git a/web/WEB-INF/i3-label_pt_BR.label b/web/WEB-INF/i3-label_pt_BR.label index 916275305..a8c4418fe 100644 --- a/web/WEB-INF/i3-label_pt_BR.label +++ b/web/WEB-INF/i3-label_pt_BR.label @@ -365,11 +365,13 @@ indexController.mniRelatorioConferenciaFormularioFisico.label = ConferĂȘncia de indexController.mniAuditoria.label = Auditoria indexController.tipoConfComissao.label=Tipo Conf. Pend. ComissĂŁo -# Relatorio Financeiro -financeiroController.mniRelatorioFinanceiro.label = Financeiro -financeiroController.window.title = Financeiro -financeiroController.lbDataIni.value = Data InĂ­cio -financeiroController.lbDataFin.value = Data Fim +# RelatĂłrio de Forma de Pagamento por AgĂȘncia +formaPagamentoAgenciaController.mniRelatorioFinanceiro.label = Forma de Pagamento por AgĂȘncia +formaPagamentoAgenciaController.window.title = Forma de Pagamento por AgĂȘncia +formaPagamentoAgenciaController.lbAgencia.value = AgĂȘncia +formaPagamentoAgenciaController.lbDataIni.value = Data InĂ­cio +formaPagamentoAgenciaController.lbDataFin.value = Data Fim +formaPagamentoAgenciaController.lbEmpresa.value = Empresa # Muestra a Pesquisa Tipo Classe busquedaClaseServicioController.window.title = Tipo de Classe diff --git a/web/gui/informes/formaPagamentoAgencia/formaPagamentoAgencia.zul b/web/gui/informes/formaPagamentoAgencia/formaPagamentoAgencia.zul new file mode 100644 index 000000000..44db1d1e5 --- /dev/null +++ b/web/gui/informes/formaPagamentoAgencia/formaPagamentoAgencia.zul @@ -0,0 +1,55 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + +