diff --git a/pom.xml b/pom.xml
index b2d8d7093..e0c8e7770 100644
--- a/pom.xml
+++ b/pom.xml
@@ -4,12 +4,12 @@
4.0.0
br.com.rjconsultores
ventaboletosadm
- 1.45.0
+ 1.46.0
war
- 1.34.0
- 1.26.0
+ 1.35.0
+ 1.27.0
UTF-8
UTF-8
diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/impl/RelatorioRecargaRvhub.java b/src/java/com/rjconsultores/ventaboletos/relatorios/impl/RelatorioRecargaRvhub.java
new file mode 100644
index 000000000..273e26418
--- /dev/null
+++ b/src/java/com/rjconsultores/ventaboletos/relatorios/impl/RelatorioRecargaRvhub.java
@@ -0,0 +1,294 @@
+/**
+ *
+ */
+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;
+
+public class RelatorioRecargaRvhub extends Relatorio {
+
+
+ public RelatorioRecargaRvhub(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();
+
+ if (parametros.get("IDAVOLTA").equals("1")) {
+ sql.append(" select ");
+ sql.append(" u.CVEUSUARIO CVEBILHETEIRO, ");
+ sql.append(" uc.CVEUSUARIO CVEBILHETEIRO_CANCELADO, ");
+ sql.append(" B.indstatusboleto IMPRESSAO_POSTERIOR, ");
+ sql.append(" B.NUMFOLIOSISTEMA NUMERO_PASSAGEM, ");
+ sql.append(" B.NUMSERIEPREIMPRESA SERIE, ");
+ sql.append(" B.NUMSERIEPREIMPRESA SUB_SERIE, ");
+ sql.append(" B.NUMFOLIOPREIMPRESO PRE_IMPRESSO, ");
+ sql.append(" p_origen.PARADA_ID COD_ORIGEM, ");
+ sql.append(" p_origen.DESCPARADA ORIGEM, ");
+ sql.append(" p_destino.PARADA_ID COD_DESTINO, ");
+ sql.append(" p_destino.DESCPARADA DESTINO, ");
+ sql.append(" pv.NUMPUNTOVENTA COD_AGENCIA, ");
+ sql.append(" pv.NOMBPUNTOVENTA NOME_AGENCIA, ");
+ sql.append(" CASE WHEN B.indstatusboleto = 'E' THEN utilizado.fechorventa_h ELSE B.fechorventa_h END DATA_VENDA, ");
+ sql.append(" CASE WHEN b.fechorventa is null THEN utilizado.fechorventa ELSE b.fechorventa_h END DATA_EMISSAO, ");
+ sql.append(" B.fechorviaje DATA_VIAGEM, ");
+ sql.append(" B.CORRIDA_ID SERVICO, ");
+ sql.append(" to_char(B.fechorviaje, 'hh24:mi:ss') HORA, ");
+ sql.append(" B.NUMASIENTO NUMASIENTO, ");
+ sql.append(" ct.DESCCATEGORIA CATEGORIA, ");
+ sql.append(" R.INDSENTIDOIDA SENTIDO, ");
+ sql.append(" R.NUMRUTA COD_LINHA, ");
+ sql.append(" R.DESCRUTA DESC_LINHA, ");
+ sql.append(" CASE WHEN b.MOTIVOCANCELACION_ID IS NULL THEN 'V' ELSE 'C' END STATUS_PASSAGEM, ");
+ sql.append(" B.PRECIOPAGADO TARIFA, ");
+ sql.append(" B.IMPORTETAXAEMBARQUE TX_EMBARQUE, ");
+ sql.append(" B.IMPORTEPEDAGIO PEDAGIO, ");
+ sql.append(" B.IMPORTESEGURO SEGURO, ");
+ sql.append(" u.NOMBUSUARIO BILHETEIRO, ");
+ sql.append(" uc.NOMBUSUARIO BILHETEIRO_CANCELAMENTO, ");
+ sql.append(" B.NOMBPASAJERO AS PASSAGEIRO, ");
+ sql.append(" B.DESCNUMDOC AS DOC, ");
+ sql.append(" COALESCE(b.NUMOPERACION, bo.NUMOPERACION) AS LOCALIZADOR ");
+
+
+ sql.append(" FROM caja B ");
+ sql.append(" LEFT JOIN boleto bo ON (bo.boleto_id = b.transacaooriginal_id AND b.indstatusboleto = 'C') ");
+ sql.append(" JOIN RUTA R ON R.RUTA_ID = B.RUTA_ID ");
+ sql.append(" JOIN PUNTO_VENTA pv on B.PUNTOVENTA_ID = pv.PUNTOVENTA_ID ");
+ sql.append(" JOIN USUARIO u on u.USUARIO_ID = B.USUARIO_ID ");
+ sql.append(" LEFT JOIN USUARIO uc ON uc.USUARIO_ID = bo.USUARIO_ID ");
+ sql.append(" JOIN PARADA p_origen on p_origen.PARADA_ID = B.ORIGEN_ID ");
+ 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(" 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(" LEFT JOIN boleto utilizado ON (utilizado.boleto_id = b.transacaooriginal_id AND b.INDSTATUSBOLETO = 'E') ");
+
+ sql.append(" WHERE ");
+ sql.append(" (b.indreimpresion = 0 OR b.INDSTATUSBOLETO = 'E') ");
+ sql.append(" and m.EMPRESA_ID = :EMPRESA_ID ");
+ if (parametros.get("DATA_INICIAL") != null && parametros.get("DATA_FINAL") != null) {
+ if (parametros.get("TIPO_DATA") != null) {
+ if ((parametros.get("TIPO_DATA").toString().contains("DATA_VENDA"))) {
+ sql.append(" and b.FECHORVENTA_H >= :DATA_INICIAL ");
+ sql.append(" and b.FECHORVENTA_H <= :DATA_FINAL ");
+ } else {
+ sql.append(" and utilizado.FECHORVENTA >= :DATA_INICIAL ");
+ sql.append(" and utilizado.FECHORVENTA <= :DATA_FINAL ");
+ }
+ }
+ }
+
+ if (parametros.get("NUMPUNTOVENTA") != null && !parametros.get("NUMPUNTOVENTA").equals("-1")) {
+ sql.append(" and pv.PUNTOVENTA_ID IN (" + parametros.get("NUMPUNTOVENTA").toString() + ")");
+ }
+
+ if (parametros.get("MOEDA_ID") != null) {
+ sql.append(" and NVL(B.MONEDA_ID, 1) = "+parametros.get("MOEDA_ID") );
+ }
+
+ if (parametros.get("ESTADO_ID") != null && !parametros.get("ESTADO_ID").equals("-1")) {
+ sql.append(" and est.estado_id = " + parametros.get("ESTADO_ID").toString() + "");
+ }
+
+ sql.append(" AND b.INDVIAJEREDONDO = 1 ");
+ }
+
+
+ if (parametros.get("STATUS").toString().contains("C")||parametros.get("STATUS").toString().contains("V")) {
+ if (parametros.get("IDAVOLTA").equals("1")) {
+ sql.append(" UNION ALL ");
+ }
+ sql.append(" select ");
+ sql.append(" u.CVEUSUARIO CVEBILHETEIRO, ");
+ sql.append(" uc.CVEUSUARIO CVEBILHETEIRO_CANCELADO, ");
+ sql.append(" B.indstatusboleto IMPRESSAO_POSTERIOR, ");
+ sql.append(" B.NUMFOLIOSISTEMA NUMERO_PASSAGEM, ");
+ sql.append(" B.NUMSERIEPREIMPRESA SERIE, ");
+ sql.append(" B.NUMSERIEPREIMPRESA SUB_SERIE, ");
+ sql.append(" B.NUMFOLIOPREIMPRESO PRE_IMPRESSO, ");
+ sql.append(" p_origen.PARADA_ID COD_ORIGEM, ");
+ sql.append(" p_origen.DESCPARADA ORIGEM, ");
+ sql.append(" p_destino.PARADA_ID COD_DESTINO, ");
+ sql.append(" p_destino.DESCPARADA DESTINO, ");
+ sql.append(" pv.NUMPUNTOVENTA COD_AGENCIA, ");
+ sql.append(" pv.NOMBPUNTOVENTA NOME_AGENCIA, ");
+ sql.append(" CASE WHEN B.indstatusboleto = 'E' THEN utilizado.fechorventa_h ELSE B.fechorventa_h END DATA_VENDA, ");
+ sql.append(" CASE WHEN b.fechorventa is null THEN utilizado.fechorventa ELSE b.fechorventa_h END DATA_EMISSAO, ");
+ sql.append(" B.fechorviaje DATA_VIAGEM, ");
+ sql.append(" B.CORRIDA_ID SERVICO, ");
+ sql.append(" to_char(B.fechorviaje, 'hh24:mi:ss') HORA, ");
+ sql.append(" B.NUMASIENTO NUMASIENTO, ");
+ sql.append(" ct.DESCCATEGORIA CATEGORIA, ");
+ sql.append(" R.INDSENTIDOIDA SENTIDO, ");
+ sql.append(" R.NUMRUTA COD_LINHA, ");
+ sql.append(" R.DESCRUTA DESC_LINHA, ");
+ sql.append(" CASE WHEN b.MOTIVOCANCELACION_ID IS NULL THEN 'V' ELSE 'C' END STATUS_PASSAGEM, ");
+ sql.append(" B.PRECIOPAGADO TARIFA, ");
+ sql.append(" B.IMPORTETAXAEMBARQUE TX_EMBARQUE, ");
+ sql.append(" B.IMPORTEPEDAGIO PEDAGIO, ");
+ sql.append(" B.IMPORTESEGURO SEGURO, ");
+ sql.append(" u.NOMBUSUARIO BILHETEIRO, ");
+ sql.append(" uc.NOMBUSUARIO BILHETEIRO_CANCELAMENTO, ");
+ sql.append(" B.NOMBPASAJERO AS PASSAGEIRO, ");
+ sql.append(" B.DESCNUMDOC AS DOC, ");
+ sql.append(" COALESCE(b.NUMOPERACION, bo.NUMOPERACION) AS LOCALIZADOR ");
+
+ sql.append(" FROM caja B ");
+ sql.append(" LEFT JOIN boleto bo ON (bo.boleto_id = b.transacaooriginal_id AND b.indstatusboleto = 'C') ");
+ sql.append(" JOIN RUTA R ON R.RUTA_ID = B.RUTA_ID ");
+ sql.append(" JOIN PUNTO_VENTA pv on B.PUNTOVENTA_ID = pv.PUNTOVENTA_ID ");
+ sql.append(" JOIN USUARIO u on u.USUARIO_ID = B.USUARIO_ID ");
+ sql.append(" LEFT JOIN USUARIO uc ON uc.USUARIO_ID = bo.USUARIO_ID ");
+ sql.append(" JOIN PARADA p_origen on p_origen.PARADA_ID = B.ORIGEN_ID ");
+ 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(" 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(" LEFT JOIN boleto utilizado ON (utilizado.boleto_id = b.transacaooriginal_id AND b.INDSTATUSBOLETO = 'E') ");
+
+ sql.append(" WHERE ");
+ sql.append(" (b.indreimpresion = 0 OR b.INDSTATUSBOLETO = 'E') ");
+ sql.append(" and m.EMPRESA_ID = :EMPRESA_ID ");
+ if (parametros.get("DATA_INICIAL") != null && parametros.get("DATA_FINAL") != null) {
+ if (parametros.get("TIPO_DATA") != null) {
+ if ((parametros.get("TIPO_DATA").toString().contains("DATA_VENDA"))) {
+ sql.append(" and b.FECHORVENTA_H >= :DATA_INICIAL ");
+ sql.append(" and b.FECHORVENTA_H <= :DATA_FINAL ");
+ } else {
+ sql.append(" and utilizado.FECHORVENTA >= :DATA_INICIAL ");
+ sql.append(" and utilizado.FECHORVENTA <= :DATA_FINAL ");
+ }
+ }
+ }
+
+ if (parametros.get("NUMPUNTOVENTA") != null && !parametros.get("NUMPUNTOVENTA").equals("-1")) {
+ sql.append(" and pv.PUNTOVENTA_ID IN (" + parametros.get("NUMPUNTOVENTA").toString() + ")");
+ }
+
+ if (parametros.get("MOEDA_ID") != null) {
+ sql.append(" and NVL(B.MONEDA_ID, 1) = "+parametros.get("MOEDA_ID") );
+ }
+
+ 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").toString().contains("V") && parametros.get("STATUS").toString().contains("C")) ) {
+ if (parametros.get("STATUS").toString().contains("C")) {
+ sql.append(" AND b.motivocancelacion_id is not null ");
+ } else if (parametros.get("STATUS").toString().contains("V")) {
+ sql.append(" AND b.motivocancelacion_id is null ");
+ }
+ }
+ sql.append(" and B.ACTIVO = 1 AND b.INDVIAJEREDONDO IS NULL ");
+ }
+ sql.append(" order by ");
+ if (parametros.get("IDAVOLTA").equals("1")) {
+ sql.append(" BILHETEIRO, ");
+ sql.append(" DATA_EMISSAO, ");
+ }else {
+ sql.append(" DATA_EMISSAO, ");
+ sql.append(" BILHETEIRO, ");
+ }
+ sql.append(" COD_AGENCIA, ");
+ sql.append(" NOME_AGENCIA, ");
+ sql.append(" NUMERO_PASSAGEM, ");
+ sql.append(" ORIGEM, ");
+ sql.append(" DESTINO, ");
+ sql.append(" CATEGORIA, ");
+ sql.append(" IMPRESSAO_POSTERIOR, ");
+ sql.append(" SERVICO ");
+
+ NamedParameterStatement stmt = new NamedParameterStatement(conexao, sql.toString());
+
+ stmt.setInt("EMPRESA_ID", Integer.valueOf(parametros.get("EMPRESA_ID").toString()));
+ if (parametros.get("DATA_INICIAL") != null && parametros.get("DATA_FINAL") != null){
+ 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("NUMERO_PASSAGEM", rset.getString("NUMERO_PASSAGEM"));
+ 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]);
+ }
+ }
+ dataResult.put("CVEBILHETEIRO", rset.getString("CVEBILHETEIRO"));
+ dataResult.put("CVEBILHETEIRO_CANCELADO", rset.getString("CVEBILHETEIRO_CANCELADO"));
+ dataResult.put("IMPRESSAO_POSTERIOR", rset.getString("IMPRESSAO_POSTERIOR"));
+ dataResult.put("PRE_IMPRESSO", rset.getString("PRE_IMPRESSO"));
+ dataResult.put("COD_ORIGEM", rset.getString("COD_ORIGEM"));
+ dataResult.put("ORIGEM", rset.getString("ORIGEM"));
+ dataResult.put("COD_DESTINO", rset.getString("COD_DESTINO"));
+ dataResult.put("DESTINO", rset.getString("DESTINO"));
+ dataResult.put("NOME_AGENCIA", rset.getString("NOME_AGENCIA"));
+ dataResult.put("COD_AGENCIA", rset.getString("COD_AGENCIA"));
+ dataResult.put("DATA_VENDA", rset.getDate("DATA_VENDA"));
+ dataResult.put("DATA_EMISSAO", rset.getDate("DATA_EMISSAO"));
+ dataResult.put("DATA_VIAGEM", rset.getDate("DATA_VIAGEM"));
+ dataResult.put("SERVICO", rset.getString("SERVICO"));
+ dataResult.put("HORA", rset.getString("HORA"));
+ dataResult.put("NUMASIENTO", rset.getString("NUMASIENTO"));
+ dataResult.put("CATEGORIA", rset.getString("CATEGORIA"));
+ dataResult.put("SENTIDO", rset.getInt("SENTIDO"));
+ dataResult.put("COD_LINHA", rset.getString("COD_LINHA"));
+ dataResult.put("DESC_LINHA", rset.getString("DESC_LINHA"));
+ if (rset.getString("STATUS_PASSAGEM") != null) {
+ dataResult.put("STATUS_PASSAGEM", IndStatusBoleto.valueOf(rset.getString("STATUS_PASSAGEM")).getValue());
+ }
+ dataResult.put("TARIFA", rset.getString("TARIFA"));
+ dataResult.put("TX_EMBARQUE", rset.getString("TX_EMBARQUE"));
+ dataResult.put("PEDAGIO", rset.getString("PEDAGIO"));
+ dataResult.put("SEGURO", rset.getString("SEGURO"));
+ dataResult.put("BILHETEIRO", rset.getString("BILHETEIRO"));
+ dataResult.put("BILHETEIRO_CANCELAMENTO", rset.getString("BILHETEIRO_CANCELAMENTO"));
+ dataResult.put("PASSAGEIRO", rset.getString("PASSAGEIRO"));
+ dataResult.put("DOC", rset.getString("DOC"));
+ dataResult.put("LOCALIZADOR", rset.getString("LOCALIZADOR"));
+
+ this.dados.add(dataResult);
+
+ }
+
+ this.resultSet = rset;
+ }
+ });
+ }
+
+ @Override
+ protected void processaParametros() throws Exception {
+
+ }
+
+}
diff --git a/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/relatorios/RelatorioRecargaRvhubController.java b/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/relatorios/RelatorioRecargaRvhubController.java
new file mode 100644
index 000000000..cdb0008de
--- /dev/null
+++ b/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/relatorios/RelatorioRecargaRvhubController.java
@@ -0,0 +1,245 @@
+package com.rjconsultores.ventaboletos.web.gui.controladores.relatorios;
+
+import java.text.SimpleDateFormat;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Calendar;
+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.Checkbox;
+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.enums.StatusRecargaEnum;
+import com.rjconsultores.ventaboletos.relatorios.impl.RelatorioRecargaRvhub;
+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.RenderRelatorioVendasBilheteiro;
+
+@Controller("relatorioRecargaRvhubController")
+@Scope("prototype")
+public class RelatorioRecargaRvhubController extends MyGenericForwardComposer {
+
+ private static final String TITULO = "relatorioRecargaRvhubController.window.title";
+
+ private static final long serialVersionUID = 1L;
+
+ @Autowired
+ private DataSource dataSourceRead;
+
+ @Autowired
+ private EmpresaService empresaService;
+
+ @Autowired
+ private transient PagedListWrapper plwPuntoVenta;
+
+ private Datebox datInicial;
+ private Datebox datFinal;
+ private MyComboboxEstandar cmbEmpresa;
+ private List lsEmpresa;
+
+ private MyTextbox txtNombrePuntoVenta;
+ private Bandbox bbPesquisaPuntoVenta;
+ private MyListbox puntoVentaList;
+ private MyListbox puntoVentaSelList;
+ private Paging pagingPuntoVenta;
+ private Checkbox chkAutorizado;
+ private Checkbox chkCancelado;
+ private Checkbox chkConfirmado;
+
+ @Override
+ public void doAfterCompose(Component comp) throws Exception {
+ lsEmpresa = empresaService.obtenerTodos();
+ super.doAfterCompose(comp);
+
+ puntoVentaList.setItemRenderer(new RenderRelatorioVendasBilheteiro());
+
+ }
+
+ public List getLsEmpresa() {
+ return lsEmpresa;
+ }
+
+ public void setLsEmpresa(List lsEmpresa) {
+ this.lsEmpresa = lsEmpresa;
+ }
+
+ private void executarPesquisaAgencia() {
+ 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(TITULO),
+ Messagebox.OK, Messagebox.INFORMATION);
+ } catch (InterruptedException ex) {
+ ex.printStackTrace();
+ }
+ }
+ }
+
+ public void onClick$btnPesquisa(Event ev) {
+ executarPesquisaAgencia();
+ }
+
+ 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();
+ }
+
+ @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");
+ if (this.datInicial.getValue() != null) {
+ parametros.put("datInicial", sdf.format(this.datInicial.getValue()));
+ }
+
+ if (this.datFinal.getValue() != null) {
+ parametros.put("datFinal", sdf.format(this.datFinal.getValue()));
+ }
+
+ if (parametros.get("datInicial") == null && parametros.get("datFinal") == null) {
+ Messagebox.show(Labels.getLabel("MSG.Error.dataObrigatoria"),
+ Labels.getLabel(TITULO),
+ Messagebox.OK, Messagebox.INFORMATION);
+ return;
+ }
+
+ filtro.append("Início período: ");
+ Calendar cal = Calendar.getInstance();
+ cal.setTime(datInicial.getValue());
+ filtro.append(cal.get(Calendar.DATE) + "/");
+ filtro.append((cal.get(Calendar.MONTH) + 1) + "/");
+ filtro.append(cal.get(Calendar.YEAR) + "; ");
+
+ filtro.append("Fim período: ");
+ cal.setTime(datFinal.getValue());
+ filtro.append(cal.get(Calendar.DATE) + "/");
+ filtro.append((cal.get(Calendar.MONTH) + 1) + "/");
+ filtro.append(cal.get(Calendar.YEAR) + "; ");
+
+ 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;");
+ }
+
+ 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("NOME_RELATORIO", Labels.getLabel(TITULO));
+ parametros.put("USUARIO", UsuarioLogado.getUsuarioLogado().getNombusuario());
+
+ StringBuilder status = new StringBuilder();
+ StringBuilder statusDesc = new StringBuilder();
+ if (chkCancelado.isChecked()) {
+ status.append("'" )
+ .append( StatusRecargaEnum.CANCELADA )
+ .append( "',");
+ statusDesc.append("Cancelado,");
+ }
+
+ if (chkAutorizado.isChecked()) {
+ status.append("'" )
+ .append( StatusRecargaEnum.AUTORIZADA )
+ .append( "',");
+ statusDesc.append("Autorizado,");
+ }
+
+ if (chkConfirmado.isChecked()) {
+ status.append("'" )
+ .append( StatusRecargaEnum.CONFIRMADA )
+ .append( "',");
+ statusDesc.append("Confirmado,");
+ }
+
+ if (status.length() > 0) {
+ status.deleteCharAt(status.length() - 1);
+ statusDesc.deleteCharAt(statusDesc.length() - 1);
+ filtro.append("Status: ").append(statusDesc);
+ }
+
+ parametros.put("STATUS", status);
+
+ relatorio = new RelatorioRecargaRvhub(parametros, dataSourceRead.getConnection());
+ parametros.put("FILTROS", filtro.toString());
+
+ Map args = new HashMap();
+ args.put("relatorio", relatorio);
+
+ openWindow("/component/reportView.zul", Labels.getLabel(TITULO), args, MODAL);
+ }
+}
diff --git a/src/java/com/rjconsultores/ventaboletos/web/utilerias/menu/item/relatorios/ItemMenuRelatorioRecargaRvhub.java b/src/java/com/rjconsultores/ventaboletos/web/utilerias/menu/item/relatorios/ItemMenuRelatorioRecargaRvhub.java
new file mode 100644
index 000000000..c6b1b87f0
--- /dev/null
+++ b/src/java/com/rjconsultores/ventaboletos/web/utilerias/menu/item/relatorios/ItemMenuRelatorioRecargaRvhub.java
@@ -0,0 +1,26 @@
+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;
+
+public class ItemMenuRelatorioRecargaRvhub extends DefaultItemMenuSistema {
+
+ public ItemMenuRelatorioRecargaRvhub() {
+ super("indexController.mniRelatorioRecargaRvhub.label");
+ }
+
+ @Override
+ public String getClaveMenu() {
+ return "COM.RJCONSULTORES.ADMINISTRACION.GUI.RELATORIOS.MENU.RELATORIORECARGARVHUB";
+ }
+
+ @Override
+ public void ejecutar() {
+ PantallaUtileria.openWindow("/gui/relatorios/filtroRelatorioRecargaRvhub.zul",
+ Labels.getLabel("relatorioRecargaRvhubController.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 f4c28624f..48c75451a 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
@@ -252,6 +252,7 @@ analitico.gerenciais.financeiro.relatorioResumoVendaOrgaoConcedente=com.rjconsul
analitico.gerenciais.financeiro.relatorioVendasConexaoRuta=com.rjconsultores.ventaboletos.web.utilerias.menu.item.relatorios.ItemMenuRelatorioVendasConexaoRuta
analitico.gerenciais.financeiro.relatorioVendaBilhetePorEmpresaAutorizadora=com.rjconsultores.ventaboletos.web.utilerias.menu.item.relatorios.ItemMenuVendaBilhetePorEmpresaAutorizadora
analitico.gerenciais.financeiro.relatorioDesempenhoPorLinha=com.rjconsultores.ventaboletos.web.utilerias.menu.item.relatorios.ItemMenuRelatorioDesempenhoPorLinha
+analitico.gerenciais.financeiro.relatorioRecargaRvhub=com.rjconsultores.ventaboletos.web.utilerias.menu.item.relatorios.ItemMenuRelatorioRecargaRvhub
analitico.gerenciais.pacote=com.rjconsultores.ventaboletos.web.utilerias.menu.item.analitico.gerenciais.pacote.SubMenuRelatorioPacote
analitico.gerenciais.pacote.boletos=com.rjconsultores.ventaboletos.web.utilerias.menu.item.relatorios.ItemMenuRelatorioVendasPacotesBoletos
analitico.gerenciais.pacote.detalhado=com.rjconsultores.ventaboletos.web.utilerias.menu.item.relatorios.ItemMenuRelatorioVendasPacotesDetalhado
diff --git a/web/WEB-INF/i3-label_en.label b/web/WEB-INF/i3-label_en.label
index 69ff81971..7b70408b3 100644
--- a/web/WEB-INF/i3-label_en.label
+++ b/web/WEB-INF/i3-label_en.label
@@ -56,6 +56,7 @@ MSG.necesita.contaContable = Conta Contábil Obrigatória
MSG.necesita.tipoEvento = Tipo de evento Obrigatório
MSG.necesita.formaPago = Forma de Pagamento Obrigatória
MSG.Error.invalida.competencia = Competência inválida
+MSG.Error.dataObrigatoria = Data inicial e Final são obrigatórias
MSG.Error.invalida.dataInicialDepoisDataFinal = Data Inicial maior do que Data Final
MSG.Error.invalida.dataInicialFinalMesDiferente = Data Inicial e Final são de meses diferentes
MSG.Error.invalida.dataInicialOuDataFinalNaoInformada = Data Inicial ou Data Final não informada
@@ -8367,6 +8368,21 @@ relatorioBilhetesVendidosController.reimpresso.label = Reimpresso
relatorioBilhetesVendidosController.marcado.label = Marcado
relatorioBilhetesVendidosController.categoria.label = Categoria
+# Relatório Recarga Rvhub
+indexController.mniRelatorioRecargaRvhub.label = Recarga Rvhub
+relatorioRecargaRvhubController.window.title = Recarga Rvhub
+relatorioRecargaRvhubController.lbDatInicial.value = Data Venda Inicial
+relatorioRecargaRvhubController.lbDatFinal.value = Data Venda Final
+relatorioRecargaRvhubController.lbEmpresa.value = Empresa
+relatorioRecargaRvhubController.lbPuntoVenta.value = Agência
+relatorioRecargaRvhubController.lbStatus.value = Status
+relatorioRecargaRvhubController.lbNumero.value = Número
+relatorioRecargaRvhubController.autorizado.label = Autorizado
+relatorioRecargaRvhubController.cancelado.label = Cancelado
+relatorioRecargaRvhubController.confirmado.label = Confirmado
+relatorioRecargaRvhubController.MSG.dataInicialMaiorFinal=Data inicial maior que final
+relatorioRecargaRvhubController.data.obrigatoria = Data inicial e Final são obrigatórias
+
# Relatório de Descontos
relatorioDescontosController.window.title = Relatório de Descontos
relatorioDescontosController.lbAgencia.value = Agência
diff --git a/web/WEB-INF/i3-label_es_MX.label b/web/WEB-INF/i3-label_es_MX.label
index 15e3fb27d..38d88a74d 100644
--- a/web/WEB-INF/i3-label_es_MX.label
+++ b/web/WEB-INF/i3-label_es_MX.label
@@ -56,6 +56,7 @@ MSG.necesita.tipoEvento = Tipo de evento obligatório
MSG.necesita.formaPago = Forma de pago obligatória
MSG.Error.invalida.competencia = Competencia inválida
MSG.Error.necessita.puntoVenta = Punto Venta obligatório
+MSG.Error.dataObrigatoria = Data inicial e Final são obrigatórias
MSG.Error.invalida.dataInicialDepoisDataFinal = Data Inicial maior do que Data Final
MSG.Error.invalida.dataInicialFinalMesDiferente = Data Inicial e Final são de meses diferentes
MSG.Error.invalida.dataInicialOuDataFinalNaoInformada = Data Inicial ou Data Final não informada
@@ -590,6 +591,19 @@ relatorioBilhetesVendidosController.reimpresso.label = Reimpresso
relatorioBilhetesVendidosController.marcado.label = Marcado
relatorioBilhetesVendidosController.categoria.label = Categoria
+# Relatório Recarga Rvhub
+indexController.mniRelatorioRecargaRvhub.label = Recarga Rvhub
+relatorioRecargaRvhubController.window.title = Recarga Rvhub
+relatorioRecargaRvhubController.lbDatInicial.value = Data Venda Inicial
+relatorioRecargaRvhubController.lbDatFinal.value = Data Venda Final
+relatorioRecargaRvhubController.lbEmpresa.value = Empresa
+relatorioRecargaRvhubController.lbPuntoVenta.value = Agência
+relatorioRecargaRvhubController.lbStatus.value = Status
+relatorioRecargaRvhubController.lbNumero.value = Número
+relatorioRecargaRvhubController.autorizado.label = Autorizado
+relatorioRecargaRvhubController.cancelado.label = Cancelado
+relatorioRecargaRvhubController.confirmado.label = Confirmado
+
# 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 3b2ae3e76..329f1bb5c 100644
--- a/web/WEB-INF/i3-label_pt_BR.label
+++ b/web/WEB-INF/i3-label_pt_BR.label
@@ -56,6 +56,7 @@ MSG.necesita.contaContable = Conta Contábil Obrigatória
MSG.necesita.tipoEvento = Tipo de evento Obrigatório
MSG.necesita.formaPago = Forma de Pagamento Obrigatória
MSG.Error.invalida.competencia = Competência inválida
+MSG.Error.dataObrigatoria = Data inicial e Final são obrigatórias
MSG.Error.invalida.dataInicialDepoisDataFinal = Data Inicial maior do que Data Final
MSG.Error.invalida.dataInicialFinalMesDiferente = Data Inicial e Final são de meses diferentes
MSG.Error.invalida.dataInicialOuDataFinalNaoInformada = Data Inicial ou Data Final não informada
@@ -8426,6 +8427,19 @@ relatorioBilhetesVendidosController.reimpresso.label = Reimpresso
relatorioBilhetesVendidosController.marcado.label = Marcado
relatorioBilhetesVendidosController.categoria.label = Categoria
+# Relatório Recarga Rvhub
+indexController.mniRelatorioRecargaRvhub.label = Recarga Rvhub
+relatorioRecargaRvhubController.window.title = Recarga Rvhub
+relatorioRecargaRvhubController.lbDatInicial.value = Data Venda Inicial
+relatorioRecargaRvhubController.lbDatFinal.value = Data Venda Final
+relatorioRecargaRvhubController.lbEmpresa.value = Empresa
+relatorioRecargaRvhubController.lbPuntoVenta.value = Agência
+relatorioRecargaRvhubController.lbStatus.value = Status
+relatorioRecargaRvhubController.lbNumero.value = Número
+relatorioRecargaRvhubController.autorizado.label = Autorizado
+relatorioRecargaRvhubController.cancelado.label = Cancelado
+relatorioRecargaRvhubController.confirmado.label = Confirmado
+
# Relatório de Descontos
relatorioDescontosController.window.title = Relatório de Descontos
relatorioDescontosController.lbAgencia.value = Agência
diff --git a/web/gui/relatorios/filtroRelatorioRecargaRvhub.zul b/web/gui/relatorios/filtroRelatorioRecargaRvhub.zul
new file mode 100644
index 000000000..511518626
--- /dev/null
+++ b/web/gui/relatorios/filtroRelatorioRecargaRvhub.zul
@@ -0,0 +1,132 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file