diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/impl/RelatorioPosicaoCaixaAnalitico.java b/src/java/com/rjconsultores/ventaboletos/relatorios/impl/RelatorioPosicaoCaixaAnalitico.java new file mode 100644 index 000000000..354c4fbc3 --- /dev/null +++ b/src/java/com/rjconsultores/ventaboletos/relatorios/impl/RelatorioPosicaoCaixaAnalitico.java @@ -0,0 +1,115 @@ +/** + * + */ +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.IndStatusBoleto; +import com.rjconsultores.ventaboletos.relatorios.utilitarios.Relatorio; +import com.rjconsultores.ventaboletos.utilerias.DateUtil; +import com.rjconsultores.ventaboletos.web.utilerias.NamedParameterStatement; + +/** + * @author Thiago + * + */ +public class RelatorioPosicaoCaixaAnalitico extends Relatorio { + + public RelatorioPosicaoCaixaAnalitico(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(" C.NUMSERIEPREIMPRESA numSerie, "); + sql.append(" C.NUMFOLIOPREIMPRESO numFolioPreImpreso, "); + sql.append(" C.NUMFOLIOSISTEMA numFolioSistema, "); + sql.append(" DECODE(R.INDSENTIDOIDA,1,'IDA',0,'VOLTA') sentido, "); + sql.append(" TV.DESCTIPOVENTA tipoVenta, "); + sql.append(" C.FECHORVENTA fecHorVenta, "); + sql.append(" C.PRECIOPAGADO precioPagado, "); + sql.append(" C.IMPORTETAXAEMBARQUE importeTaxaEmbarque, "); + sql.append(" C.IMPORTEPEDAGIO importePedagio, "); + sql.append(" C.IMPORTESEGURO importeSeguro "); + sql.append(" FROM "); + sql.append(" caja c "); + sql.append(" JOIN TIPO_VENTA tv "); + sql.append(" ON "); + sql.append(" TV.TIPOVENTA_ID = C.TIPOVENTA_ID "); + sql.append(" JOIN ruta r "); + sql.append(" ON "); + sql.append(" R.RUTA_ID = C.RUTA_ID "); + sql.append(" JOIN marca m "); + sql.append(" ON "); + sql.append(" M.MARCA_ID = C.MARCA_ID "); + sql.append(" WHERE "); + sql.append(" C.FECCORTE BETWEEN :DATA_INICIAL AND :DATA_FINAL "); + if(parametros.get("MARCA_ID") != null){ + sql.append(" AND M.EMPRESA_ID = :MARCA_ID "); + } + if (parametros.get("NUMPUNTOVENTA") != null) { + sql.append(" and c.PUNTOVENTA_ID IN (" + parametros.get("NUMPUNTOVENTA").toString() + ")"); + } + sql.append(" AND C.ACTIVO = 1 "); + sql.append(" AND C.INDREIMPRESION = 0 "); + sql.append(" AND C.MOTIVOCANCELACION_ID IS NULL "); + sql.append(" ORDER BY "); + sql.append(" C.NUMSERIEPREIMPRESA, "); + sql.append(" C.NUMFOLIOPREIMPRESO, "); + sql.append(" C.NUMFOLIOSISTEMA, "); + sql.append(" DECODE(R.INDSENTIDOIDA,1,'IDA',0,'VOLTA'), "); + sql.append(" TV.DESCTIPOVENTA, "); + sql.append(" C.FECHORVENTA, "); + sql.append(" C.PRECIOPAGADO, "); + sql.append(" C.IMPORTETAXAEMBARQUE, "); + sql.append(" C.IMPORTEPEDAGIO, "); + sql.append(" C.IMPORTESEGURO "); + + NamedParameterStatement stmt = new NamedParameterStatement(conexao, sql.toString()); + + if(parametros.get("MARCA_ID") != null){ + stmt.setInt("MARCA_ID", Integer.valueOf(parametros.get("MARCA_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())); + + ResultSet rset = stmt.executeQuery(); + + while (rset.next()) { + Map dataResult = new HashMap(); + + dataResult.put("numSerie", rset.getString("numSerie")); + dataResult.put("numFolioPreImpreso", rset.getString("numFolioPreImpreso")); + dataResult.put("numFolioSistema", rset.getString("numFolioSistema")); + dataResult.put("sentido", rset.getString("sentido")); + dataResult.put("tipoVenta", rset.getString("tipoVenta")); + dataResult.put("fecHorVenta", rset.getDate("fecHorVenta")); + dataResult.put("precioPagado", rset.getBigDecimal("precioPagado")); + dataResult.put("importeTaxaEmbarque", rset.getBigDecimal("importeTaxaEmbarque")); + dataResult.put("importePedagio", rset.getBigDecimal("importePedagio")); + dataResult.put("importeSeguro", rset.getBigDecimal("importeSeguro")); + this.dados.add(dataResult); + } + } + + }); + } + + @Override + protected void processaParametros() throws Exception { + + + } + +} diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/internacionalizacao/RelatorioPosicaoCaixaAnalitico_es_MX.properties b/src/java/com/rjconsultores/ventaboletos/relatorios/internacionalizacao/RelatorioPosicaoCaixaAnalitico_es_MX.properties new file mode 100644 index 000000000..8cce83ab0 --- /dev/null +++ b/src/java/com/rjconsultores/ventaboletos/relatorios/internacionalizacao/RelatorioPosicaoCaixaAnalitico_es_MX.properties @@ -0,0 +1,30 @@ +#geral +msg.noData=Não foi possivel obter dados com os parâmetros informados. + +#Labels cabeçalho +cabecalho.nome=Relatório Vendas para Comissão +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: +cabecalho.usuario=Usuário: +#Labels relatorio +empresa.label=Empresa: +puntoVenta.label=Agência: +fisico.label=FÍSICO +logico.label=LÓGICO +sentido.label=SENT. +tipoVenta.label=VENDA +fecVenta.label=DATA DE MOV. +fecLanzamiento.label=DATA DE LAN. +tarifa.label=TARIFA +taxaEmbarque.label=TAXA +pedagio.label=PEDAGIO +seguro.label=SEGURO +total.label=TOTAL +totalGeral.label=TOTAL GERAL: +serie.label=SÉRIE \ No newline at end of file diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/internacionalizacao/RelatorioPosicaoCaixaAnalitico_pt_BR.properties b/src/java/com/rjconsultores/ventaboletos/relatorios/internacionalizacao/RelatorioPosicaoCaixaAnalitico_pt_BR.properties new file mode 100644 index 000000000..8cce83ab0 --- /dev/null +++ b/src/java/com/rjconsultores/ventaboletos/relatorios/internacionalizacao/RelatorioPosicaoCaixaAnalitico_pt_BR.properties @@ -0,0 +1,30 @@ +#geral +msg.noData=Não foi possivel obter dados com os parâmetros informados. + +#Labels cabeçalho +cabecalho.nome=Relatório Vendas para Comissão +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: +cabecalho.usuario=Usuário: +#Labels relatorio +empresa.label=Empresa: +puntoVenta.label=Agência: +fisico.label=FÍSICO +logico.label=LÓGICO +sentido.label=SENT. +tipoVenta.label=VENDA +fecVenta.label=DATA DE MOV. +fecLanzamiento.label=DATA DE LAN. +tarifa.label=TARIFA +taxaEmbarque.label=TAXA +pedagio.label=PEDAGIO +seguro.label=SEGURO +total.label=TOTAL +totalGeral.label=TOTAL GERAL: +serie.label=SÉRIE \ No newline at end of file diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioPosicaoCaixaAnalitico.jasper b/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioPosicaoCaixaAnalitico.jasper new file mode 100644 index 000000000..b97632d3b Binary files /dev/null and b/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioPosicaoCaixaAnalitico.jasper differ diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioPosicaoCaixaAnalitico.jrxml b/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioPosicaoCaixaAnalitico.jrxml new file mode 100644 index 000000000..62c0fcc9f --- /dev/null +++ b/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioPosicaoCaixaAnalitico.jrxml @@ -0,0 +1,344 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <band height="103" splitType="Stretch"> + <textField> + <reportElement uuid="0fbfd2e2-c536-40d4-9991-7c220a916a94" x="0" y="41" width="316" height="20"/> + <textElement> + <font isBold="true"/> + </textElement> + <textFieldExpression><![CDATA[$R{cabecalho.periodo} + " " + $P{fecInicio} + " " + $R{cabecalho.periodoA} + " " + $P{fecFinal}]]></textFieldExpression> + </textField> + <textField> + <reportElement uuid="bea0c3f3-035e-4be8-9983-8920c73a1947" x="53" y="62" width="263" height="20"/> + <textElement/> + <textFieldExpression><![CDATA[$P{empresa}]]></textFieldExpression> + </textField> + <textField> + <reportElement uuid="8a035cb9-84a7-43ea-85b9-963d50bf2b77" x="0" y="21" width="316" height="20"/> + <textElement markup="none"> + <font size="14" isBold="true"/> + </textElement> + <textFieldExpression><![CDATA[$R{cabecalho.nome}]]></textFieldExpression> + </textField> + <textField> + <reportElement uuid="54cfabe9-f8d6-4a9e-beef-46d91d4adf1a" x="0" y="62" width="53" height="20"/> + <textElement/> + <textFieldExpression><![CDATA[$R{empresa.label}]]></textFieldExpression> + </textField> + <textField> + <reportElement uuid="bbc260a6-ce45-4ced-8b20-2b6a9f2990c9" x="0" y="82" width="53" height="20"/> + <textElement/> + <textFieldExpression><![CDATA[$R{puntoVenta.label}]]></textFieldExpression> + </textField> + <textField> + <reportElement uuid="42686c90-bfc5-469a-b81c-4e67d4bbb65f" x="53" y="82" width="263" height="20"/> + <textElement/> + <textFieldExpression><![CDATA[$P{puntoVenta}]]></textFieldExpression> + </textField> + <textField evaluationTime="Report" isBlankWhenNull="true"> + <reportElement uuid="5c46feb2-d147-4c48-9102-233323a255af" x="515" y="0" width="40" height="20"> + <printWhenExpression><![CDATA[$V{PAGE_NUMBER}.intValue() > 1 ? Boolean.FALSE: Boolean.TRUE]]></printWhenExpression> + </reportElement> + <textElement> + <font size="7"/> + </textElement> + <textFieldExpression><![CDATA[" " + $V{PAGE_NUMBER}]]></textFieldExpression> + </textField> + <textField isBlankWhenNull="true"> + <reportElement uuid="43151e61-6111-4384-9495-4d2065cbbe33" x="450" y="0" width="65" height="20"> + <printWhenExpression><![CDATA[$V{PAGE_NUMBER}.intValue() > 1 ? Boolean.FALSE: Boolean.TRUE]]></printWhenExpression> + </reportElement> + <textElement> + <font size="7"/> + </textElement> + <textFieldExpression><![CDATA[$R{cabecalho.pagina} +" "+$V{PAGE_NUMBER}+" "+$R{cabecalho.de}]]></textFieldExpression> + </textField> + <textField pattern="dd/MM/yyyy HH:mm"> + <reportElement uuid="9486c809-433a-43a9-8181-68e49e0fafbd" x="271" y="0" width="164" height="20"> + <printWhenExpression><![CDATA[$V{PAGE_NUMBER}.intValue() > 1 ? Boolean.FALSE: Boolean.TRUE]]></printWhenExpression> + </reportElement> + <textElement textAlignment="Right"> + <font size="7" isBold="true"/> + </textElement> + <textFieldExpression><![CDATA[new java.util.Date()]]></textFieldExpression> + </textField> + <line> + <reportElement uuid="40d18495-6c4b-402f-8252-32cf40350d93" x="0" y="21" width="555" height="1"/> + </line> + </band> + + + + + + 1 ? Boolean.TRUE: Boolean.FALSE]]> + + + + + + + + + 1 ? Boolean.TRUE: Boolean.FALSE]]> + + + + + + + + + 1 ? Boolean.TRUE: Boolean.FALSE]]> + + + + + + + + + 1 ? Boolean.TRUE: Boolean.FALSE]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/relatorios/RelatorioPosicaoCaixaAnaliticoController.java b/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/relatorios/RelatorioPosicaoCaixaAnaliticoController.java new file mode 100644 index 000000000..c87568867 --- /dev/null +++ b/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/relatorios/RelatorioPosicaoCaixaAnaliticoController.java @@ -0,0 +1,202 @@ +package com.rjconsultores.ventaboletos.web.gui.controladores.relatorios; + +import java.text.SimpleDateFormat; +import java.util.ArrayList; +import java.util.Arrays; +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.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.relatorios.impl.RelatorioPosicaoCaixaAnalitico; +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.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.RenderRelatorioPosicaoCaixaAnalitico; +import com.rjconsultores.ventaboletos.web.utilerias.render.RenderRelatorioVendasBilheteiroSelecionados; + +@Controller("relatorioPosicaoCaixaAnaliticoController") +@Scope("prototype") +public class RelatorioPosicaoCaixaAnaliticoController extends MyGenericForwardComposer { + + /** + * + */ + private static final long serialVersionUID = 1L; + + + @Autowired + private DataSource dataSourceRead; + + @Autowired + private EmpresaService empresaService; + + private Datebox datInicial; + private Datebox datFinal; + + private MyComboboxEstandar cmbEmpresa; + private List lsEmpresa; + + @Autowired + private transient PagedListWrapper plwPuntoVenta; + + private MyTextbox txtNombrePuntoVenta; + private Bandbox bbPesquisaPuntoVenta; + private MyListbox puntoVentaList; + private MyListbox puntoVentaSelList; + private Paging pagingPuntoVenta; + + @Override + public void doAfterCompose(Component comp) throws Exception { + setLsEmpresa(empresaService.obtenerTodos()); + super.doAfterCompose(comp); + + puntoVentaList.setItemRenderer(new RenderRelatorioPosicaoCaixaAnalitico()); + puntoVentaSelList.setItemRenderer(new RenderRelatorioVendasBilheteiroSelecionados()); + + } + + 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.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("relatorioPosicaoCaixaAnaliticoController.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(""); + } + + /** + * @throws Exception + * + */ + @SuppressWarnings({ "rawtypes", "unchecked" }) + private void executarRelatorio() throws Exception { + Relatorio relatorio; + Map parametros = new HashMap(); + StringBuilder filtro = new StringBuilder(); + SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy"); + Date dataDe = datInicial.getValue(); + Date dataAte = datFinal.getValue(); + + 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("puntoVenta", filtro.toString()); + parametros.put("DATA_INICIAL", (java.util.Date) this.datInicial.getValue()); + parametros.put("fecInicio", sdf.format(dataDe)); + parametros.put("fecFinal", sdf.format(dataAte)); + parametros.put("DATA_FINAL", (java.util.Date) this.datFinal.getValue()); + parametros.put("NOME_RELATORIO", Labels.getLabel("relatorioPosicaoCaixaAnaliticoController.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("MARCA_ID", empresa.getEmpresaId()); + parametros.put("empresa", empresa.getNombempresa()); + } else { + parametros.put("empresa", "Todas;"); + } + + parametros.put("FILTROS", filtro.toString()); + relatorio = new RelatorioPosicaoCaixaAnalitico(parametros, dataSourceRead.getConnection()); + + Map args = new HashMap(); + args.put("relatorio", relatorio); + + openWindow("/component/reportView.zul", + Labels.getLabel("relatorioPosicaoCaixaAnaliticoController.window.title"), args, MODAL); + } + + /** + * @return the lsEmpresa + */ + public List getLsEmpresa() { + return lsEmpresa; + } + + /** + * @param lsEmpresa the lsEmpresa to set + */ + public void setLsEmpresa(List lsEmpresa) { + this.lsEmpresa = lsEmpresa; + } +} diff --git a/src/java/com/rjconsultores/ventaboletos/web/utilerias/menu/item/contacorrente/ItemMenuRelatorioPosicaoCaixaAnalitico.java b/src/java/com/rjconsultores/ventaboletos/web/utilerias/menu/item/contacorrente/ItemMenuRelatorioPosicaoCaixaAnalitico.java new file mode 100644 index 000000000..03504a9d4 --- /dev/null +++ b/src/java/com/rjconsultores/ventaboletos/web/utilerias/menu/item/contacorrente/ItemMenuRelatorioPosicaoCaixaAnalitico.java @@ -0,0 +1,32 @@ +/** + * + */ +package com.rjconsultores.ventaboletos.web.utilerias.menu.item.contacorrente; + +import org.zkoss.util.resource.Labels; + +import com.rjconsultores.ventaboletos.web.utilerias.PantallaUtileria; +import com.rjconsultores.ventaboletos.web.utilerias.menu.DefaultItemMenuSistema; + +/** + * @author Thiago + * + */ +public class ItemMenuRelatorioPosicaoCaixaAnalitico extends DefaultItemMenuSistema { + + public ItemMenuRelatorioPosicaoCaixaAnalitico() { + super("indexController.mniRelatorioPosicaoCaixaAnalitico.label"); + } + + @Override + public String getClaveMenu() { + return "COM.RJCONSULTORES.ADMINISTRACION.GUI.RELATORIOS.MENU.RELATORIODEPOSITOS"/*"COM.RJCONSULTORES.ADMINISTRACION.GUI.RELATORIOS.MENU.RELATORIOPOSICAOCAIXAANALITICO"*/; + } + + @Override + public void ejecutar() { + PantallaUtileria.openWindow("/gui/relatorios/filtroRelatorioPosicaoCaixaAnalitico.zul", + Labels.getLabel("indexController.mniRelatorioPosicaoCaixaAnalitico.label"), getArgs() ,desktop); + } + +} diff --git a/src/java/com/rjconsultores/ventaboletos/web/utilerias/render/RenderRelatorioPosicaoCaixaAnalitico.java b/src/java/com/rjconsultores/ventaboletos/web/utilerias/render/RenderRelatorioPosicaoCaixaAnalitico.java new file mode 100644 index 000000000..785eda231 --- /dev/null +++ b/src/java/com/rjconsultores/ventaboletos/web/utilerias/render/RenderRelatorioPosicaoCaixaAnalitico.java @@ -0,0 +1,43 @@ +/** + * + */ +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 Thiago + * + */ +public class RenderRelatorioPosicaoCaixaAnalitico 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/RenderRelatorioPosicaoCaixaAnaliticoSelecionado.java b/src/java/com/rjconsultores/ventaboletos/web/utilerias/render/RenderRelatorioPosicaoCaixaAnaliticoSelecionado.java new file mode 100644 index 000000000..7b7c01856 --- /dev/null +++ b/src/java/com/rjconsultores/ventaboletos/web/utilerias/render/RenderRelatorioPosicaoCaixaAnaliticoSelecionado.java @@ -0,0 +1,54 @@ +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; + +public class RenderRelatorioPosicaoCaixaAnaliticoSelecionado 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 3297dbcff..27f28db7f 100644 --- a/web/WEB-INF/i3-label_es_MX.label +++ b/web/WEB-INF/i3-label_es_MX.label @@ -300,6 +300,14 @@ indexController.mniRelatorioDescontos.label = Reporte Descuentos indexController.mniRelatorioDepositos.label=Cierre Cnt Contábil / Depósitos indexController.mniRelatorioDepositosDetalhados.label=Depósitos Detallados +indexController.mniRelatorioPosicaoCaixaAnalitico.label=Relatório de Numeração Lógica +relatorioPosicaoCaixaAnaliticoController.lbPuntoVenta.value=Punto de Venta +relatorioPosicaoCaixaAnaliticoController.lbEmpresa.value=Empresa +relatorioPosicaoCaixaAnaliticoController.lbNumero.value=Número punto de venta +relatorioPosicaoCaixaAnaliticoController.lbDatInicial.value=Fecha Inicio +relatorioPosicaoCaixaAnaliticoController.lbDatFinal.value=Fecha Fin +relatorioPosicaoCaixaAnaliticoController.window.title=Relatório de Numeração Lógica + indexController.mniRelatorioGratuidadeIdosoDeficiente.label = Relatório Gratuidade Idoso/Deficiente #PARTE REALIZADA POR MANUEL @@ -742,6 +750,7 @@ editarCategoriaController.btnApagar.tooltiptext = Eliminar editarCategoriaController.btnSalvar.tooltiptext = Guardar editarCategoriaController.btnFechar.tooltiptext = Cerrar editarCategoriaController.lbNome.value = Descripción +editarCategoriaController.lbDescImpresionGratuidade.value=Descripción Impresión Gratuidad editarCategoriaController.lbGrupoCategoria.value=Grupo categoria editarCategoriaController.MSG.suscribirOK = Tipo de pasaje se registró exitosamente editarCategoriaController.MSG.borrarPergunta = Deseas eliminar este tipo de pasaje? diff --git a/web/WEB-INF/i3-label_pt_BR.label b/web/WEB-INF/i3-label_pt_BR.label index 2b7ebe185..e62425421 100644 --- a/web/WEB-INF/i3-label_pt_BR.label +++ b/web/WEB-INF/i3-label_pt_BR.label @@ -305,6 +305,14 @@ indexController.mniRelatorioDescontos.label = Relatório Descontos indexController.mniRelatorioDepositos.label=Fechamento Cnt Corrente / Depósitos indexController.mniRelatorioDepositosDetalhados.label=Depósitos Detalhados +indexController.mniRelatorioPosicaoCaixaAnalitico.label=Relatório de Numeração Lógica +relatorioPosicaoCaixaAnaliticoController.lbPuntoVenta.value=Punto de Venta +relatorioPosicaoCaixaAnaliticoController.lbEmpresa.value=Empresa +relatorioPosicaoCaixaAnaliticoController.lbNumero.value=Número punto de venta +relatorioPosicaoCaixaAnaliticoController.lbDatInicial.value=Fecha Inicio +relatorioPosicaoCaixaAnaliticoController.lbDatFinal.value=Fecha Fin +relatorioPosicaoCaixaAnaliticoController.window.title=Relatório de Numeração Lógica + #PARTE REALIZADA POR MANUEL indexController.mnCortesias.label = Cortesias Para Funcionários indexController.mniTipoCortesiaD.label = Desconto por Tipo de Cortesia @@ -771,6 +779,7 @@ editarCategoriaController.btnSalvar.tooltiptext = Salvar editarCategoriaController.btnFechar.tooltiptext = Fechar editarCategoriaController.lbNome.value = Descrição editarCategoriaController.lbGrupoCategoria.value=Grupo Categoria +editarCategoriaController.lbDescImpresionGratuidade.value=Descrição Impressão Gratuidade editarCategoriaController.MSG.suscribirOK = Tipo de Passagem Registrado com Sucesso. editarCategoriaController.MSG.borrarPergunta = Deseja Eliminar este tipo de passagem? editarCategoriaController.MSG.borrarOK = Tipo de Passagem Excluido com Sucesso. diff --git a/web/gui/relatorios/filtroRelatorioPosicaoCaixaAnalitico.zul b/web/gui/relatorios/filtroRelatorioPosicaoCaixaAnalitico.zul new file mode 100644 index 000000000..bb497136a --- /dev/null +++ b/web/gui/relatorios/filtroRelatorioPosicaoCaixaAnalitico.zul @@ -0,0 +1,112 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +