From 6de9d52323de60d36370ad29f2130aa8cd170573 Mon Sep 17 00:00:00 2001 From: julio Date: Fri, 1 Apr 2016 21:09:45 +0000 Subject: [PATCH] bug #6817 git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@54523 d1611594-4594-4d17-8e1d-87c2c4800839 --- .../impl/RelatorioAnaliticoVoucher.java | 118 +++++++++ .../RelatorioAnaliticoVoucher_es.properties | 2 + ...RelatorioAnaliticoVoucher_pt_BR.properties | 2 + .../RelatorioAnaliticoVoucher.jasper | Bin 0 -> 29420 bytes .../templates/RelatorioAnaliticoVoucher.jrxml | 227 ++++++++++++++++++ .../BusquedaImportacionFiscalController.java | 38 +++ .../impressaofiscal/TipoImportacaoFiscal.java | 29 ++- .../ItemMenuFiscalRelatorioVoucher.java | 34 +++ web/WEB-INF/i3-label_es_MX.label | 1 + web/WEB-INF/i3-label_pt_BR.label | 1 + .../busquedaImportacionFiscal.zul | 3 + 11 files changed, 452 insertions(+), 3 deletions(-) create mode 100644 src/java/com/rjconsultores/ventaboletos/relatorios/impl/RelatorioAnaliticoVoucher.java create mode 100644 src/java/com/rjconsultores/ventaboletos/relatorios/internacionalizacao/RelatorioAnaliticoVoucher_es.properties create mode 100644 src/java/com/rjconsultores/ventaboletos/relatorios/internacionalizacao/RelatorioAnaliticoVoucher_pt_BR.properties create mode 100644 src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioAnaliticoVoucher.jasper create mode 100644 src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioAnaliticoVoucher.jrxml create mode 100644 src/java/com/rjconsultores/ventaboletos/web/utilerias/menu/item/relatorios/impressaofiscal/relatorios/ItemMenuFiscalRelatorioVoucher.java diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/impl/RelatorioAnaliticoVoucher.java b/src/java/com/rjconsultores/ventaboletos/relatorios/impl/RelatorioAnaliticoVoucher.java new file mode 100644 index 000000000..2bde21711 --- /dev/null +++ b/src/java/com/rjconsultores/ventaboletos/relatorios/impl/RelatorioAnaliticoVoucher.java @@ -0,0 +1,118 @@ +package com.rjconsultores.ventaboletos.relatorios.impl; + +import java.sql.Connection; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; +import java.util.Map; + +import org.apache.log4j.Logger; + +import com.rjconsultores.ventaboletos.entidad.Empresa; +import com.rjconsultores.ventaboletos.relatorios.utilitarios.DataSource; +import com.rjconsultores.ventaboletos.relatorios.utilitarios.Relatorio; +import com.rjconsultores.ventaboletos.utilerias.DateUtil; +import com.rjconsultores.ventaboletos.vo.impressaofiscal.ItemRelatorioVoucher; + +import net.sf.jasperreports.engine.data.JRBeanCollectionDataSource; + +public class RelatorioAnaliticoVoucher extends Relatorio { + + private static Logger log = Logger.getLogger(RelatorioAnaliticoVoucher.class); + + List listdata = null; + + public RelatorioAnaliticoVoucher(final Map parametros, Connection conexao) throws Exception { + super(parametros, conexao); + + this.setCustomDataSource(new DataSource(this) { + @Override + public void initDados() throws Exception { + + try { + Date inicio = (Date) parametros.get("inicio"); + Date fim = (Date) parametros.get("fim"); + Empresa empresa = (Empresa) parametros.get("empresa"); + + listdata = buscarMovimentosAnaliticos(inicio, fim, empresa.getEmpresaId()); + + } catch (SQLException e) { + log.error("", e); + } + } + + }); + + this.setCollectionDataSource(new JRBeanCollectionDataSource(listdata)); + } + + public List buscarMovimentosAnaliticos(Date inicio, Date fim, Integer empresaId) throws SQLException { + + inicio = DateUtil.inicioFecha(inicio); + fim = DateUtil.fimFecha(fim); + + StringBuilder sql = new StringBuilder(); + sql.append("select "); + sql.append(" TO_CHAR(b.fechorventa, 'dd-MM-yyyy') as dataVendaVoucher, "); + sql.append(" TO_CHAR(impres.fechorventa, 'dd-MM-yyyy') as dataEmissao, "); + sql.append(" e.nombempresa as empresa, "); + sql.append(" fr4.coo as numDocFiscal, "); + sql.append(" coalesce(b.numfoliosistema, impres.numfoliosistema) as bilhete, "); + sql.append(" b.boleto_id as boletoVoucher, "); + sql.append(" impres.boleto_id as boletoImpresso, "); + sql.append(" tv.desctipoventa as tipoVenda, "); + sql.append(" case when b.motivocancelacion_id in (31, 32) then b.preciopagado * -1 else b.preciopagado end as tarifa, "); + sql.append(" case when b.motivocancelacion_id in (31, 32) then b.importepedagio * -1 else b.importepedagio end as pedagio, "); + sql.append(" case when b.motivocancelacion_id in (31, 32) then b.importetaxaembarque * -1 else b.importetaxaembarque end as embarque, "); + sql.append(" case when mc.descmotivo is null then 'VOUCHER' else mc.descmotivo end as status "); + sql.append(" from boleto b "); + sql.append(" join empresa e on b.marca_id = e.empresa_id "); + sql.append(" left join boleto impres on b.boleto_id = impres.boletooriginal_id "); + sql.append(" left join fiscal_r4 fr4 on impres.boleto_id = fr4.boleto_id "); + sql.append(" left join tipo_venta tv on tv.tipoventa_id = coalesce(b.tipoventa_id, impres.tipoventa_id) "); + sql.append(" left join motivo_cancelacion mc on mc.motivocancelacion_id = coalesce(b.motivocancelacion_id, impres.motivocancelacion_id) "); + sql.append(" where b.tipoventa_id in (5,12,18) "); + sql.append(" and b.fechorventa between ? and ? "); + sql.append(" and b.marca_id = ? "); + sql.append(" order by dataVendaVoucher, dataEmissao desc "); + + PreparedStatement stmt = getConexao().prepareStatement(sql.toString()); + stmt.setTimestamp(1, new java.sql.Timestamp(inicio.getTime())); + stmt.setTimestamp(2, new java.sql.Timestamp(fim.getTime())); + stmt.setInt(3, empresaId); + + ResultSet rset = stmt.executeQuery(); + List list = new ArrayList(); + while (rset.next()) { + ItemRelatorioVoucher item = new ItemRelatorioVoucher(); + + item.setDataVendaVoucher(rset.getString("dataVendaVoucher")); + item.setDataEmissao(rset.getString("dataEmissao")); + item.setEmpresa(rset.getString("empresa")); + item.setNumDocFiscal(rset.getString("numDocFiscal")); + item.setBilhete(rset.getString("bilhete")); + item.setBoletoVoucher(rset.getLong("boletoVoucher")); + item.setBoletoImpresso(rset.getLong("boletoImpresso")); + item.setTipoVenda(rset.getString("tipoVenda")); + item.setTarifa(rset.getBigDecimal("tarifa")); + item.setPedagio(rset.getBigDecimal("pedagio")); + item.setEmbarque(rset.getBigDecimal("embarque")); + item.setStatus(rset.getString("status")); + + list.add(item); + } + + if (!getConexao().isClosed()) + getConexao().close(); + + return list; + } + + @Override + protected void processaParametros() throws Exception { + } + +} diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/internacionalizacao/RelatorioAnaliticoVoucher_es.properties b/src/java/com/rjconsultores/ventaboletos/relatorios/internacionalizacao/RelatorioAnaliticoVoucher_es.properties new file mode 100644 index 000000000..57daa3700 --- /dev/null +++ b/src/java/com/rjconsultores/ventaboletos/relatorios/internacionalizacao/RelatorioAnaliticoVoucher_es.properties @@ -0,0 +1,2 @@ +#geral +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/internacionalizacao/RelatorioAnaliticoVoucher_pt_BR.properties b/src/java/com/rjconsultores/ventaboletos/relatorios/internacionalizacao/RelatorioAnaliticoVoucher_pt_BR.properties new file mode 100644 index 000000000..57daa3700 --- /dev/null +++ b/src/java/com/rjconsultores/ventaboletos/relatorios/internacionalizacao/RelatorioAnaliticoVoucher_pt_BR.properties @@ -0,0 +1,2 @@ +#geral +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/RelatorioAnaliticoVoucher.jasper b/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioAnaliticoVoucher.jasper new file mode 100644 index 0000000000000000000000000000000000000000..889547fb4daeee7e0bf2d59ac9c50c56b4fc9929 GIT binary patch literal 29420 zcmd^od3+qjmH%r=w#L#}z7Nir!(husvW<2jiex_melPj79ETDfF;D;}Jz9?Z3*;`#hpw1+B2b978G-umNtFc@jZX)J^F zVLG5E8tQHB?u&*Z;iithb)iT!+}+jJ8*U9#us>s2nc>cO4wVdZT~Z^%>6Xk$+6p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>5m!{C3|@uWqQ?NB`4#qcOvCUF}}e zpZU5{JVU?tr2mg6{W(wie|gfsSAQoB-A%uGhZ+bJF(U?hL1ZEba!KyMEjyoVytAHamB1xZCF39gn+y=dK=i zX>s>QyzgM#ZE^1EaF>cH;oYe9&P%z z5v4z&UEek0^dZ{zBO^n9g%v^ zC3WgfNu9b=QinT_)Tuiqb>eQU)EP6W!kA4d<3JjL42&9|qH~OSbe?e}U1H3~@OL3y zVbo(R+CVoLjTjRiOSeNl?lg|42aFRi82U6lVVs1qOEYAtg{x>40XUC?}YrE zM(-IB$jmzWi?JT^vdO41&M+n$Ta39z+&IWEjiZb~W1+FlSZ-`LRvHV5#J`w67(IY`}$kh+&3b+1C|eh#VoC8X|kNZlKdx;G(pzlYSl4XOJRr0!iv z-G`96k05n_h1C7ch*wk^sfsEiQxPzBS4=WKS25YRuwoXZjz39>u?f}!`OdT8d)LKQ R>Nt~7YZ2}mP*X*@{|93BVL|`^ literal 0 HcmV?d00001 diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioAnaliticoVoucher.jrxml b/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioAnaliticoVoucher.jrxml new file mode 100644 index 000000000..8b88d6531 --- /dev/null +++ b/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioAnaliticoVoucher.jrxml @@ -0,0 +1,227 @@ + + + + + + + + + + + + + + + + + + + + + + <band height="65" splitType="Stretch"> + <textField> + <reportElement x="84" y="40" width="471" height="23" uuid="63ce47a3-7e94-42a2-8325-eceef777fbe2"/> + <textElement verticalAlignment="Middle"/> + <textFieldExpression><![CDATA[$F{empresa}]]></textFieldExpression> + </textField> + <staticText> + <reportElement x="0" y="0" width="276" height="20" uuid="2e2e9caa-4076-4209-bdaf-0017ddf83a56"/> + <textElement verticalAlignment="Middle"> + <font size="14" isBold="true"/> + </textElement> + <text><![CDATA[ANALITICO DE VOUCHERS]]></text> + </staticText> + <textField pattern="dd/MM/yyyy HH:mm"> + <reportElement x="276" y="0" width="279" height="20" uuid="6b4f1375-4f4b-4b80-83b8-7650e62e107e"/> + <textElement textAlignment="Right" verticalAlignment="Middle"> + <font isBold="true"/> + </textElement> + <textFieldExpression><![CDATA[new java.util.Date()]]></textFieldExpression> + </textField> + <textField> + <reportElement x="0" y="20" width="80" height="20" uuid="3f1d0681-30be-4c3a-ae90-cf34dd4ede3c"/> + <textElement verticalAlignment="Middle"> + <font isBold="true"/> + </textElement> + <textFieldExpression><![CDATA["Período: "]]></textFieldExpression> + </textField> + <staticText> + <reportElement x="0" y="40" width="84" height="23" uuid="cf05ce5a-615b-41ac-b24d-2c45ca1bc60e"/> + <textElement verticalAlignment="Middle"> + <font isBold="true"/> + </textElement> + <text><![CDATA[Empresa:]]></text> + </staticText> + <textField pattern="dd/MM/yyyy"> + <reportElement x="80" y="20" width="78" height="20" uuid="7f5ee01d-f86d-49a4-a2a1-f1c671621ef0"/> + <textElement textAlignment="Left" verticalAlignment="Middle"/> + <textFieldExpression><![CDATA[$P{inicio}]]></textFieldExpression> + </textField> + <textField> + <reportElement x="158" y="20" width="28" height="20" uuid="c1dec10a-743d-4569-916d-f1b65d4475b7"/> + <textElement verticalAlignment="Middle"> + <font isBold="true"/> + </textElement> + <textFieldExpression><![CDATA[" a "]]></textFieldExpression> + </textField> + <textField pattern="dd/MM/yyyy"> + <reportElement x="186" y="20" width="369" height="20" uuid="0b39fe78-5378-404c-b364-8be6ca288e25"/> + <textElement verticalAlignment="Middle"/> + <textFieldExpression><![CDATA[$P{fim}]]></textFieldExpression> + </textField> + <line> + <reportElement x="0" y="63" width="555" height="1" uuid="481b2107-ee62-4815-8a89-8435d34384c8"/> + </line> + </band> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/impressaofiscal/BusquedaImportacionFiscalController.java b/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/impressaofiscal/BusquedaImportacionFiscalController.java index 7055fd094..c344059d5 100644 --- a/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/impressaofiscal/BusquedaImportacionFiscalController.java +++ b/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/impressaofiscal/BusquedaImportacionFiscalController.java @@ -28,6 +28,7 @@ import org.zkoss.zul.Filedownload; import com.rjconsultores.ventaboletos.entidad.Empresa; import com.rjconsultores.ventaboletos.relatorios.impl.RelatorioAnaliticoFinanceiro; +import com.rjconsultores.ventaboletos.relatorios.impl.RelatorioAnaliticoVoucher; import com.rjconsultores.ventaboletos.service.EmpresaService; import com.rjconsultores.ventaboletos.service.FiscalService; import com.rjconsultores.ventaboletos.utilerias.DateUtil; @@ -58,6 +59,7 @@ public class BusquedaImportacionFiscalController extends MyGenericForwardCompose private Button btnExeImportacionManual; private Button btnExeImportacionNaoFiscal; private Button btnExeRelatorioFinanceiro; + private Button btnExeRelatorioVoucher; @Override public void doAfterCompose(Component comp) throws Exception { @@ -111,6 +113,13 @@ public class BusquedaImportacionFiscalController extends MyGenericForwardCompose btnExeRelatorioFinanceiro.setVisible(false); } + boolean isRelatorioVoucher = (Boolean) Executions.getCurrent().getArg().get("RELATORIO_VOUCHER"); + if (isRelatorioVoucher) { + btnExeRelatorioVoucher.setVisible(true); + } else { + btnExeRelatorioVoucher.setVisible(false); + } + } public void onClick$btnExeImportacionManual(Event ev) throws InterruptedException { @@ -240,6 +249,35 @@ public class BusquedaImportacionFiscalController extends MyGenericForwardCompose } } + @SuppressWarnings({ "unchecked", "rawtypes" }) + public void onClick$btnExeRelatorioVoucher(Event ev) throws InterruptedException { + try { + Empresa empresa = null; + Comboitem itemEmpresa = cmbEmpresa.getSelectedItem(); + if (itemEmpresa != null) { + empresa = (Empresa) itemEmpresa.getValue(); + } + + Map parametros = new HashMap(); + parametros.put("inicio", datInicial.getValue()); + parametros.put("fim", datFinal.getValue()); + parametros.put("empresa", empresa); + + RelatorioAnaliticoVoucher relatorio = new RelatorioAnaliticoVoucher(parametros, dataSourceRead.getConnection()); + + Map args = new HashMap(); + args.put("relatorio", relatorio); + + openWindow("/component/reportView.zul", + Labels.getLabel("relatorioAproveitamentoController.window.title"), args, MODAL); + + } catch (SQLException e) { + log.error(e.getMessage(), e); + } catch (Exception e) { + log.error(e.getMessage(), e); + } + } + public List getLsEmpresa() { return lsEmpresa; } diff --git a/src/java/com/rjconsultores/ventaboletos/web/utilerias/menu/item/relatorios/impressaofiscal/TipoImportacaoFiscal.java b/src/java/com/rjconsultores/ventaboletos/web/utilerias/menu/item/relatorios/impressaofiscal/TipoImportacaoFiscal.java index ffaa52918..d626d411d 100644 --- a/src/java/com/rjconsultores/ventaboletos/web/utilerias/menu/item/relatorios/impressaofiscal/TipoImportacaoFiscal.java +++ b/src/java/com/rjconsultores/ventaboletos/web/utilerias/menu/item/relatorios/impressaofiscal/TipoImportacaoFiscal.java @@ -5,12 +5,19 @@ import java.util.HashMap; public class TipoImportacaoFiscal { public enum TipoImportacao { - ECF, ECF_CANCELADOS, MANUAL, REDUCAO_Z, NAO_FISCAL, RELATORIO_FINANCEIRO; + ECF, ECF_CANCELADOS, MANUAL, REDUCAO_Z, NAO_FISCAL, RELATORIO_FINANCEIRO, RELATORIO_VOUCHER; } - public static HashMap selecionaTipoImportacao(TipoImportacao tipo, HashMap args) { + public static HashMap selecionaTipoImportacao(TipoImportacao tipo, HashMap map) { + + map.remove(TipoImportacao.ECF.toString()); + map.remove(TipoImportacao.ECF_CANCELADOS.toString()); + map.remove(TipoImportacao.MANUAL.toString()); + map.remove(TipoImportacao.REDUCAO_Z.toString()); + map.remove(TipoImportacao.NAO_FISCAL.toString()); + map.remove(TipoImportacao.RELATORIO_FINANCEIRO.toString()); + map.remove(TipoImportacao.RELATORIO_VOUCHER.toString()); - HashMap map = args; if (tipo.equals(TipoImportacao.ECF)) { map.put(TipoImportacao.ECF.toString(), Boolean.TRUE); map.put(TipoImportacao.ECF_CANCELADOS.toString(), Boolean.FALSE); @@ -18,6 +25,7 @@ public class TipoImportacaoFiscal { map.put(TipoImportacao.REDUCAO_Z.toString(), Boolean.FALSE); map.put(TipoImportacao.NAO_FISCAL.toString(), Boolean.FALSE); map.put(TipoImportacao.RELATORIO_FINANCEIRO.toString(), Boolean.FALSE); + map.put(TipoImportacao.RELATORIO_VOUCHER.toString(), Boolean.FALSE); } if (tipo.equals(TipoImportacao.ECF_CANCELADOS)) { @@ -27,6 +35,7 @@ public class TipoImportacaoFiscal { map.put(TipoImportacao.REDUCAO_Z.toString(), Boolean.FALSE); map.put(TipoImportacao.NAO_FISCAL.toString(), Boolean.FALSE); map.put(TipoImportacao.RELATORIO_FINANCEIRO.toString(), Boolean.FALSE); + map.put(TipoImportacao.RELATORIO_VOUCHER.toString(), Boolean.FALSE); } if (tipo.equals(TipoImportacao.MANUAL)) { @@ -36,6 +45,7 @@ public class TipoImportacaoFiscal { map.put(TipoImportacao.REDUCAO_Z.toString(), Boolean.FALSE); map.put(TipoImportacao.NAO_FISCAL.toString(), Boolean.FALSE); map.put(TipoImportacao.RELATORIO_FINANCEIRO.toString(), Boolean.FALSE); + map.put(TipoImportacao.RELATORIO_VOUCHER.toString(), Boolean.FALSE); } if (tipo.equals(TipoImportacao.REDUCAO_Z)) { @@ -45,6 +55,7 @@ public class TipoImportacaoFiscal { map.put(TipoImportacao.REDUCAO_Z.toString(), Boolean.TRUE); map.put(TipoImportacao.NAO_FISCAL.toString(), Boolean.FALSE); map.put(TipoImportacao.RELATORIO_FINANCEIRO.toString(), Boolean.FALSE); + map.put(TipoImportacao.RELATORIO_VOUCHER.toString(), Boolean.FALSE); } if (tipo.equals(TipoImportacao.NAO_FISCAL)) { @@ -54,6 +65,7 @@ public class TipoImportacaoFiscal { map.put(TipoImportacao.REDUCAO_Z.toString(), Boolean.FALSE); map.put(TipoImportacao.NAO_FISCAL.toString(), Boolean.TRUE); map.put(TipoImportacao.RELATORIO_FINANCEIRO.toString(), Boolean.FALSE); + map.put(TipoImportacao.RELATORIO_VOUCHER.toString(), Boolean.FALSE); } if (tipo.equals(TipoImportacao.RELATORIO_FINANCEIRO)) { @@ -63,6 +75,17 @@ public class TipoImportacaoFiscal { map.put(TipoImportacao.REDUCAO_Z.toString(), Boolean.FALSE); map.put(TipoImportacao.NAO_FISCAL.toString(), Boolean.FALSE); map.put(TipoImportacao.RELATORIO_FINANCEIRO.toString(), Boolean.TRUE); + map.put(TipoImportacao.RELATORIO_VOUCHER.toString(), Boolean.FALSE); + } + + if (tipo.equals(TipoImportacao.RELATORIO_VOUCHER)) { + map.put(TipoImportacao.ECF.toString(), Boolean.FALSE); + map.put(TipoImportacao.ECF_CANCELADOS.toString(), Boolean.FALSE); + map.put(TipoImportacao.MANUAL.toString(), Boolean.FALSE); + map.put(TipoImportacao.REDUCAO_Z.toString(), Boolean.FALSE); + map.put(TipoImportacao.NAO_FISCAL.toString(), Boolean.FALSE); + map.put(TipoImportacao.RELATORIO_FINANCEIRO.toString(), Boolean.FALSE); + map.put(TipoImportacao.RELATORIO_VOUCHER.toString(), Boolean.TRUE); } return map; diff --git a/src/java/com/rjconsultores/ventaboletos/web/utilerias/menu/item/relatorios/impressaofiscal/relatorios/ItemMenuFiscalRelatorioVoucher.java b/src/java/com/rjconsultores/ventaboletos/web/utilerias/menu/item/relatorios/impressaofiscal/relatorios/ItemMenuFiscalRelatorioVoucher.java new file mode 100644 index 000000000..26ebc926e --- /dev/null +++ b/src/java/com/rjconsultores/ventaboletos/web/utilerias/menu/item/relatorios/impressaofiscal/relatorios/ItemMenuFiscalRelatorioVoucher.java @@ -0,0 +1,34 @@ +package com.rjconsultores.ventaboletos.web.utilerias.menu.item.relatorios.impressaofiscal.relatorios; + +import java.util.HashMap; + +import org.zkoss.util.resource.Labels; + +import com.rjconsultores.ventaboletos.web.utilerias.PantallaUtileria; +import com.rjconsultores.ventaboletos.web.utilerias.menu.DefaultItemMenuSistema; +import com.rjconsultores.ventaboletos.web.utilerias.menu.item.relatorios.impressaofiscal.TipoImportacaoFiscal; +import com.rjconsultores.ventaboletos.web.utilerias.menu.item.relatorios.impressaofiscal.TipoImportacaoFiscal.TipoImportacao; + +public class ItemMenuFiscalRelatorioVoucher extends DefaultItemMenuSistema { + + public ItemMenuFiscalRelatorioVoucher() { + super("indexController.mniRelatorioVoucher.label"); + } + + @Override + public String getClaveMenu() { + return "COM.RJCONSULTORES.ADMINISTRACION.GUI.RELATORIOS.IMPRESSAOFISCAL.MENU.IMPORTACIONFISCAL"; + } + + @Override + public void ejecutar() { + + @SuppressWarnings("unchecked") + HashMap map = TipoImportacaoFiscal.selecionaTipoImportacao(TipoImportacao.RELATORIO_VOUCHER, (HashMap) getArgs()); + + PantallaUtileria.openWindow("/gui/impressaofiscal/busquedaImportacionFiscal.zul", + Labels.getLabel("busquedaImportacionFiscalController.window.title"), map, desktop); + + } + +} diff --git a/web/WEB-INF/i3-label_es_MX.label b/web/WEB-INF/i3-label_es_MX.label index a98f1aa06..1586cc9b2 100644 --- a/web/WEB-INF/i3-label_es_MX.label +++ b/web/WEB-INF/i3-label_es_MX.label @@ -280,6 +280,7 @@ indexController.mniImportacionFiscalManual.label=Manual indexController.mniImportacionFiscalReducaoZ.label=Redução Z indexController.mniImportacionNaoFiscal.label=Não Fiscal indexController.mniRelatorioFinanceiro.label=Financeiro +indexController.mniRelatorioVoucher.label=Voucher indexController.mniSubMenuClientePacote.label=Paquete indexController.mniManutencaoPacote.label=Mantenimiento Paquete diff --git a/web/WEB-INF/i3-label_pt_BR.label b/web/WEB-INF/i3-label_pt_BR.label index e46e17d9e..c3b4d7a85 100644 --- a/web/WEB-INF/i3-label_pt_BR.label +++ b/web/WEB-INF/i3-label_pt_BR.label @@ -286,6 +286,7 @@ indexController.mniImportacionFiscalManual.label=Manual indexController.mniImportacionFiscalReducaoZ.label=Redução Z indexController.mniImportacionNaoFiscal.label=Não Fiscal indexController.mniRelatorioFinanceiro.label=Financeiro +indexController.mniRelatorioVoucher.label=Voucher indexController.mniSubMenuClientePacote.label=Pacote indexController.mniManutencaoPacote.label=Manutenção Pacote diff --git a/web/gui/impressaofiscal/busquedaImportacionFiscal.zul b/web/gui/impressaofiscal/busquedaImportacionFiscal.zul index 1464152b9..dffd63f8a 100644 --- a/web/gui/impressaofiscal/busquedaImportacionFiscal.zul +++ b/web/gui/impressaofiscal/busquedaImportacionFiscal.zul @@ -63,6 +63,9 @@