From 5f46826a4ea8cc57152bd0f5d883ffe928aafe81 Mon Sep 17 00:00:00 2001 From: "bruno.neves" Date: Tue, 8 Aug 2017 21:28:23 +0000 Subject: [PATCH] =?UTF-8?q?fix=20bug=20#0009476=20-=20Desenvolvimento=20do?= =?UTF-8?q?=20Relat=C3=B3rio=20de=20Vendas=20por=20Bilheteiro=20Sintetico?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@72439 d1611594-4594-4d17-8e1d-87c2c4800839 --- .../RelatorioVendasBilheteiroSintetico.java | 116 +++++++ ...VendasBilheteiroSintetico_pt_BR.properties | 13 + .../RelatorioVendasBilheteiroSintetico.jasper | Bin 0 -> 39516 bytes .../RelatorioVendasBilheteiroSintetico.jrxml | 289 ++++++++++++++++++ ...ioVendasBilheteiroSinteticoController.java | 241 +++++++++++++++ ...enuRelatorioVendasBilheteiroSintetico.java | 32 ++ .../utilerias/menu/menu_original.properties | 1 + ...derRelatorioVendasBilheteiroSintetico.java | 40 +++ ...VendasBilheteiroSinteticoSelecionados.java | 61 ++++ web/WEB-INF/i3-label_es_MX.label | 12 + .../filtroRelatorioVendasBilheteiro.zul | 2 +- ...ltroRelatorioVendasBilheteiroSintetico.zul | 121 ++++++++ 12 files changed, 927 insertions(+), 1 deletion(-) create mode 100644 src/java/com/rjconsultores/ventaboletos/relatorios/impl/RelatorioVendasBilheteiroSintetico.java create mode 100644 src/java/com/rjconsultores/ventaboletos/relatorios/internacionalizacao/RelatorioVendasBilheteiroSintetico_pt_BR.properties create mode 100644 src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioVendasBilheteiroSintetico.jasper create mode 100644 src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioVendasBilheteiroSintetico.jrxml create mode 100644 src/java/com/rjconsultores/ventaboletos/web/gui/controladores/relatorios/RelatorioVendasBilheteiroSinteticoController.java create mode 100644 src/java/com/rjconsultores/ventaboletos/web/utilerias/menu/item/relatorios/ItemMenuRelatorioVendasBilheteiroSintetico.java create mode 100644 src/java/com/rjconsultores/ventaboletos/web/utilerias/render/RenderRelatorioVendasBilheteiroSintetico.java create mode 100644 src/java/com/rjconsultores/ventaboletos/web/utilerias/render/RenderRelatorioVendasBilheteiroSinteticoSelecionados.java create mode 100644 web/gui/relatorios/filtroRelatorioVendasBilheteiroSintetico.zul diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/impl/RelatorioVendasBilheteiroSintetico.java b/src/java/com/rjconsultores/ventaboletos/relatorios/impl/RelatorioVendasBilheteiroSintetico.java new file mode 100644 index 000000000..40a879328 --- /dev/null +++ b/src/java/com/rjconsultores/ventaboletos/relatorios/impl/RelatorioVendasBilheteiroSintetico.java @@ -0,0 +1,116 @@ +/** + * + */ +package com.rjconsultores.ventaboletos.relatorios.impl; + +import java.sql.Connection; +import java.sql.ResultSet; +import java.sql.Timestamp; +import java.util.Date; +import java.util.HashMap; +import java.util.Map; + +import com.rjconsultores.ventaboletos.relatorios.utilitarios.ArrayDataSource; +import com.rjconsultores.ventaboletos.relatorios.utilitarios.Relatorio; +import com.rjconsultores.ventaboletos.utilerias.DateUtil; +import com.rjconsultores.ventaboletos.web.utilerias.NamedParameterStatement; + +/** + * @author Bruno Neves + * + */ +public class RelatorioVendasBilheteiroSintetico extends Relatorio { + + + public RelatorioVendasBilheteiroSintetico(Map parametros, Connection conexao) throws Exception { + super(parametros, conexao); + + this.setCustomDataSource(new ArrayDataSource(this) { + @Override + public void initDados() throws Exception { + + Connection conexao = this.relatorio.getConexao(); + Map parametros = this.relatorio.getParametros(); + + StringBuilder sql = new StringBuilder(); + + sql.append("select "); + sql.append(" pv.NUMPUNTOVENTA, us.cveusuario , us.NOMBUSUARIO, "); + sql.append(" sum (case when ca.motivocancelacion_id is null then 1 else 0 end) qtdVendas, "); + sql.append(" sum (case when ca.motivocancelacion_id is null then "); + sql.append(" (coalesce(ca.preciopagado,0) "); + sql.append(" + coalesce(ca.importepedagio,0) "); + sql.append(" + coalesce(ca.importetaxaembarque,0) "); + sql.append(" + coalesce(ca.importeseguro,0) ) else 0 end ) vlrVendas, "); + sql.append(" sum (case when ca.motivocancelacion_id is not null then 1 else 0 end) qtdCancelados, "); + sql.append(" sum (case when ca.motivocancelacion_id is not null then "); + sql.append(" (coalesce(ca.preciopagado,0) "); + sql.append(" + coalesce(ca.importepedagio,0) "); + sql.append(" + coalesce(ca.importetaxaembarque,0) "); + sql.append(" + coalesce(ca.importeseguro,0) ) else 0 end ) vlrCancelados "); + sql.append("from "); + sql.append(" caja ca "); + sql.append(" inner join usuario us on us.usuario_id = ca.usuario_id "); + sql.append(" inner join punto_venta pv on pv.puntoventa_id = ca.puntoventa_id "); + sql.append("where "); + sql.append(" ca.indreimpresion = 0 "); + sql.append(" and ca.feccorte >= :DATA_INICIAL "); + sql.append(" and ca.feccorte <= :DATA_FINAL "); + if(parametros.get("EMPRESA_ID") != null){ + sql.append(" and ca.EMPRESAPUNTOVENTA_ID = :EMPRESA_ID"); + } + + if (parametros.get("NUMPUNTOVENTA") != null) { + sql.append(" and ca.puntoventa_id IN (" + parametros.get("NUMPUNTOVENTA").toString() + ")"); + } + if(parametros.get("TIPOPUNTOVENTA_ID") != null && !parametros.get("TIPOPUNTOVENTA_ID").toString().equals("-1") ){ + sql.append(" and pv.TIPOPTOVTA_ID = :TIPOPUNTOVENTA_ID "); + } + sql.append(" group by pv.NUMPUNTOVENTA, us.cveusuario, us.NOMBUSUARIO "); + sql.append(" order by pv.NUMPUNTOVENTA, us.NOMBUSUARIO "); + + + NamedParameterStatement stmt = new NamedParameterStatement(conexao, sql.toString()); + if(parametros.get("EMPRESA_ID") != null){ + stmt.setInt("EMPRESA_ID", Integer.valueOf(parametros.get("EMPRESA_ID").toString())); + } + + stmt.setTimestamp("DATA_INICIAL", new Timestamp(DateUtil.inicioFecha((Date) parametros.get("DATA_INICIAL")).getTime())); + stmt.setTimestamp("DATA_FINAL", new Timestamp(DateUtil.fimFecha((Date) parametros.get("DATA_FINAL")).getTime())); + if(parametros.get("TIPOPUNTOVENTA_ID") != null && !parametros.get("TIPOPUNTOVENTA_ID").toString().equals("-1") ){ + stmt.setInt("TIPOPUNTOVENTA_ID", Integer.valueOf(parametros.get("TIPOPUNTOVENTA_ID").toString())); + } + + ResultSet rset = stmt.executeQuery(); + + while (rset.next()) { + + Map dataResult = new HashMap(); + + dataResult.put("NUMPUNTOVENTA", rset.getString("NUMPUNTOVENTA")); + dataResult.put("CVEUSUARIO", rset.getString("CVEUSUARIO")); + dataResult.put("NOMBUSUARIO", rset.getString("NOMBUSUARIO")); + dataResult.put("QTDVENDAS", rset.getInt("QTDVENDAS")); + dataResult.put("VLRVENDAS", rset.getBigDecimal("VLRVENDAS")); + dataResult.put("QTDCANCELADOS", rset.getInt("QTDCANCELADOS")); + dataResult.put("VLRCANCELADOS", rset.getBigDecimal("VLRCANCELADOS")); + this.dados.add(dataResult); + + } + + this.resultSet = rset; + } + }); + } + + /* + * (non-Javadoc) + * + * @see com.rjconsultores.ventaboletos.relatorios.utilitarios.Relatorio#processaParametros() + */ + @Override + protected void processaParametros() throws Exception { + + } + +} diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/internacionalizacao/RelatorioVendasBilheteiroSintetico_pt_BR.properties b/src/java/com/rjconsultores/ventaboletos/relatorios/internacionalizacao/RelatorioVendasBilheteiroSintetico_pt_BR.properties new file mode 100644 index 000000000..01f6ecc2b --- /dev/null +++ b/src/java/com/rjconsultores/ventaboletos/relatorios/internacionalizacao/RelatorioVendasBilheteiroSintetico_pt_BR.properties @@ -0,0 +1,13 @@ +#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: \ No newline at end of file diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioVendasBilheteiroSintetico.jasper b/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioVendasBilheteiroSintetico.jasper new file mode 100644 index 0000000000000000000000000000000000000000..3216e6a0055d16d5f229c466d86ed3354b30334f GIT binary patch literal 39516 zcmeHw33wdEv48jIT1zWgmW@vc1_M5kd|)sbFgooux~#*-HnCVqD{JkQR_v~9i7OZf zb3?e#gv$g71k7b~2f|H40s#`vBqV`w1Of?PDNtV9wz9gZInYqw)*7e^Fn@bAk%;!x1!HJrfZ7u2@9C|K_V*?Ngb6)0 z_XRtEngd-G?o4#AVa4I~z0p{xF^HVOL^#^JhK&u!Ya-ELqEh6miAEEl7$uB1_xJP! zV}tdf%}5?v!=^e>tHOzHidz;6c7|f*y`6ThqHw$=oQQ-}o&d{_gt`(E(F#@&jfF$K zAUNs;s85s-Uf&I@N6~}8u>t@PHPH}5(Lg^&3GAkhN<{nY(uy{BhkEOy#KD%qzECa8 zZx42CTpt4&IumT4TF|~M-c@GEMVXX~G9r6#C-^p6QmZN)3w01$3AP|@#sq3AYwGWH zGF12W_n;iVEJxCT*q`mhNg|23wanKEbmO5!Ji%tHOgJ$#7wpOsU!Ie(MRUx7Vu1aW0>{VT(U1?QS%^SX|Mn}R$O>0?h zoLCE~*l#$gu$h||m)%pKv6hWWgnIfS!3332He4A}-?XS4U{p?mdaY{FShHiPRxKR9 zRjZ5+DOxtr$Jk>n(7faD<5C4%v*lGrW-VvTYNi-UGLAu|&(2V7QXiH@kyg)3uQYSJ zL!?R8FzBe}zDPJx9*IOZhdOK7SiwO;zIvc97K+D(9+;K3y~~^2w4h&MUo48zClLw|Vr_h>7);PGROEmaGv=l(Ur4iPBb6xm5Mv86q-u2} z)B`QO6p9qgqd%gqh2GrJ9gcLy0JCuvUA;CO7dk4W>B-mK3 zUj%v+q4l8{iu841&?fUtG*>-0Lr~~>20C{)#)9LJCKxG?!1y82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=!H5||%sWQR@h(C37Du>G1VK&$LB0iooD70&0YOdy zLAE0H+h_nLkE#K`Q4P2rg}$o_eg6^mJ}INwC4VwvsF5ETFA4ZI(^k#`|`m@o0dNRWc?HO_~N4VBVIS<2e@L>So}>x_+9*N#_t~d9>os_3)rjp zy^Y@|_@N|TfZrtirsGG0P9=UT@Po@R-+&*!jLo;=2Nlil!|y570R?3h;x`e${qQ>g zzY6@|NceBBr-1i92ue*`oiKorZ({?;X#S;hY5t>DRV|Mc00B8naqm!%}fC&J0SP+sk`{J zv3%d1d?vE4ms#QA8_zo2CUtOgXYpF%l442v(M29 z{?50tFVGRbZN*73PkkRM=0_(Chn54Miuhgc`_!>!Z#66-8p zXPW9^QkFKfv$j$Mc8zR{kTtjX%cE<&UG(rvZ5eD&aY(gr7kr z`~oWBMW}>dK_$EbmGA~s!kbVDZ$Tye4l3atsDwX4C42yt@F%E*kD(GiflBxI)puL9nPM!mayloO7^N%#on-%vA3-Nd)KOCpIG(m zQ>%%6fey#4RlLADiWgZ&^GVh>FbQi|t^?Z@F5#w-#*I0dgg>@`%vHE$N zwTZW5tlnT9&wH$I@d4{(e!TTPlywn**1F8H z&~bCD?^=b{_pD;;I&|9Wttsfl`&lL5lRfQ$o(2r!mptc-hoP}hDBvD bXvwi2ZZZj$_LV=52hnou#C0e?pV + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/relatorios/RelatorioVendasBilheteiroSinteticoController.java b/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/relatorios/RelatorioVendasBilheteiroSinteticoController.java new file mode 100644 index 000000000..ad844d5b6 --- /dev/null +++ b/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/relatorios/RelatorioVendasBilheteiroSinteticoController.java @@ -0,0 +1,241 @@ +/** + * + */ +package com.rjconsultores.ventaboletos.web.gui.controladores.relatorios; + +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.apache.log4j.Logger; +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.TipoPuntoVenta; +import com.rjconsultores.ventaboletos.relatorios.impl.RelatorioVendasBilheteiroSintetico; +import com.rjconsultores.ventaboletos.relatorios.utilitarios.Relatorio; +import com.rjconsultores.ventaboletos.service.EmpresaService; +import com.rjconsultores.ventaboletos.service.TipoPuntoVentaService; +import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado; +import com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar; +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.RenderRelatorioVendasBilheteiroSintetico; +import com.rjconsultores.ventaboletos.web.utilerias.render.RenderRelatorioVendasBilheteiroSinteticoSelecionados; + +/** + * @author Bruno Neves + * + */ +@Controller("relatorioVendasBilheteiroSinteticoController") +@Scope("prototype") +public class RelatorioVendasBilheteiroSinteticoController extends MyGenericForwardComposer { + + /** + * + */ + private static final long serialVersionUID = 1L; + private static Logger log = Logger.getLogger(RelatorioVendasBilheteiroSinteticoController.class); + + @Autowired + private DataSource dataSourceRead; + + @Autowired + private EmpresaService empresaService; + + @Autowired + private TipoPuntoVentaService tipoPuntoVentaService; + + private Datebox datInicial; + private Datebox datFinal; + + private MyComboboxEstandar cmbEmpresa; + private List lsEmpresa; + + private MyComboboxEstandar cmbTipoPuntoVenta; + private List lsTipoPuntoVenta; + + @Autowired + private transient PagedListWrapper plwPuntoVenta; + + private MyTextbox txtNombrePuntoVenta; + private Bandbox bbPesquisaPuntoVenta; + private MyListbox puntoVentaList; + private MyListbox puntoVentaSelList; + + private Paging pagingPuntoVenta; + + private MyTextbox txtBilheteiro; + + @Override + public void doAfterCompose(Component comp) throws Exception { + lsEmpresa = empresaService.obtenerTodos(); + lsTipoPuntoVenta = tipoPuntoVentaService.obtenerTodos(); + super.doAfterCompose(comp); + + puntoVentaList.setItemRenderer(new RenderRelatorioVendasBilheteiroSintetico()); + puntoVentaSelList.setItemRenderer(new RenderRelatorioVendasBilheteiroSinteticoSelecionados()); + + } + + public List getLsEmpresa() { + return lsEmpresa; + } + + public void setLsEmpresa(List lsEmpresa) { + this.lsEmpresa = lsEmpresa; + } + + private void executarPesquisa() { + HibernateSearchObject puntoVentaBusqueda = + new HibernateSearchObject(PuntoVenta.class, pagingPuntoVenta.getPageSize()); + + puntoVentaBusqueda.addFilterILike("nombpuntoventa", "%" + txtNombrePuntoVenta.getValue() + "%"); + puntoVentaBusqueda.addFilterEqual("activo", Boolean.TRUE); + + 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("relatorioVendasBilheteiroSinteticoController.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 void onClick$btnExecutarRelatorio(Event ev) throws Exception { + executarRelatorio(); + } + + /** + * @throws Exception + * + */ + @SuppressWarnings({ "rawtypes", "unchecked" }) + private void executarRelatorio() throws Exception { + Relatorio relatorio; + Map parametros = new HashMap(); + StringBuilder filtro = new StringBuilder(); + + filtro.append("Agência: "); + String puntoVentaIds = ""; + String puntoVentas = ""; + List lsPuntoVentaSelecionados = new ArrayList(Arrays.asList(puntoVentaSelList.getData())); + if (lsPuntoVentaSelecionados.isEmpty()) { + puntoVentas = "Todas"; + } else { + for (int i = 0; i < lsPuntoVentaSelecionados.size(); i++) { + PuntoVenta puntoVenta = lsPuntoVentaSelecionados.get(i); + puntoVentas = puntoVentas + puntoVenta.getNombpuntoventa() + ","; + + puntoVentaIds = puntoVentaIds + puntoVenta.getPuntoventaId() + ","; + } + + // removendo ultima virgula + puntoVentaIds = puntoVentaIds.substring(0, puntoVentaIds.length() - 1); + puntoVentas = puntoVentas.substring(0, puntoVentas.length() - 1); + parametros.put("NUMPUNTOVENTA", puntoVentaIds); + } + filtro.append(puntoVentas).append(";"); + + parametros.put("DATA_INICIAL", (java.util.Date) this.datInicial.getValue()); + parametros.put("DATA_FINAL", (java.util.Date) this.datFinal.getValue()); + parametros.put("NOME_RELATORIO", Labels.getLabel("relatorioVendasBilheteiroSinteticoController.window.title")); + parametros.put("USUARIO", UsuarioLogado.getUsuarioLogado().getUsuarioId().toString()); + + filtro.append(" Empresa: "); + + Comboitem itemEmpresa = cmbEmpresa.getSelectedItem(); + if (itemEmpresa != null) { + Empresa empresa = (Empresa) itemEmpresa.getValue(); + parametros.put("EMPRESA_ID", empresa.getEmpresaId()); + parametros.put("EMPRESA", empresa.getNombempresa()); + filtro.append(empresa.getNombempresa() + ";"); + } else { + filtro.append(" Todas;"); + } + + filtro.append(" Canal Vendas: "); + Comboitem itemTipoPuntoVenda = cmbTipoPuntoVenta.getSelectedItem(); + if (itemTipoPuntoVenda != null) { + TipoPuntoVenta tpv = (TipoPuntoVenta) itemTipoPuntoVenda.getValue(); + parametros.put("TIPOPUNTOVENTA_ID", tpv.getTipoptovtaId()); + parametros.put("TIPOPUNTOVENTA", tpv.getDesctipo()); + filtro.append(tpv.getDesctipo() + ";"); + } else { + filtro.append(" Todos;"); + } + + + parametros.put("FILTROS", filtro.toString()); + relatorio = new RelatorioVendasBilheteiroSintetico(parametros, dataSourceRead.getConnection()); + + Map args = new HashMap(); + args.put("relatorio", relatorio); + + openWindow("/component/reportView.zul", + Labels.getLabel("relatorioVendasBilheteiroSinteticoController.window.title"), args, MODAL); + } + + public MyListbox getPuntoVentaSelList() { + return puntoVentaSelList; + } + + public void setPuntoVentaSelList(MyListbox puntoVentaSelList) { + this.puntoVentaSelList = puntoVentaSelList; + } + + public List getLsTipoPuntoVenta() { + return lsTipoPuntoVenta; + } + + public void setLsTipoPuntoVenta(List lsTipoPuntoVenta) { + this.lsTipoPuntoVenta = lsTipoPuntoVenta; + } + +} diff --git a/src/java/com/rjconsultores/ventaboletos/web/utilerias/menu/item/relatorios/ItemMenuRelatorioVendasBilheteiroSintetico.java b/src/java/com/rjconsultores/ventaboletos/web/utilerias/menu/item/relatorios/ItemMenuRelatorioVendasBilheteiroSintetico.java new file mode 100644 index 000000000..6f9ee0bb4 --- /dev/null +++ b/src/java/com/rjconsultores/ventaboletos/web/utilerias/menu/item/relatorios/ItemMenuRelatorioVendasBilheteiroSintetico.java @@ -0,0 +1,32 @@ +/** + * + */ +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; + +/** + * @author Bruno Neves + * + */ +public class ItemMenuRelatorioVendasBilheteiroSintetico extends DefaultItemMenuSistema { + + public ItemMenuRelatorioVendasBilheteiroSintetico() { + super("indexController.mniRelatorioVendasBilheteiroSintetico.label"); + } + + @Override + public String getClaveMenu() { + return "COM.RJCONSULTORES.ADMINISTRACION.GUI.RELATORIOS.MENU.RELATORIOVENDASBILHETEIROSINTETICO"; + } + + @Override + public void ejecutar() { + PantallaUtileria.openWindow("/gui/relatorios/filtroRelatorioVendasBilheteiroSintetico.zul", + Labels.getLabel("relatorioVendasBilheteiroSinteticoController.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 c54693f2a..1d43d65fa 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 @@ -155,6 +155,7 @@ analitico.gerenciais.financeiro.receitaDiariaAgencia=com.rjconsultores.ventabole analitico.gerenciais.financeiro.taxas=com.rjconsultores.ventaboletos.web.utilerias.menu.item.relatorios.ItemMenuRelatorioTaxasLinha analitico.gerenciais.financeiro.ocd=com.rjconsultores.ventaboletos.web.utilerias.menu.item.relatorios.ItemMenuRelatorioOCD analitico.gerenciais.financeiro.vendasBilheteiro=com.rjconsultores.ventaboletos.web.utilerias.menu.item.relatorios.ItemMenuRelatorioVendasBilheteiro +analitico.gerenciais.financeiro.vendasBilheteiroSintetico=com.rjconsultores.ventaboletos.web.utilerias.menu.item.relatorios.ItemMenuRelatorioVendasBilheteiroSintetico analitico.gerenciais.financeiro.receitaServico=com.rjconsultores.ventaboletos.web.utilerias.menu.item.relatorios.ItemMenuRelatorioReceitaServico analitico.gerenciais.financeiro.agenciaFechamento=com.rjconsultores.ventaboletos.web.utilerias.menu.item.relatorios.ItemMenuRelatorioAgenciaFechamento analitico.gerenciais.financeiro.cancelamentoVendaCartao=com.rjconsultores.ventaboletos.web.utilerias.menu.item.relatorios.ItemMenuRelatorioCancelamentoVendaCartao diff --git a/src/java/com/rjconsultores/ventaboletos/web/utilerias/render/RenderRelatorioVendasBilheteiroSintetico.java b/src/java/com/rjconsultores/ventaboletos/web/utilerias/render/RenderRelatorioVendasBilheteiroSintetico.java new file mode 100644 index 000000000..25c5a5e6e --- /dev/null +++ b/src/java/com/rjconsultores/ventaboletos/web/utilerias/render/RenderRelatorioVendasBilheteiroSintetico.java @@ -0,0 +1,40 @@ +/** + * + */ +package com.rjconsultores.ventaboletos.web.utilerias.render; + +import org.zkoss.zul.Listcell; +import org.zkoss.zul.Listitem; +import org.zkoss.zul.ListitemRenderer; + +import com.rjconsultores.ventaboletos.entidad.Empresa; +import com.rjconsultores.ventaboletos.entidad.PuntoVenta; + +/** + * @author Bruno Neves + * + */ +public class RenderRelatorioVendasBilheteiroSintetico implements ListitemRenderer { + + @Override + public void render(Listitem lstm, Object o) throws Exception { + PuntoVenta puntoVenta = (PuntoVenta) o; + + Listcell lc = new Listcell(puntoVenta.getNombpuntoventa()); + lc.setParent(lstm); + + Empresa empresa = puntoVenta.getEmpresa(); + if (empresa != null) { + lc = new Listcell(empresa.getNombempresa()); + } else { + lc = new Listcell(""); + } + lc.setParent(lstm); + + lc = new Listcell(puntoVenta.getNumPuntoVenta()); + lc.setParent(lstm); + + lstm.setAttribute("data", puntoVenta); + } + +} diff --git a/src/java/com/rjconsultores/ventaboletos/web/utilerias/render/RenderRelatorioVendasBilheteiroSinteticoSelecionados.java b/src/java/com/rjconsultores/ventaboletos/web/utilerias/render/RenderRelatorioVendasBilheteiroSinteticoSelecionados.java new file mode 100644 index 000000000..2f9e5d03e --- /dev/null +++ b/src/java/com/rjconsultores/ventaboletos/web/utilerias/render/RenderRelatorioVendasBilheteiroSinteticoSelecionados.java @@ -0,0 +1,61 @@ +/** + * + */ +package com.rjconsultores.ventaboletos.web.utilerias.render; + +import org.zkoss.zk.ui.event.Event; +import org.zkoss.zk.ui.event.EventListener; +import org.zkoss.zul.Button; +import org.zkoss.zul.Listcell; +import org.zkoss.zul.Listitem; +import org.zkoss.zul.ListitemRenderer; + +import com.rjconsultores.ventaboletos.entidad.Empresa; +import com.rjconsultores.ventaboletos.entidad.PuntoVenta; +import com.rjconsultores.ventaboletos.web.utilerias.MyListbox; + +/** + * @author Bruno Neves + * + */ +public class RenderRelatorioVendasBilheteiroSinteticoSelecionados implements ListitemRenderer { + + + public void render(Listitem lstm, Object o) throws Exception { + PuntoVenta puntoVenta = (PuntoVenta) o; + + Listcell lc = new Listcell(puntoVenta.getNombpuntoventa()); + lc.setParent(lstm); + + Empresa empresa = puntoVenta.getEmpresa(); + if (empresa != null) { + lc = new Listcell(empresa.getNombempresa()); + } else { + lc = new Listcell(""); + } + lc.setParent(lstm); + + lc = new Listcell(puntoVenta.getNumPuntoVenta()); + lc.setParent(lstm); + + Button btn = new Button(); + lc = new Listcell(); + lc.setParent(lstm); + + btn.setWidth("16"); + btn.setHeight("16"); + btn.setImage("/gui/img/remove.png"); + + btn.addEventListener("onClick", new EventListener() { + @Override + public void onEvent(Event event) throws Exception { + MyListbox listBox = (MyListbox) event.getTarget().getParent().getParent().getParent(); + Listitem listItem = (Listitem) event.getTarget().getParent().getParent(); + listBox.removeItem((PuntoVenta) listItem.getAttribute("data")); + } + }); + lc.appendChild(btn); + + lstm.setAttribute("data", puntoVenta); + } +} diff --git a/web/WEB-INF/i3-label_es_MX.label b/web/WEB-INF/i3-label_es_MX.label index 0f3694f62..8fa6a6e2f 100644 --- a/web/WEB-INF/i3-label_es_MX.label +++ b/web/WEB-INF/i3-label_es_MX.label @@ -259,6 +259,7 @@ indexController.mniRelatorioOCD.label = Status de OCD indexController.mniRelatorioGratuidade.label = Gratuidades indexController.mniRelatorioGratuidadeIdosoDeficiente.label = Gratuidades Idoso/Deficiente indexController.mniRelatorioVendasBilheteiro.label = Ventas por Agente de Pasajes +indexController.mniRelatorioVendasBilheteiroSintetico.label = Vendas por Bilheteiro Sintético indexController.mniRelatorioAgenciasNaoImportadas.label = Reporte Puntos Venta no Importados indexController.mniRelatorioCheckin.label = Checkin's indexController.mniFechamentoParamgeral.label = Cierre Conta @@ -586,6 +587,17 @@ relatorioVendasBilheteiroController.btnLimpar.label = Limpiar relatorioVendasBilheteiroController.lbNumero.value = Numero punto de venta relatorioVendasBilheteiroController.lbBilheteiro.value = Agente de Pasajes +#Relatório de Vendas por bilheteiro Sintético +relatorioVendasBilheteiroSinteticoController.window.title = Relatório de Vendas por Bilheteiro Sintético +relatorioVendasBilheteiroSinteticoController.lbDatInicial.value = Data inicial +relatorioVendasBilheteiroSinteticoController.lbDatFinal.value = Data final +relatorioVendasBilheteiroSinteticoController.lbPuntoVenta.value = Agência +relatorioVendasBilheteiroSinteticoController.lbEmpresa.value = Empresa +relatorioVendasBilheteiroSinteticoController.btnPesquisa.label = Buscar +relatorioVendasBilheteiroSinteticoController.btnLimpar.label = Limpar +relatorioVendasBilheteiroSinteticoController.lbNumero.value = Número Agência +relatorioVendasBilheteiroSinteticoController.lbBilheteiro.value = Bilheteiro + #Reporte de Demandas relatorioDemandasController.window.title = Reporte de Demandas relatorioDemandasController.lbDatInicial.value = Fecha Inicial diff --git a/web/gui/relatorios/filtroRelatorioVendasBilheteiro.zul b/web/gui/relatorios/filtroRelatorioVendasBilheteiro.zul index 1002d9f03..8f9c34ea8 100644 --- a/web/gui/relatorios/filtroRelatorioVendasBilheteiro.zul +++ b/web/gui/relatorios/filtroRelatorioVendasBilheteiro.zul @@ -6,7 +6,7 @@ diff --git a/web/gui/relatorios/filtroRelatorioVendasBilheteiroSintetico.zul b/web/gui/relatorios/filtroRelatorioVendasBilheteiroSintetico.zul new file mode 100644 index 000000000..fe9ecbb99 --- /dev/null +++ b/web/gui/relatorios/filtroRelatorioVendasBilheteiroSintetico.zul @@ -0,0 +1,121 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +