diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/impl/RelatorioTrocoSimples.java b/src/java/com/rjconsultores/ventaboletos/relatorios/impl/RelatorioTrocoSimples.java new file mode 100644 index 000000000..443bdc9ac --- /dev/null +++ b/src/java/com/rjconsultores/ventaboletos/relatorios/impl/RelatorioTrocoSimples.java @@ -0,0 +1,112 @@ +package com.rjconsultores.ventaboletos.relatorios.impl; + +import java.sql.Connection; +import java.util.Date; +import java.sql.ResultSet; +import java.text.SimpleDateFormat; +import java.util.HashMap; +import java.util.Map; + +import org.apache.commons.lang.StringUtils; + +import com.rjconsultores.ventaboletos.relatorios.utilitarios.ArrayDataSource; +import com.rjconsultores.ventaboletos.relatorios.utilitarios.Relatorio; +import com.rjconsultores.ventaboletos.web.utilerias.NamedParameterStatement; + +public class RelatorioTrocoSimples extends Relatorio { + + public RelatorioTrocoSimples(Map parametros, Connection conexao) throws Exception { + + super(parametros, conexao); + + this.setCustomDataSource(new ArrayDataSource(this) { + + public void initDados() throws Exception { + Connection conexao = this.relatorio.getConexao(); + Map parametros = this.relatorio.getParametros(); + + String sql = getSql(parametros); + + NamedParameterStatement stmt = new NamedParameterStatement(conexao, sql); + ResultSet rset = stmt.executeQuery(); + + while (rset.next()) { + Map dataResult = new HashMap(); + + dataResult.put("valorTroco", rset.getBigDecimal("valorTroco")); + dataResult.put("puntoVenta", rset.getString("puntoVenta")); + dataResult.put("bilhetero", getNombUsuarioCompleto(rset.getString("bilhetero"), rset.getString("paterno"), rset.getString("materno"))); + dataResult.put("boleto", rset.getString("boleto")); + dataResult.put("transacao", rset.getString("transacao")); + + this.dados.add(dataResult); + } + + this.resultSet = rset; + } + }); + } + + @Override + protected void processaParametros() throws Exception { + } + + private String getSql(Map parametros) { + + StringBuilder sql = new StringBuilder(); + + String formatToDate = ("'dd/MM/yyyy hh24:mi:ss'"); + SimpleDateFormat formatSemHora = new SimpleDateFormat("dd/MM/yyyy"); + + Date dataInicial = (Date) parametros.get("DATA_INICIAL"); + Date dataFinal = (Date) parametros.get("DATA_FINAL"); + Integer empresaId = (Integer) parametros.get("EMPRESA_ID"); + String puntoVentas = (String) parametros.get("NUMPUNTOVENTA"); + Integer usuarioId = (Integer) parametros.get("BILHETEIRO_ID"); + + sql.append("SELECT ee.impingreso as valorTroco, "); + sql.append("pv.nombpuntoventa as puntoVenta, "); + sql.append("u.nombusuario as bilhetero, "); + sql.append("u.nombpaterno as paterno, "); + sql.append("u.nombmaterno as materno, "); + sql.append("ee.boleto_id AS boleto, "); + sql.append("ee.descinfo AS transacao "); + sql.append("FROM TIPO_EVENTO_EXTRA tee "); + sql.append("INNER JOIN EVENTO_EXTRA ee ON ee.tipoeventoextra_id = tee.tipoeventoextra_id "); + sql.append("INNER JOIN PUNTO_VENTA pv ON pv.puntoventa_id = ee.puntoventa_id "); + sql.append("INNER JOIN USUARIO u ON u.USUARIO_ID = ee.USUARIO_ID "); + + sql.append("WHERE tee.cvesistema = 'TIPO_EVENTO_EXTRA_TROCO_SIMPLES' "); + + if (empresaId != null) { + sql.append(" AND ee.empresa_id = " + empresaId); + } + if (dataInicial != null && dataFinal != null) { + sql.append(" AND ee.fechoringreso BETWEEN TO_DATE('" + formatSemHora.format(dataInicial) + " 00:00:00', " + formatToDate + ") " + + "AND TO_DATE('" + formatSemHora.format(dataFinal) + " 23:59:59', " + formatToDate + ") "); + } + if (puntoVentas != null && !puntoVentas.isEmpty()) { + sql.append(" AND pv.puntoventa_id IN (" + puntoVentas + ") "); + } + if(usuarioId != null) { + sql.append(" AND ee.usuario_id = " + usuarioId); + } + + return sql.toString(); + } + + public String getNombUsuarioCompleto(String nome, String nomePaterno, String nomeMaterno) { + StringBuilder sNome = new StringBuilder(nome); + if(StringUtils.isNotBlank(nomePaterno)) { + sNome.append(" ") + .append(nomePaterno); + } + if(StringUtils.isNotBlank(nomeMaterno)) { + sNome.append(" ") + .append(nomeMaterno); + } + + return sNome.toString(); + } + +} diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/internacionalizacao/RelatorioTrocoSimples_es_MX.properties b/src/java/com/rjconsultores/ventaboletos/relatorios/internacionalizacao/RelatorioTrocoSimples_es_MX.properties new file mode 100644 index 000000000..54c894657 --- /dev/null +++ b/src/java/com/rjconsultores/ventaboletos/relatorios/internacionalizacao/RelatorioTrocoSimples_es_MX.properties @@ -0,0 +1,19 @@ +#geral +msg.noData=Não foi possivel obter dados com os parâmetros informados. + +#Labels cabeçalho +cabecalho.relatorio=Relatório: +cabecalho.periodo=Período: +cabecalho.periodoA=à +cabecalho.dataHora=Data/Hora: +cabecalho.impressorPor=Impressor por: +cabecalho.pagina=Página +cabecalho.de=de +cabecalho.filtros=Filtros: + +label.puntoVenta=Agência +label.bilheteiro=Bilheteiro +label.valorTroco=Valor Troco +label.boleto=Boleto +label.transacao=Transação +label.totalTroco=Total Troco: \ No newline at end of file diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/internacionalizacao/RelatorioTrocoSimples_pt_BR.properties b/src/java/com/rjconsultores/ventaboletos/relatorios/internacionalizacao/RelatorioTrocoSimples_pt_BR.properties new file mode 100644 index 000000000..54c894657 --- /dev/null +++ b/src/java/com/rjconsultores/ventaboletos/relatorios/internacionalizacao/RelatorioTrocoSimples_pt_BR.properties @@ -0,0 +1,19 @@ +#geral +msg.noData=Não foi possivel obter dados com os parâmetros informados. + +#Labels cabeçalho +cabecalho.relatorio=Relatório: +cabecalho.periodo=Período: +cabecalho.periodoA=à +cabecalho.dataHora=Data/Hora: +cabecalho.impressorPor=Impressor por: +cabecalho.pagina=Página +cabecalho.de=de +cabecalho.filtros=Filtros: + +label.puntoVenta=Agência +label.bilheteiro=Bilheteiro +label.valorTroco=Valor Troco +label.boleto=Boleto +label.transacao=Transação +label.totalTroco=Total Troco: \ No newline at end of file diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioTrocoSimples.jasper b/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioTrocoSimples.jasper new file mode 100644 index 000000000..6bd239d4b Binary files /dev/null and b/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioTrocoSimples.jasper differ diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioTrocoSimples.jrxml b/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioTrocoSimples.jrxml new file mode 100644 index 000000000..64a0fb763 --- /dev/null +++ b/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioTrocoSimples.jrxml @@ -0,0 +1,188 @@ + + + + + + + + + + + + + + + + + + <band height="91" splitType="Stretch"> + <line> + <reportElement uuid="54719d85-3e16-47ba-8a7d-50d626129e3d" x="0" y="68" width="554" height="1"/> + </line> + <textField> + <reportElement uuid="abfa62bc-56f8-4add-8903-0b64e8dbac7a" x="265" y="0" width="186" height="25"/> + <textElement textAlignment="Right"> + <font size="9" isBold="true"/> + </textElement> + <textFieldExpression><![CDATA[$R{cabecalho.dataHora}]]></textFieldExpression> + </textField> + <textField pattern="" isBlankWhenNull="false"> + <reportElement uuid="1a6a5b3b-d765-4d73-98d5-bd050b49dcf3" mode="Transparent" x="451" y="41" width="104" height="15" forecolor="#000000" backcolor="#FFFFFF"/> + <textElement textAlignment="Right" verticalAlignment="Top" rotation="None" markup="none"> + <font fontName="SansSerif" size="10" isBold="false" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/> + <paragraph lineSpacing="Single"/> + </textElement> + <textFieldExpression><![CDATA[$R{cabecalho.impressorPor}+" "+$P{USUARIO}]]></textFieldExpression> + </textField> + <line> + <reportElement uuid="9f8fb8ed-d527-4abf-9a65-791a8a9ce032" positionType="Float" x="0" y="84" width="554" height="1"/> + </line> + <textField pattern="" isBlankWhenNull="false"> + <reportElement uuid="942f5b46-6e12-4ef7-8f5f-28c8b90062e1" mode="Transparent" x="265" y="25" width="267" height="16" forecolor="#000000" backcolor="#FFFFFF"/> + <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"/> + </textElement> + <textFieldExpression><![CDATA[$R{cabecalho.pagina}+" "+$V{PAGE_NUMBER}+" "+$R{cabecalho.de}]]></textFieldExpression> + </textField> + <textField evaluationTime="Report" pattern="" isBlankWhenNull="false"> + <reportElement uuid="2acc421d-eff6-44d3-a35d-23d25afbba1a" mode="Transparent" x="533" y="25" width="21" height="16" forecolor="#000000" backcolor="#FFFFFF"/> + <textElement textAlignment="Center" 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"/> + </textElement> + <textFieldExpression><![CDATA[$V{PAGE_NUMBER}]]></textFieldExpression> + </textField> + <textField pattern="dd/MM/yyyy HH:mm" isBlankWhenNull="false"> + <reportElement uuid="54330d46-2a96-4065-b0ee-7d80265e78b0" mode="Transparent" x="451" y="0" width="104" height="25" forecolor="#000000" backcolor="#FFFFFF"/> + <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"/> + </textElement> + <textFieldExpression><![CDATA[new java.util.Date()]]></textFieldExpression> + </textField> + <textField isStretchWithOverflow="true"> + <reportElement uuid="852c6b40-a6cd-4a7d-9067-57114f688220" x="0" y="69" width="555" height="15"/> + <textElement verticalAlignment="Middle"> + <font size="8"/> + </textElement> + <textFieldExpression><![CDATA[$P{FILTROS}]]></textFieldExpression> + </textField> + <textField pattern="" isBlankWhenNull="false"> + <reportElement uuid="16fc4ee9-a895-4859-831b-4f609ff16d50" mode="Transparent" x="0" y="0" width="265" height="41" forecolor="#000000" backcolor="#FFFFFF"/> + <textElement textAlignment="Left" verticalAlignment="Top" rotation="None" markup="none"> + <font fontName="SansSerif" size="14" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/> + <paragraph lineSpacing="Single"/> + </textElement> + <textFieldExpression><![CDATA[$P{NOME_RELATORIO}]]></textFieldExpression> + </textField> + </band> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/relatorios/RelatorioTrocoSimplesController.java b/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/relatorios/RelatorioTrocoSimplesController.java new file mode 100644 index 000000000..34072fb4f --- /dev/null +++ b/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/relatorios/RelatorioTrocoSimplesController.java @@ -0,0 +1,281 @@ +package com.rjconsultores.ventaboletos.web.gui.controladores.relatorios; + +import java.text.SimpleDateFormat; +import java.util.ArrayList; +import java.util.Arrays; +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.zhtml.Messagebox; +import org.zkoss.zk.ui.Component; +import org.zkoss.zk.ui.event.Event; +import org.zkoss.zul.Bandbox; +import org.zkoss.zul.Comboitem; +import org.zkoss.zul.Datebox; +import org.zkoss.zul.Paging; + +import com.rjconsultores.ventaboletos.entidad.Empresa; +import com.rjconsultores.ventaboletos.entidad.PuntoVenta; +import com.rjconsultores.ventaboletos.entidad.Usuario; +import com.rjconsultores.ventaboletos.relatorios.impl.RelatorioTrocoSimples; +import com.rjconsultores.ventaboletos.relatorios.utilitarios.Relatorio; +import com.rjconsultores.ventaboletos.service.EmpresaService; +import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado; +import com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar; +import com.rjconsultores.ventaboletos.web.utilerias.MyComboboxUsuario; +import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer; +import com.rjconsultores.ventaboletos.web.utilerias.MyListbox; +import com.rjconsultores.ventaboletos.web.utilerias.MyTextbox; +import com.rjconsultores.ventaboletos.web.utilerias.paginacion.HibernateSearchObject; +import com.rjconsultores.ventaboletos.web.utilerias.paginacion.PagedListWrapper; +import com.rjconsultores.ventaboletos.web.utilerias.render.RenderRelatorioVendasBilheteiro; +import com.rjconsultores.ventaboletos.web.utilerias.render.RenderRelatorioVendasBilheteiroSelecionados; + +@Controller("relatorioTrocoSimplesController") +@Scope("prototype") +public class RelatorioTrocoSimplesController extends MyGenericForwardComposer { + + private static final long serialVersionUID = 1L; + + private Datebox dtInicial; + private Datebox dtFinal; + + private MyComboboxEstandar cmbEmpresa; + private List lsEmpresa; + + @Autowired + private transient PagedListWrapper plwPuntoVenta; + private MyTextbox txtNombrePuntoVenta; + private Bandbox bbPesquisaPuntoVenta; + private Paging pagingPuntoVenta; + private MyListbox puntoVentaList; + private MyListbox puntoVentaSelList; + + private MyComboboxUsuario cmbUsuario; + + @Autowired + private EmpresaService empresaService; + @Autowired + private DataSource dataSourceRead; + + @Override + public void doAfterCompose(Component comp) throws Exception { + lsEmpresa = empresaService.obtenerTodos(); + super.doAfterCompose(comp); + + puntoVentaList.setItemRenderer(new RenderRelatorioVendasBilheteiro()); + puntoVentaSelList.setItemRenderer(new RenderRelatorioVendasBilheteiroSelecionados()); + } + + @SuppressWarnings({ "rawtypes", "unchecked" }) + private void executarRelatorio() throws Exception { + Relatorio relatorio; + Map parametros = new HashMap(); + StringBuilder filtro = new StringBuilder(); + SimpleDateFormat format = new SimpleDateFormat("dd/MM/yyyy"); + + if (!validar()) { + return; + } + + if (dtInicial.getValue() != null) { + filtro.append("Período: ") + .append(format.format(dtInicial.getValue())) + .append(" - ") + .append(format.format(dtFinal.getValue())) + .append(";"); + } + + filtro.append("Agência: "); + String puntoVentaIds = ""; + String puntoVentas = ""; + List lsPuntoVentaSelecionados = new ArrayList(Arrays.asList(puntoVentaSelList.getData())); + if (lsPuntoVentaSelecionados.size() > 0) { + for (int i = 0; i < lsPuntoVentaSelecionados.size(); i++) { + PuntoVenta puntoVenta = lsPuntoVentaSelecionados.get(i); + puntoVentas = puntoVentas + puntoVenta.getNombpuntoventa() + ","; + puntoVentaIds = puntoVentaIds + puntoVenta.getPuntoventaId() + ","; + } + + puntoVentaIds = puntoVentaIds.substring(0, puntoVentaIds.length() - 1); + puntoVentas = puntoVentas.substring(0, puntoVentas.length() - 1); + parametros.put("NUMPUNTOVENTA", puntoVentaIds); + } else { + filtro.append("Todas "); + } + + filtro.append(puntoVentas).append(";"); + + + filtro.append("Bilheteiro: "); + Comboitem itemUsuario = cmbUsuario.getSelectedItem(); + if (itemUsuario != null) { + Usuario usuario = (Usuario) itemUsuario.getValue(); + if(usuario.getUsuarioId() != -1) { + parametros.put("BILHETEIRO_ID", usuario.getUsuarioId()); + filtro.append(usuario.getNombusuario() + ";"); + }else { + filtro.append(" Todos; "); + } + } else { + filtro.append(" Todos; "); + } + + parametros.put("DATA_INICIAL", (java.util.Date) dtInicial.getValue()); + parametros.put("DATA_FINAL", (java.util.Date) dtFinal.getValue()); + + parametros.put("NOME_RELATORIO", Labels.getLabel("relatorioTrocoSimples.window.title")); + parametros.put("USUARIO", UsuarioLogado.getUsuarioLogado().getUsuarioId().toString()); + parametros.put("USUARIO_NOME", UsuarioLogado.getUsuarioLogado().getNombusuario()); + + + filtro.append("Empresa: "); + Comboitem itemEmpresa = cmbEmpresa.getSelectedItem(); + if (itemEmpresa != null) { + Empresa empresa = (Empresa) itemEmpresa.getValue(); + parametros.put("EMPRESA_ID", empresa.getEmpresaId()); + filtro.append(empresa.getNombempresa() + ";"); + } else { + filtro.append(" Todas; "); + } + + parametros.put("FILTROS", filtro.toString()); + relatorio = new RelatorioTrocoSimples(parametros, dataSourceRead.getConnection()); + + Map args = new HashMap(); + args.put("relatorio", relatorio); + + openWindow("/component/reportView.zul", + Labels.getLabel("relatorioTrocoSimples.window.title"), args, MODAL); + } + + private boolean validar() { + try { + if (dtInicial.getValue() == null || dtFinal.getValue() == null) { + Messagebox.show(Labels.getLabel("relatorioTrocoSimples.MSG.informarDatas"), + Labels.getLabel("relatorioTrocoSimples.window.title"), + Messagebox.OK, Messagebox.INFORMATION); + return false; + } + } catch (InterruptedException ex) { + return false; + } + return true; + } + + public void onClick$btnExecutarRelatorio(Event ev) throws Exception { + executarRelatorio(); + } + + private void executarPesquisa() { + HibernateSearchObject puntoVentaBusqueda = new HibernateSearchObject(PuntoVenta.class, pagingPuntoVenta.getPageSize()); + + puntoVentaBusqueda.addFilterILike("nombpuntoventa", "%" + txtNombrePuntoVenta.getValue() + "%"); + puntoVentaBusqueda.addFilterEqual("activo", Boolean.TRUE); + puntoVentaBusqueda.addFilterNotEqual("puntoventaId", -1); + puntoVentaBusqueda.addSortAsc("nombpuntoventa"); + puntoVentaBusqueda.addFilterEqual("activo", Boolean.TRUE); + plwPuntoVenta.init(puntoVentaBusqueda, puntoVentaList, pagingPuntoVenta); + + if (puntoVentaList.getData().length == 0) { + try { + Messagebox.show(Labels.getLabel("MSG.ningunRegistro"), + Labels.getLabel("relatorioVendasBilheteiroController.window.title"), + Messagebox.OK, Messagebox.INFORMATION); + } catch (InterruptedException ex) { + ex.printStackTrace(); + } + } + } + + public void onClick$btnPesquisa(Event ev) { + executarPesquisa(); + } + + public void onDoubleClick$puntoVentaSelList(Event ev) { + PuntoVenta puntoVenta = (PuntoVenta) puntoVentaSelList.getSelected(); + puntoVentaSelList.removeItem(puntoVenta); + } + + public void onDoubleClick$puntoVentaList(Event ev) { + PuntoVenta puntoVenta = (PuntoVenta) puntoVentaList.getSelected(); + puntoVentaSelList.addItemNovo(puntoVenta); + } + + public void onClick$btnLimpar(Event ev) { + puntoVentaList.setData(new ArrayList()); + bbPesquisaPuntoVenta.setText(""); + } + + public List getLsEmpresa() { + return lsEmpresa; + } + + public void setLsEmpresa(List lsEmpresa) { + this.lsEmpresa = lsEmpresa; + } + + public MyComboboxEstandar getCmbEmpresa() { + return cmbEmpresa; + } + + public void setCmbEmpresa(MyComboboxEstandar cmbEmpresa) { + this.cmbEmpresa = cmbEmpresa; + } + + public PagedListWrapper getPlwPuntoVenta() { + return plwPuntoVenta; + } + + public void setPlwPuntoVenta(PagedListWrapper plwPuntoVenta) { + this.plwPuntoVenta = plwPuntoVenta; + } + + public MyTextbox getTxtNombrePuntoVenta() { + return txtNombrePuntoVenta; + } + + public void setTxtNombrePuntoVenta(MyTextbox txtNombrePuntoVenta) { + this.txtNombrePuntoVenta = txtNombrePuntoVenta; + } + + public MyListbox getPuntoVentaList() { + return puntoVentaList; + } + + public void setPuntoVentaList(MyListbox puntoVentaList) { + this.puntoVentaList = puntoVentaList; + } + + public MyListbox getPuntoVentaSelList() { + return puntoVentaSelList; + } + + public void setPuntoVentaSelList(MyListbox puntoVentaSelList) { + this.puntoVentaSelList = puntoVentaSelList; + } + + public Datebox getDtVendaInicial() { + return dtInicial; + } + + public void setDtVendaInicial(Datebox dtVendaInicial) { + this.dtInicial = dtVendaInicial; + } + + public Datebox getDtVendaFinal() { + return dtFinal; + } + + public void setDtVendaFinal(Datebox dtVendaFinal) { + this.dtFinal = dtVendaFinal; + } + +} diff --git a/src/java/com/rjconsultores/ventaboletos/web/utilerias/menu/item/esquemaoperacional/ItemMenuRelatorioTrocoSimples.java b/src/java/com/rjconsultores/ventaboletos/web/utilerias/menu/item/esquemaoperacional/ItemMenuRelatorioTrocoSimples.java new file mode 100644 index 000000000..3a631c847 --- /dev/null +++ b/src/java/com/rjconsultores/ventaboletos/web/utilerias/menu/item/esquemaoperacional/ItemMenuRelatorioTrocoSimples.java @@ -0,0 +1,26 @@ +package com.rjconsultores.ventaboletos.web.utilerias.menu.item.esquemaoperacional; + +import org.zkoss.util.resource.Labels; + +import com.rjconsultores.ventaboletos.constantes.ConstantesFuncionSistema; +import com.rjconsultores.ventaboletos.web.utilerias.PantallaUtileria; +import com.rjconsultores.ventaboletos.web.utilerias.menu.DefaultItemMenuSistema; + +public class ItemMenuRelatorioTrocoSimples extends DefaultItemMenuSistema { + + public ItemMenuRelatorioTrocoSimples() { + super("indexController.mniTrocoSimples.mniRelatorioTrocoSimples.label"); + } + + @Override + public String getClaveMenu() { + return ConstantesFuncionSistema.CLAVE_RELATORIO_TROCO_SIMPLES; + } + + @Override + public void ejecutar() { + PantallaUtileria.openWindow("/gui/relatorios/filtroRelatorioTrocoSimples.zul", + Labels.getLabel("relatorioTrocoSimples.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 23a1c773e..b19420b56 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 @@ -94,6 +94,7 @@ esquemaOperacional.configuracaoVendaEmbarcada=com.rjconsultores.ventaboletos.web esquemaOperacional.configuracaoVendaEmbarcada.ItemMenuCadastroOperadorEmbarcada=com.rjconsultores.ventaboletos.web.utilerias.menu.item.esquemaoperacional.ItemMenuCadastroOperadorEmbarcada esquemaOperacional.trocoSimples=com.rjconsultores.ventaboletos.web.utilerias.menu.item.esquemaoperacional.SubMenuTrocoSimples esquemaOperacional.trocoSimples.ItemMenuCadastroEmpresaTrocoSimples=com.rjconsultores.ventaboletos.web.utilerias.menu.item.esquemaoperacional.ItemMenuCadastroEmpresaTrocoSimples +esquemaOperacional.trocoSimples.ItemMenuRelatorioTrocoSimples=com.rjconsultores.ventaboletos.web.utilerias.menu.item.esquemaoperacional.ItemMenuRelatorioTrocoSimples tarifasOficial=com.rjconsultores.ventaboletos.web.utilerias.menu.item.tarifasOficial.MenuTarifasOficial tarifasOficial.seguroKm=com.rjconsultores.ventaboletos.web.utilerias.menu.item.tarifasOficial.ItemMenuSeguroKm tarifasOficial.seguroTarifa=com.rjconsultores.ventaboletos.web.utilerias.menu.item.tarifasOficial.ItemMenuSeguroTarifa diff --git a/web/WEB-INF/i3-label_es_MX.label b/web/WEB-INF/i3-label_es_MX.label index afaa9a68e..b29b78a96 100644 --- a/web/WEB-INF/i3-label_es_MX.label +++ b/web/WEB-INF/i3-label_es_MX.label @@ -8218,6 +8218,11 @@ editarEmpresaTrocoSimples.valorSugerir=Valor para Sugestão de Troco Simples editarEmpresaTrocoSimples.token=Token editarEmpresaTrocoSimples.MSG.suscribirOK = Cadastro da empresa no Troco Simples registrado com sucesso. editarEmpresaTrocoSimples.MSG.cadastroExistente = Já existe uma configuração para esta Empresa. +editarEmpresaTrocoSimples.MSG.borrarPergunta = Remover configurações do troco simples para empresa? +editarEmpresaTrocoSimples.MSG.borrarOK = Configuração removida com Sucesso. +editarConvenioController.MSG.erro= Erro ao salvar +busquedaEmpresaTrocoSimples.valorSugerir= Valor Sugerido + editarEmpresaTrocoSimples.MSG.borrarPergunta = Remover configurações do troco simples para empresa? editarEmpresaTrocoSimples.MSG.borrarOK = Configuração removida com Sucesso. diff --git a/web/WEB-INF/i3-label_pt_BR.label b/web/WEB-INF/i3-label_pt_BR.label index f6b5f0b38..84a4f81f8 100644 --- a/web/WEB-INF/i3-label_pt_BR.label +++ b/web/WEB-INF/i3-label_pt_BR.label @@ -8725,6 +8725,16 @@ editarEmpresaTrocoSimples.MSG.borrarOK = Configuração removida com Sucesso. editarConvenioController.MSG.erro= Erro ao salvar busquedaEmpresaTrocoSimples.valorSugerir= Valor Sugerido +indexController.mniTrocoSimples.mniRelatorioTrocoSimples.label=Relatório Troco Simples +relatorioTrocoSimples.window.title=Relatório Troco Simples +relatorioTrocoSimples.dataInicial.label=Data Inicial +relatorioTrocoSimples.dataFinal.label=Data Final +relatorioTrocoSimples.empresa.label=Empresa +relatorioTrocoSimples.puntoVenta.label=Agência +relatorioTrocoSimples.bilheteiro.label=Bilheteiro +relatorioTrocoSimples.MSG.informarDatas=Favor informar Data Inicial e Data Final. + + #viewTestEmailController viewTestEmailController.window.title= Testar configurações da conta viewTestEmailController.btnFechar.tooltiptext = Apagar diff --git a/web/gui/relatorios/filtroRelatorioTrocoSimples.zul b/web/gui/relatorios/filtroRelatorioTrocoSimples.zul new file mode 100644 index 000000000..19da7dc67 --- /dev/null +++ b/web/gui/relatorios/filtroRelatorioTrocoSimples.zul @@ -0,0 +1,113 @@ + + + + + + + + + + + + + + + + + + + + + + +