diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/impl/RelatorioBilhetesVendidos.java b/src/java/com/rjconsultores/ventaboletos/relatorios/impl/RelatorioBilhetesVendidos.java index 31062e2b4..5285c06be 100644 --- a/src/java/com/rjconsultores/ventaboletos/relatorios/impl/RelatorioBilhetesVendidos.java +++ b/src/java/com/rjconsultores/ventaboletos/relatorios/impl/RelatorioBilhetesVendidos.java @@ -70,7 +70,9 @@ public class RelatorioBilhetesVendidos extends Relatorio { sql.append(" JOIN PARADA p_destino on p_destino.PARADA_ID = B.DESTINO_ID "); sql.append(" JOIN CATEGORIA ct on ct.CATEGORIA_ID = B.CATEGORIA_ID "); sql.append(" JOIN CLASE_SERVICIO cs on cs.CLASESERVICIO_ID = B.CLASESERVICIO_ID "); - sql.append(" JOIN MARCA m on m.marca_id = B.marca_id "); + sql.append(" JOIN MARCA m on m.marca_id = b.marca_id "); + sql.append(" left join ciudad co ON co.ciudad_id = p_origen.ciudad_id "); + sql.append(" left join estado est ON est.estado_id = co.estado_id "); sql.append(" WHERE "); sql.append(" m.EMPRESA_ID = :EMPRESA_ID "); sql.append(" and B.FECHORVENTA >= :DATA_INICIAL "); @@ -78,6 +80,9 @@ public class RelatorioBilhetesVendidos extends Relatorio { if (parametros.get("NUMPUNTOVENTA") != null && !parametros.get("NUMPUNTOVENTA").equals("-1")) { sql.append(" and pv.PUNTOVENTA_ID IN (" + parametros.get("NUMPUNTOVENTA").toString() + ")"); } + if (parametros.get("ESTADO_ID") != null && !parametros.get("ESTADO_ID").equals("-1")) { + sql.append(" and est.estado_id = " + parametros.get("ESTADO_ID").toString() + ""); + } if (parametros.get("STATUS") != null) { if (parametros.get("STATUS").toString().contains("V") && parametros.get("STATUS").toString().contains("C")) { sql.append(" AND ((b.INDSTATUSBOLETO = 'C' AND B.MOTIVOCANCELACION_ID IS NOT NULL) OR (b.INDSTATUSBOLETO = 'V' AND B.MOTIVOCANCELACION_ID IS NULL)) "); diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/impl/RelatorioBilhetesVendidosNovoLayout.java b/src/java/com/rjconsultores/ventaboletos/relatorios/impl/RelatorioBilhetesVendidosNovoLayout.java new file mode 100644 index 000000000..993daa4f5 --- /dev/null +++ b/src/java/com/rjconsultores/ventaboletos/relatorios/impl/RelatorioBilhetesVendidosNovoLayout.java @@ -0,0 +1,151 @@ +/** + * + */ +package com.rjconsultores.ventaboletos.relatorios.impl; + +import java.math.BigDecimal; +import java.sql.Connection; +import java.sql.ResultSet; +import java.sql.Timestamp; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.List; +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.relatorios.utilitarios.RelatorioBilhetesVendidosNovoLayoutBean; +import com.rjconsultores.ventaboletos.relatorios.utilitarios.RelatorioVendasPTABean; +import com.rjconsultores.ventaboletos.utilerias.DateUtil; +import com.rjconsultores.ventaboletos.web.utilerias.NamedParameterStatement; + +import net.sf.jasperreports.engine.data.JRBeanCollectionDataSource; + +/** + * @author Wallace + * + */ +public class RelatorioBilhetesVendidosNovoLayout extends Relatorio { + + public RelatorioBilhetesVendidosNovoLayout(Map parametros, Connection conexao) throws Exception { + super(parametros, conexao); + } + + private List lsDadosRelatorio; + + @Override + protected void processaParametros() throws Exception { + + 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 est.cveestado as cveestado, ae.decespecie as especie, "); + sql.append(" a.acfiscal as numaidf,"); + sql.append(" c.fechorventa as datavenda,"); + sql.append(" a.forminicial as forminicial,"); + sql.append(" a.formfinal as formfinal,"); + sql.append(" a.serie AS serie,"); + sql.append(" a.subserie as subserie,"); + sql.append(" est.icms AS valoraliquiotaicms,"); + sql.append(" c.preciopagado as valorcontabil,"); + sql.append(" c.preciopagado - (c.preciopagado * coalesce(ei.porcredbaseicms / 100,0))AS valorbasecalculo, "); + sql.append(" (c.preciopagado - (c.preciopagado * coalesce(ei.porcredbaseicms / 100,0)) * est.icms) / 100 AS valoricms, "); + sql.append(" c.INDSTATUSBOLETO statuspassagem "); + sql.append("FROM boleto c "); + sql.append("LEFT join aidf a ON a.aidf_id = c.aidf_id "); + sql.append("LEFT join aidf_especie ae ON (a.aidfesp_id = ae.aidfesp_id) "); + sql.append("join empresa e ON e.empresa_id = c.empresacorrida_id "); + sql.append("join parada po ON po.parada_id = c.origen_id "); + sql.append("join ciudad co ON co.ciudad_id = po.ciudad_id "); + sql.append("join estado est ON est.estado_id = co.estado_id "); + sql.append("INNER join empresa_imposto ei ON ei.empresa_id = e.empresa_id "); + sql.append("JOIN PUNTO_VENTA pv on c.PUNTOVENTA_ID = pv.PUNTOVENTA_ID "); + sql.append("AND ei.estado_id = est.estado_id "); + sql.append(" where "); + sql.append(" c.empresacorrida_id = :EMPRESA_ID "); + sql.append(" and c.fechorventa BETWEEN :DATA_INICIAL AND :DATA_FINAL "); + sql.append(" and c.activo = 1"); + sql.append(" and ei.activo = 1"); + if (parametros.get("NUMPUNTOVENTA") != null && !parametros.get("NUMPUNTOVENTA").equals("-1")) { + sql.append(" and pv.PUNTOVENTA_ID IN (" + parametros.get("NUMPUNTOVENTA").toString() + ")"); + } + if (parametros.get("ESTADO_ID") != null && !parametros.get("ESTADO_ID").equals("-1")) { + sql.append(" and est.estado_id = " + parametros.get("ESTADO_ID").toString() + ""); + } + if (parametros.get("STATUS") != null) { + if (parametros.get("STATUS").toString().contains("V") && parametros.get("STATUS").toString().contains("C")) { + sql.append(" AND ((c.INDSTATUSBOLETO = 'C' AND c.MOTIVOCANCELACION_ID IS NOT NULL) OR (c.INDSTATUSBOLETO = 'V' AND c.MOTIVOCANCELACION_ID IS NULL)) "); + } else if (parametros.get("STATUS").toString().contains("C")) { + sql.append(" AND c.INDSTATUSBOLETO = 'C' AND c.MOTIVOCANCELACION_ID IS NOT NULL"); + } else if (parametros.get("STATUS").toString().contains("V")) { + sql.append(" AND c.INDSTATUSBOLETO = 'V' AND c.MOTIVOCANCELACION_ID IS NULL"); + } + } + + NamedParameterStatement stmt = new NamedParameterStatement(conexao, sql.toString()); + + 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())); + + ResultSet rset = stmt.executeQuery(); + lsDadosRelatorio = new ArrayList(); + + while (rset.next()) { + + RelatorioBilhetesVendidosNovoLayoutBean bean = new RelatorioBilhetesVendidosNovoLayoutBean(); + + Map dataResult = new HashMap(); + + if (rset.getString("SERIE") != null) { + if (rset.getString("SERIE").split("-").length == 1) { + dataResult.put("SERIE", rset.getString("SERIE")); + } else { + dataResult.put("SERIE", rset.getString("SERIE").split("-")[0]); + dataResult.put("SUB_SERIE", rset.getString("SERIE").split("-")[1]); + } + } + + if (rset.getString("statuspassagem") != null) { + dataResult.put("statuspassagem", IndStatusBoleto.valueOf(rset.getString("statuspassagem")).getValue()); + } + + bean.setNumAIDF((String) (rset.getObject("numaidf") == null ? "" : rset.getObject("numaidf"))); + bean.setDataVenda((Date) (rset.getObject("datavenda") == null ? "" : rset.getObject("datavenda"))); + bean.setFormInicial((String) (rset.getObject("formInicial") == null ? "" : rset.getObject("formInicial"))); + bean.setFormFinal((String) (rset.getObject("formfinal") == null ? "" : rset.getObject("formfinal"))); + bean.setSerie((String) (rset.getObject("serie") == null ? "" : rset.getObject("serie"))); + bean.setSubSerie((String) (rset.getObject("subserie") == null ? "" : rset.getObject("subserie"))); + bean.setValorContabil((BigDecimal) (rset.getObject("valorcontabil") == null ? "" : rset.getObject("valorcontabil"))); + bean.setValorBaseCalculo((BigDecimal) (rset.getObject("valorbasecalculo") == null ? "" : rset.getObject("valorbasecalculo"))); + bean.setValorAliquiotaICMS((BigDecimal) (rset.getObject("valoraliquiotaicms") == null ? "" : rset.getObject("valoraliquiotaicms"))); + bean.setValorICMS((BigDecimal) (rset.getObject("valoricms") == null ? "" : rset.getObject("valoricms"))); + bean.setUf((String) (rset.getObject("cveestado") == null ? "" : rset.getObject("cveestado"))); + bean.setStatusPassagem((String) (rset.getObject("statuspassagem") == null ? "" : IndStatusBoleto.valueOf(rset.getString("statuspassagem")).getValue())); + bean.setEspecie((String) (rset.getObject("especie") == null ? "" : rset.getObject("especie"))); + + lsDadosRelatorio.add(bean); + + } + + if (lsDadosRelatorio.size() > 0) { + setLsDadosRelatorio(lsDadosRelatorio); + } + } + }); + } + + public void setLsDadosRelatorio(List lsDadosRelatorio) { + this.setCollectionDataSource(new JRBeanCollectionDataSource(lsDadosRelatorio)); + this.lsDadosRelatorio = lsDadosRelatorio; + } + +} diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/internacionalizacao/RelatorioBilhetesVendidosNovoLayout_es.properties b/src/java/com/rjconsultores/ventaboletos/relatorios/internacionalizacao/RelatorioBilhetesVendidosNovoLayout_es.properties new file mode 100644 index 000000000..75e5cef72 --- /dev/null +++ b/src/java/com/rjconsultores/ventaboletos/relatorios/internacionalizacao/RelatorioBilhetesVendidosNovoLayout_es.properties @@ -0,0 +1,25 @@ +#geral +msg.noData=Não foi possivel obter dados com os parâmetros informados. + +#Labels cabeçalho +cabecalho.nome=Relatório Documentos Fiscais +cabecalho.relatorio=Relatório +label.periodo=Período: +label.UF=UF +label.especie=Espécie +label.empresa=Empresa: +label.formInicial=Nº Inicial +label.formFinal=Nº Final +label.numAIDF=AIDF +label.serie=Série +label.status=Status +label.subSerie=SubSérie +label.valorContabil=Vlr Contábil +label.valorBaseCalculo=Vlr Base Cálc. +label.valorAliquiotaICMS=Alíquota ICMS +label.valorICMS=Valor ICMS +label.dataVenda=Data Venda +label.valorCancelado=Qtd. Cancec +header.periodo=Período: +header.tipoLinha=Tipo Linha: +header.estado=Estado diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/internacionalizacao/RelatorioBilhetesVendidosNovoLayout_pt_BR.properties b/src/java/com/rjconsultores/ventaboletos/relatorios/internacionalizacao/RelatorioBilhetesVendidosNovoLayout_pt_BR.properties new file mode 100644 index 000000000..75e5cef72 --- /dev/null +++ b/src/java/com/rjconsultores/ventaboletos/relatorios/internacionalizacao/RelatorioBilhetesVendidosNovoLayout_pt_BR.properties @@ -0,0 +1,25 @@ +#geral +msg.noData=Não foi possivel obter dados com os parâmetros informados. + +#Labels cabeçalho +cabecalho.nome=Relatório Documentos Fiscais +cabecalho.relatorio=Relatório +label.periodo=Período: +label.UF=UF +label.especie=Espécie +label.empresa=Empresa: +label.formInicial=Nº Inicial +label.formFinal=Nº Final +label.numAIDF=AIDF +label.serie=Série +label.status=Status +label.subSerie=SubSérie +label.valorContabil=Vlr Contábil +label.valorBaseCalculo=Vlr Base Cálc. +label.valorAliquiotaICMS=Alíquota ICMS +label.valorICMS=Valor ICMS +label.dataVenda=Data Venda +label.valorCancelado=Qtd. Cancec +header.periodo=Período: +header.tipoLinha=Tipo Linha: +header.estado=Estado diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioBilhetesVendidosNovoLayout.jasper b/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioBilhetesVendidosNovoLayout.jasper new file mode 100644 index 000000000..641f0c9ff Binary files /dev/null and b/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioBilhetesVendidosNovoLayout.jasper differ diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioBilhetesVendidosNovoLayout.jrxml b/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioBilhetesVendidosNovoLayout.jrxml new file mode 100644 index 000000000..b186acfe3 --- /dev/null +++ b/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioBilhetesVendidosNovoLayout.jrxml @@ -0,0 +1,358 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <band height="28"> + <textField> + <reportElement x="142" y="2" width="416" height="20" uuid="e15d26de-6873-4576-b49b-8dc546b39dbe"/> + <textElement textAlignment="Center"> + <font size="12" isBold="true"/> + </textElement> + <textFieldExpression><![CDATA[$P{TITULO}]]></textFieldExpression> + </textField> + </band> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/utilitarios/RelatorioBilhetesVendidosNovoLayoutBean.java b/src/java/com/rjconsultores/ventaboletos/relatorios/utilitarios/RelatorioBilhetesVendidosNovoLayoutBean.java new file mode 100644 index 000000000..994a804b6 --- /dev/null +++ b/src/java/com/rjconsultores/ventaboletos/relatorios/utilitarios/RelatorioBilhetesVendidosNovoLayoutBean.java @@ -0,0 +1,144 @@ +package com.rjconsultores.ventaboletos.relatorios.utilitarios; + +import java.math.BigDecimal; +import java.util.Date; + +public class RelatorioBilhetesVendidosNovoLayoutBean { + + private String numAIDF; + private String formInicial; + private String formFinal; + private String serie; + private String subSerie; + private BigDecimal valorContabil; + private BigDecimal valorBaseCalculo; + private BigDecimal valorAliquiotaICMS; + private BigDecimal valorICMS; + private String uf; + private String especie; + private Integer estadoId; + private String statusPassagem; + private String bilhete; + private Date dataVenda; + + public String getNumAIDF() { + return numAIDF; + } + + public void setNumAIDF(String numAIDF) { + this.numAIDF = numAIDF; + } + + public String getFormInicial() { + return formInicial; + } + + public void setFormInicial(String formInicial) { + this.formInicial = formInicial; + } + + public String getFormFinal() { + return formFinal; + } + + public void setFormFinal(String formFinal) { + this.formFinal = formFinal; + } + + public String getSerie() { + return serie; + } + + public void setSerie(String serie) { + this.serie = serie; + } + + public String getSubSerie() { + return subSerie; + } + + public void setSubSerie(String subSerie) { + this.subSerie = subSerie; + } + + public BigDecimal getValorContabil() { + return valorContabil; + } + + public void setValorContabil(BigDecimal valorContabil) { + this.valorContabil = valorContabil; + } + + public BigDecimal getValorBaseCalculo() { + return valorBaseCalculo; + } + + public void setValorBaseCalculo(BigDecimal valorBaseCalculo) { + this.valorBaseCalculo = valorBaseCalculo; + } + + public BigDecimal getValorAliquiotaICMS() { + return valorAliquiotaICMS; + } + + public void setValorAliquiotaICMS(BigDecimal valorAliquiotaICMS) { + this.valorAliquiotaICMS = valorAliquiotaICMS; + } + + public BigDecimal getValorICMS() { + return valorICMS; + } + + public void setValorICMS(BigDecimal valorICMS) { + this.valorICMS = valorICMS; + } + + public String getUf() { + return uf; + } + + public void setUf(String uf) { + this.uf = uf; + } + + public Integer getEstadoId() { + return estadoId; + } + + public void setEstadoId(Integer estadoId) { + this.estadoId = estadoId; + } + + public String getEspecie() { + return especie; + } + + public void setEspecie(String especie) { + this.especie = especie; + } + + public String getStatusPassagem() { + return statusPassagem; + } + + public void setStatusPassagem(String statusPassagem) { + this.statusPassagem = statusPassagem; + } + + public String getBilhete() { + return bilhete; + } + + public void setBilhete(String bilhete) { + this.bilhete = bilhete; + } + + public Date getDataVenda() { + return dataVenda; + } + + public void setDataVenda(Date dataVenda) { + this.dataVenda = dataVenda; + } + +} diff --git a/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/relatorios/RelatorioBilhetesVendidosController.java b/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/relatorios/RelatorioBilhetesVendidosController.java index bfc17d546..19680ed91 100644 --- a/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/relatorios/RelatorioBilhetesVendidosController.java +++ b/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/relatorios/RelatorioBilhetesVendidosController.java @@ -8,7 +8,6 @@ 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; @@ -23,11 +22,14 @@ import org.zkoss.zul.Datebox; import org.zkoss.zul.Paging; import com.rjconsultores.ventaboletos.entidad.Empresa; +import com.rjconsultores.ventaboletos.entidad.Estado; import com.rjconsultores.ventaboletos.entidad.PuntoVenta; import com.rjconsultores.ventaboletos.enums.IndStatusBoleto; import com.rjconsultores.ventaboletos.relatorios.impl.RelatorioBilhetesVendidos; +import com.rjconsultores.ventaboletos.relatorios.impl.RelatorioBilhetesVendidosNovoLayout; import com.rjconsultores.ventaboletos.relatorios.utilitarios.Relatorio; import com.rjconsultores.ventaboletos.service.EmpresaService; +import com.rjconsultores.ventaboletos.service.EstadoService; import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado; import com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar; import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer; @@ -54,42 +56,30 @@ public class RelatorioBilhetesVendidosController extends MyGenericForwardCompose private Datebox datInicial; private Datebox datFinal; - private MyComboboxEstandar cmbEmpresa; + private MyComboboxEstandar cmbEstado; private List lsEmpresa; - + private List lsEstado; @Autowired private transient PagedListWrapper plwPuntoVenta; - private MyTextbox txtNombrePuntoVenta; private Bandbox bbPesquisaPuntoVenta; private MyListbox puntoVentaList; private MyListbox puntoVentaSelList; private Paging pagingPuntoVenta; - private Checkbox chkVendido; private Checkbox chkCancelado; -// private Checkbox chkTransferido; -// private Checkbox chkEntregue; -// private Checkbox chkReservado; -// private Checkbox chkExtraviado; -// private Checkbox chkReimpresso; -// private Checkbox chkMarcado; + @Autowired + private EstadoService estadoService; @Override public void doAfterCompose(Component comp) throws Exception { lsEmpresa = empresaService.obtenerTodos(); + lsEstado = estadoService.obtenerTodos(); super.doAfterCompose(comp); chkVendido.setChecked(true); chkCancelado.setChecked(true); -// chkTransferido.setChecked(true); -// chkEntregue.setChecked(true); -// chkReservado.setChecked(true); -// chkExtraviado.setChecked(true); -// chkReimpresso.setChecked(true); -// chkMarcado.setChecked(true); - puntoVentaList.setItemRenderer(new RenderRelatorioVendasBilheteiro()); } @@ -102,6 +92,14 @@ public class RelatorioBilhetesVendidosController extends MyGenericForwardCompose this.lsEmpresa = lsEmpresa; } + public List getLsEstado() { + return lsEstado; + } + + public void setLsEstado(List lsEstado) { + this.lsEstado = lsEstado; + } + private void executarPesquisaAgencia() { HibernateSearchObject puntoVentaBusqueda = new HibernateSearchObject(PuntoVenta.class, pagingPuntoVenta.getPageSize()); @@ -147,7 +145,10 @@ public class RelatorioBilhetesVendidosController extends MyGenericForwardCompose } public void onClick$btnExecutarRelatorio(Event ev) throws Exception { - executarRelatorio(); + executarRelatorio(false); + } + public void onClick$btnExecutarRelatorioNovoLayout(Event ev) throws Exception { + executarRelatorio(true); } /** @@ -155,7 +156,7 @@ public class RelatorioBilhetesVendidosController extends MyGenericForwardCompose * */ @SuppressWarnings({ "rawtypes", "unchecked" }) - private void executarRelatorio() throws Exception { + private void executarRelatorio(boolean novoLayout) throws Exception { Relatorio relatorio; Map parametros = new HashMap(); StringBuilder filtro = new StringBuilder(); @@ -190,24 +191,6 @@ public class RelatorioBilhetesVendidosController extends MyGenericForwardCompose if (chkCancelado.isChecked()) { status += "'" + IndStatusBoleto.C + "',"; } -// if (chkEntregue.isChecked()) { -// status += "'" + IndStatusBoleto.E + "',"; -// } -// if (chkExtraviado.isChecked()) { -// status += "'" + IndStatusBoleto.X + "',"; -// } -// if (chkMarcado.isChecked()) { -// status += "'" + IndStatusBoleto.M + "',"; -// } -// if (chkReimpresso.isChecked()) { -// status += "'" + IndStatusBoleto.R + "',"; -// } -// if (chkReservado.isChecked()) { -// status += "'" + IndStatusBoleto.S + "',"; -// } -// if (chkTransferido.isChecked()) { -// status += "'" + IndStatusBoleto.T + "',"; -// } if (chkVendido.isChecked()) { status += "'" + IndStatusBoleto.V + "',"; } @@ -229,13 +212,27 @@ public class RelatorioBilhetesVendidosController extends MyGenericForwardCompose } else { filtro.append(" Todas;"); } + + Comboitem itemEstado = cmbEstado.getSelectedItem(); + if (itemEstado != null) { + Estado estado = (Estado) itemEstado.getValue(); + parametros.put("ESTADO_ID", estado.getEstadoId()); + parametros.put("ESTADO", estado.getNombestado()); + } else{ + parametros.put("ESTADO", "TODOS"); + } + if(novoLayout){ + relatorio = new RelatorioBilhetesVendidosNovoLayout(parametros, dataSourceRead.getConnection()); + parametros.put("TITULO", Labels.getLabel("relatorioBilhetesVendidosController.window.title")); + }else{ + relatorio = new RelatorioBilhetesVendidos(parametros, dataSourceRead.getConnection()); + } parametros.put("FILTROS", filtro.toString()); - relatorio = new RelatorioBilhetesVendidos(parametros, dataSourceRead.getConnection()); - + Map args = new HashMap(); args.put("relatorio", relatorio); - openWindow("/component/reportView.zul", Labels.getLabel("relatorioVendasBilheteiroController.window.title"), args, MODAL); + openWindow("/component/reportView.zul", Labels.getLabel("relatorioBilhetesVendidosController.window.title"), args, MODAL); } } diff --git a/web/WEB-INF/i3-label_es_MX.label b/web/WEB-INF/i3-label_es_MX.label index cd4c7633d..142b6af4c 100644 --- a/web/WEB-INF/i3-label_es_MX.label +++ b/web/WEB-INF/i3-label_es_MX.label @@ -425,6 +425,25 @@ relatorioAproveitamentoController.HoraServico.label = Hora servicio relatorioAproveitamentoController.Classe.label = Clase relatorioAproveitamentoController.btnBuscarServico.label = Buscar servicio +# Relatório Bilhetes Vendidos +relatorioBilhetesVendidosController.window.title = Bilhetes Vendidos +relatorioBilhetesVendidosController.lbDatInicial.value = Fecha inicio +relatorioBilhetesVendidosController.lbDatFinal.value = Fecha final +relatorioBilhetesVendidosController.lbEmpresa.value = Empresa +relatorioBilhetesVendidosController.lbPuntoVenta.value = Agência +relatorioBilhetesVendidosController.lbEstado.value = Estado +relatorioBilhetesVendidosController.lbStatus.value = Status +relatorioBilhetesVendidosController.lbNumero.value = Número +relatorioBilhetesVendidosController.vendido.label = Vendido +relatorioBilhetesVendidosController.cancelado.label = Cancelado +relatorioBilhetesVendidosController.transferido.label = Transferido +relatorioBilhetesVendidosController.entregue.label = Entregue +relatorioBilhetesVendidosController.reservado.label = Reservado +relatorioBilhetesVendidosController.extravidado.label = Extraviado +relatorioBilhetesVendidosController.reimpresso.label = Reimpresso +relatorioBilhetesVendidosController.marcado.label = Marcado +relatorioBilhetesVendidosController.categoria.label = Categoria + # Relatorio Empresa Corrida relatorioEmpresaCorridaController.window.title=Reporte empresa corrida relatorioEmpresaCorridaController.lbDataIni.value=Fecha inicio diff --git a/web/WEB-INF/i3-label_pt_BR.label b/web/WEB-INF/i3-label_pt_BR.label index 44d430b3b..ff311e635 100644 --- a/web/WEB-INF/i3-label_pt_BR.label +++ b/web/WEB-INF/i3-label_pt_BR.label @@ -6789,6 +6789,7 @@ relatorioBilhetesVendidosController.lbDatInicial.value = Data Inicial relatorioBilhetesVendidosController.lbDatFinal.value = Data Final relatorioBilhetesVendidosController.lbEmpresa.value = Empresa relatorioBilhetesVendidosController.lbPuntoVenta.value = Agência +relatorioBilhetesVendidosController.lbEstado.value = Estado relatorioBilhetesVendidosController.lbStatus.value = Status relatorioBilhetesVendidosController.lbNumero.value = Número relatorioBilhetesVendidosController.vendido.label = Vendido diff --git a/web/gui/relatorios/filtroRelatorioBilhetesVendidos.zul b/web/gui/relatorios/filtroRelatorioBilhetesVendidos.zul index 182e28aca..d6dcee377 100644 --- a/web/gui/relatorios/filtroRelatorioBilhetesVendidos.zul +++ b/web/gui/relatorios/filtroRelatorioBilhetesVendidos.zul @@ -4,51 +4,48 @@ - - + - - - - + + + + - - + + - - + - - + + - - - + + + + +