diff --git a/pom.xml b/pom.xml
index 1d535bda4..1bd9f9408 100644
--- a/pom.xml
+++ b/pom.xml
@@ -4,7 +4,7 @@
4.0.0
br.com.rjconsultores
ventaboletosadm
- 1.73.0
+ 1.74.0
war
diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/impl/RelatorioOCDReembolsoPix.java b/src/java/com/rjconsultores/ventaboletos/relatorios/impl/RelatorioOCDReembolsoPix.java
new file mode 100644
index 000000000..f50115b6c
--- /dev/null
+++ b/src/java/com/rjconsultores/ventaboletos/relatorios/impl/RelatorioOCDReembolsoPix.java
@@ -0,0 +1,213 @@
+package com.rjconsultores.ventaboletos.relatorios.impl;
+
+import java.sql.Connection;
+import java.sql.ResultSet;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.commons.lang.StringUtils;
+
+import com.rjconsultores.ventaboletos.entidad.PuntoVenta;
+import com.rjconsultores.ventaboletos.relatorios.utilitarios.DataSource;
+import com.rjconsultores.ventaboletos.relatorios.utilitarios.IndOrdenacion;
+import com.rjconsultores.ventaboletos.relatorios.utilitarios.Relatorio;
+import com.rjconsultores.ventaboletos.relatorios.utilitarios.RelatorioOCDBean;
+import com.rjconsultores.ventaboletos.utilerias.OcdUtil;
+import com.rjconsultores.ventaboletos.web.utilerias.NamedParameterStatement;
+
+import net.sf.jasperreports.engine.data.JRBeanCollectionDataSource;
+
+public class RelatorioOCDReembolsoPix extends Relatorio {
+
+ private List lsDadosRelatorio;
+
+ public RelatorioOCDReembolsoPix(Map parametros, Connection conexao) throws Exception {
+ super(parametros, conexao);
+
+ this.setCustomDataSource(new DataSource(this) {
+ @Override
+ public void initDados() throws Exception {
+
+ Connection conexao = this.relatorio.getConexao();
+
+ Map parametros = this.relatorio.getParametros();
+
+ String fecInicio = parametros.get("fecInicio") != null ? parametros.get("fecInicio").toString() + " 00:00" : null;
+ String fecFinal = parametros.get("fecFinal") != null ? parametros.get("fecFinal").toString() + " 23:59" : null;
+ String fecPagoInicio = parametros.get("fecPagoInicio") != null ? parametros.get("fecPagoInicio").toString() + " 00:00" : null;
+ String fecPagoFinal = parametros.get("fecPagoFinal") != null ? parametros.get("fecPagoFinal").toString() + " 23:59" : null;
+ List lsPuntoVenta = parametros.get("puntoventas") == null ? new ArrayList() : (ArrayList) parametros.get("puntoventas");
+
+ String puntoVentas = null;
+ for (PuntoVenta pv : lsPuntoVenta) {
+ if (lsPuntoVenta.indexOf(pv) == 0) {
+ puntoVentas = "" + pv.getPuntoventaId();
+ } else {
+ puntoVentas += ", " + pv.getPuntoventaId();
+ }
+ }
+
+ String localizador = parametros.get("numOperacao").toString();
+ String numoperacion = null;
+ Long ocdId = null;
+ if(OcdUtil.validarLocalizadorOcd(localizador)) {
+ numoperacion = OcdUtil.getNumOcdByLocalizadorOcd(localizador);
+ ocdId = OcdUtil.getOcdIdByLocalizadorOcd(localizador);
+ }
+
+ Integer empresaId = parametros.get("empresa") != null ? Integer.parseInt(parametros.get("empresa").toString()) : null;
+
+ IndOrdenacion ordenacion = (IndOrdenacion) parametros.get("ordenacion");
+
+ String sql = getSql(fecInicio, fecFinal, empresaId, ordenacion, numoperacion, ocdId, fecPagoInicio, fecPagoFinal, puntoVentas);
+
+ NamedParameterStatement stmt = new NamedParameterStatement(conexao, sql);
+ ResultSet rset = null;
+
+ if(StringUtils.isNotBlank(fecInicio)) {
+ stmt.setString("fecInicio", fecInicio);
+ }
+
+ if(StringUtils.isNotBlank(fecFinal)) {
+ stmt.setString("fecFinal", fecFinal);
+ }
+
+ if(StringUtils.isNotBlank(fecPagoInicio)) {
+ stmt.setString("fecPagoInicio", fecPagoInicio);
+ }
+
+ if(StringUtils.isNotBlank(fecPagoFinal)) {
+ stmt.setString("fecPagoFinal", fecPagoFinal);
+ }
+
+ if (empresaId != null) {
+ stmt.setInt("empresaId", empresaId);
+ }
+
+ if(ocdId != null){
+ stmt.setLong("ocdId", ocdId);
+ }
+
+ rset = stmt.executeQuery();
+
+ lsDadosRelatorio = new ArrayList();
+
+ while (rset.next()) {
+// RelatorioOCDBean ocdBean = new RelatorioOCDBean();
+ RelatorioOCDReembolsoPixBean ocdBean = new RelatorioOCDReembolsoPixBean();
+
+ ocdBean.setFecinc(rset.getDate("FECINC"));
+ ocdBean.setFechorventa(rset.getDate("FECHORVENTA"));
+ ocdBean.setEmpresa(rset.getString("NOMBEMPRESA"));
+ ocdBean.setNombpuntoventa(rset.getString("PV_VENDA") != null ? rset.getString("PV_VENDA") : "");
+ ocdBean.setNombpuntoventainc(rset.getString("PV_OCD") != null ? rset.getString("PV_OCD") : "");
+ ocdBean.setNombusuarioinc(rset.getString("USUARIOINC") != null ? rset.getString("USUARIOINC") : "");
+ ocdBean.setNumoperacion(rset.getString("NUMOPERACION"));
+ ocdBean.setPenalizacion(rset.getBigDecimal("PENALIZACION"));
+ ocdBean.setValorOcd(rset.getBigDecimal("VALOR_OCD"));
+ ocdBean.setAsiento(rset.getString("NUMASIENTO"));
+ ocdBean.setOrigem(rset.getString("ORIGEM"));
+ ocdBean.setDestino(rset.getString("DESTINO"));
+ ocdBean.setNumfoliosistema(rset.getString("NUMFOLIOSISTEMA"));
+ ocdBean.setFeccorrida(rset.getDate("FECCORRIDA"));
+ ocdBean.setOcdId(rset.getLong("OCD_ID"));
+ ocdBean.setMotivocancelacionId(rset.getInt("MOTIVOCANCELACION_ID"));
+ ocdBean.setTotalBilhete(rset.getBigDecimal("TOTAL_BILHETE"));
+ ocdBean.setNumoperacion(OcdUtil.generaLocalizadorOCD(ocdBean.getNumoperacion(), ocdBean.getOcdId()));
+ ocdBean.setNomePix(rset.getString("NOME_PIX"));
+ ocdBean.setCpfCnpjPix(rset.getString("CPF_CNPJ_PIX"));
+ ocdBean.setTelefonePix(rset.getString("TELEFONE_PIX"));
+ ocdBean.setTipoChavePix(rset.getString("TIPO_CHAVE_PIX"));
+ ocdBean.setChavePix(rset.getString("CHAVE_PIX"));
+ lsDadosRelatorio.add(ocdBean);
+ }
+
+ if (lsDadosRelatorio.size() > 0) {
+
+ setLsDadosRelatorio(lsDadosRelatorio);
+ }
+ }
+ });
+ }
+
+ public void setLsDadosRelatorio(List lsDadosRelatorio) {
+ this.setCollectionDataSource(new JRBeanCollectionDataSource(lsDadosRelatorio));
+ this.lsDadosRelatorio = lsDadosRelatorio;
+ }
+
+ @Override
+ protected void processaParametros() throws Exception {
+ }
+
+ private String getSql(String fecInicio, String fecFinal, Integer empresaId, IndOrdenacion ordenacion, String numoperacion, Long ocdId,
+ String fecPagoInicio, String fecPagoFinal, String puntoVentas) {
+ StringBuffer sql = new StringBuffer();
+
+ sql.append("SELECT O.OCD_ID, O.NUMOPERACION, E.NOMBEMPRESA, B.NUMFOLIOSISTEMA, ");
+ sql.append("O.FECINC, PVO.NOMBPUNTOVENTA AS PV_OCD, O.PENALIZACION, O.VALOR_ESTORNO_PIX AS VALOR_OCD, ");
+ sql.append("PVV.NOMBPUNTOVENTA AS PV_VENDA, B.FECHORVENTA, B.FECCORRIDA, ORI.DESCPARADA AS ORIGEM, DES.DESCPARADA AS DESTINO, B.NUMASIENTO, ");
+ sql.append("B.MOTIVOCANCELACION_ID, ");
+ sql.append("UI.CVEUSUARIO AS USUARIOINC, ");
+ sql.append("NVL(B.PRECIOPAGADO,0) + NVL(B.IMPORTETAXAEMBARQUE,0) + NVL(B.IMPORTEOUTROS,0) + NVL(B.IMPORTEPEDAGIO,0) + NVL(B.IMPORTESEGURO,0) AS TOTAL_BILHETE, ");
+ sql.append("ECP.NOME AS NOME_PIX, ECP.CPF_CNPJ AS CPF_CNPJ_PIX, ECP.TELEFONE AS TELEFONE_PIX, ECP.TIPO_CHAVE_PIX AS TIPO_CHAVE_PIX, ECP.CHAVE_PIX AS CHAVE_PIX " );
+ sql.append("FROM OCD O ");
+ sql.append("JOIN ESTORNO_OCD_PIX ECP ON ECP.OCD_ID=O.OCD_ID ");
+ sql.append("JOIN BOLETO B ON B.BOLETO_ID = O.BOLETO_ID ");
+ sql.append("JOIN MARCA M ON B.MARCA_ID = M.MARCA_ID ");
+ sql.append("JOIN EMPRESA E ON E.EMPRESA_ID = M.EMPRESA_ID ");
+ sql.append("JOIN PUNTO_VENTA PVO ON PVO.PUNTOVENTA_ID = O.PUNTOVENTA_ID ");
+ sql.append("LEFT JOIN PARADA ORI ON ORI.PARADA_ID = B.ORIGEN_ID ");
+ sql.append("LEFT JOIN PARADA DES ON DES.PARADA_ID = B.DESTINO_ID ");
+ sql.append("LEFT JOIN PUNTO_VENTA PVV ON PVV.PUNTOVENTA_ID = B.PUNTOVENTA_ID ");
+ sql.append("LEFT JOIN USUARIO UI ON UI.USUARIO_ID = O.USUARIO_ID ");
+ sql.append("WHERE O.ACTIVO = 1 ");
+
+ sql.append(puntoVentas == null ? "" : "AND PVO.PUNTOVENTA_ID IN (" + puntoVentas + ") ");
+
+ if(StringUtils.isNotBlank(fecInicio)) {
+ sql.append("AND O.FECINC >= TO_DATE(:fecInicio,'DD/MM/YYYY HH24:MI') ");
+ }
+
+ if(StringUtils.isNotBlank(fecFinal)) {
+ sql.append("AND O.FECINC <= TO_DATE(:fecFinal,'DD/MM/YYYY HH24:MI') ");
+ }
+
+ if(StringUtils.isNotBlank(fecPagoInicio)) {
+ sql.append("AND O.FECPAGO >= TO_DATE(:fecPagoInicio,'DD/MM/YYYY HH24:MI') ");
+ }
+
+ if(StringUtils.isNotBlank(fecPagoFinal)) {
+ sql.append("AND O.FECPAGO <= TO_DATE(:fecPagoFinal,'DD/MM/YYYY HH24:MI') ");
+ }
+
+ if (empresaId != null) {
+ sql.append(" and M.EMPRESA_ID = :empresaId ");
+ }
+
+ if(StringUtils.isNotBlank(numoperacion)){
+ sql.append(" and O.NUMOPERACION like '%"+numoperacion+"%' ");
+ }
+
+ if(ocdId != null){
+ sql.append(" and O.OCD_ID = :ocdId ");
+ }
+ sql.append(" ORDER BY ");
+ switch (ordenacion) {
+ case NUM_OPERACION:
+ sql.append(" O.NUMOPERACION ");
+ break;
+ case FECHA_CREACION:
+ sql.append(" O.FECINC ");
+ break;
+ case FECHA_PAGAMENTO:
+ sql.append(" O.FECPAGO ");
+ break;
+ default:
+ sql.append(" B.NUMFOLIOSISTEMA ");
+ break;
+ }
+
+ return sql.toString();
+ }
+}
\ No newline at end of file
diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/impl/RelatorioOCDReembolsoPixBean.java b/src/java/com/rjconsultores/ventaboletos/relatorios/impl/RelatorioOCDReembolsoPixBean.java
new file mode 100644
index 000000000..60a14b228
--- /dev/null
+++ b/src/java/com/rjconsultores/ventaboletos/relatorios/impl/RelatorioOCDReembolsoPixBean.java
@@ -0,0 +1,203 @@
+package com.rjconsultores.ventaboletos.relatorios.impl;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+import com.rjconsultores.ventaboletos.constantes.Constantes;
+
+public class RelatorioOCDReembolsoPixBean {
+ private Long ocdId;
+
+ private Long boletoId;
+
+ private String numoperacion;
+ private String numfoliosistema;
+
+ private Date fechorventa;
+
+ private BigDecimal valorOcd;
+ private BigDecimal penalizacion;
+ private Date fecinc;
+ private String empresa;
+ private String nombusuario;
+ private String nombusuarioinc;
+ private String nombpuntoventa;
+ private String nombpuntoventainc;
+ private String origem;
+ private String destino;
+ private String asiento;
+ private Date feccorrida;
+ private BigDecimal totalBilhete;
+ private Integer motivocancelacionId;
+ private String nomePix;
+ private String cpfCnpjPix;
+ private String telefonePix;
+ private String tipoChavePix;
+ private String chavePix;
+ public Long getOcdId() {
+ return ocdId;
+ }
+ public void setOcdId(Long ocdId) {
+ this.ocdId = ocdId;
+ }
+ public Long getBoletoId() {
+ return boletoId;
+ }
+ public void setBoletoId(Long boletoId) {
+ this.boletoId = boletoId;
+ }
+ public String getNumoperacion() {
+ return numoperacion;
+ }
+ public void setNumoperacion(String numoperacion) {
+ this.numoperacion = numoperacion;
+ }
+ public String getNumfoliosistema() {
+ return numfoliosistema;
+ }
+ public void setNumfoliosistema(String numfoliosistema) {
+ this.numfoliosistema = numfoliosistema;
+ }
+ public Date getFechorventa() {
+ return fechorventa;
+ }
+ public void setFechorventa(Date fechorventa) {
+ this.fechorventa = fechorventa;
+ }
+ public BigDecimal getValorOcd() {
+ return valorOcd;
+ }
+ public void setValorOcd(BigDecimal valorOcd) {
+ this.valorOcd = valorOcd;
+ }
+ public BigDecimal getPenalizacion() {
+ return penalizacion;
+ }
+ public void setPenalizacion(BigDecimal penalizacion) {
+ this.penalizacion = penalizacion;
+ }
+ public Date getFecinc() {
+ return fecinc;
+ }
+ public void setFecinc(Date fecinc) {
+ this.fecinc = fecinc;
+ }
+ public String getEmpresa() {
+ return empresa;
+ }
+ public void setEmpresa(String empresa) {
+ this.empresa = empresa;
+ }
+ public String getNombusuario() {
+ return nombusuario;
+ }
+ public void setNombusuario(String nombusuario) {
+ this.nombusuario = nombusuario;
+ }
+ public String getNombusuarioinc() {
+ return nombusuarioinc;
+ }
+ public void setNombusuarioinc(String nombusuarioinc) {
+ this.nombusuarioinc = nombusuarioinc;
+ }
+ public String getNombpuntoventa() {
+ return nombpuntoventa;
+ }
+ public void setNombpuntoventa(String nombpuntoventa) {
+ this.nombpuntoventa = nombpuntoventa;
+ }
+ public String getNombpuntoventainc() {
+ return nombpuntoventainc;
+ }
+ public void setNombpuntoventainc(String nombpuntoventainc) {
+ this.nombpuntoventainc = nombpuntoventainc;
+ }
+ public String getOrigem() {
+ return origem;
+ }
+ public void setOrigem(String origem) {
+ this.origem = origem;
+ }
+ public String getDestino() {
+ return destino;
+ }
+ public void setDestino(String destino) {
+ this.destino = destino;
+ }
+ public String getAsiento() {
+ return asiento;
+ }
+ public void setAsiento(String asiento) {
+ this.asiento = asiento;
+ }
+ public Date getFeccorrida() {
+ return feccorrida;
+ }
+ public void setFeccorrida(Date feccorrida) {
+ this.feccorrida = feccorrida;
+ }
+ public BigDecimal getTotalBilhete() {
+ return totalBilhete;
+ }
+ public void setTotalBilhete(BigDecimal totalBilhete) {
+ this.totalBilhete = totalBilhete;
+ }
+ public Integer getMotivocancelacionId() {
+ return motivocancelacionId;
+ }
+ public void setMotivocancelacionId(Integer motivocancelacionId) {
+ this.motivocancelacionId = motivocancelacionId;
+ }
+ public String getNomePix() {
+ return nomePix;
+ }
+ public void setNomePix(String nomePix) {
+ this.nomePix = nomePix;
+ }
+ public String getCpfCnpjPix() {
+ return cpfCnpjPix;
+ }
+ public void setCpfCnpjPix(String cpfCnpjPix) {
+ this.cpfCnpjPix = cpfCnpjPix;
+ }
+
+ public String getTelefonePix() {
+ return telefonePix;
+ }
+ public void setTelefonePix(String telefonePix) {
+ this.telefonePix = telefonePix;
+ }
+ public String getTipoChavePix() {
+ return tipoChavePix;
+ }
+ public void setTipoChavePix(String tipoChavePix) {
+ this.tipoChavePix = tipoChavePix;
+ }
+ public String getChavePix() {
+ return chavePix;
+ }
+ public void setChavePix(String chavePix) {
+ this.chavePix = chavePix;
+ }
+
+ public String getMotivo() {
+ if(motivocancelacionId != null && Constantes.MVO_CANCEL_GERACAO_OCD.intValue() == motivocancelacionId.intValue()) {
+ return "Geração OCD";
+ } else if(motivocancelacionId != null && Constantes.MVO_CANCEL_TRANSFERENCIA.intValue() == motivocancelacionId.intValue()) {
+ return "Transferência";
+ } else if(motivocancelacionId != null && Constantes.MVO_CANCEL_TROCA.intValue() == motivocancelacionId.intValue()) {
+ return "Troca";
+ }
+ return null;
+ }
+
+ public BigDecimal getMulta() {
+ if(motivocancelacionId != null && Constantes.MVO_CANCEL_GERACAO_OCD.intValue() == motivocancelacionId.intValue()) {
+ return getTotalBilhete().subtract(getValorOcd());
+ }
+ return BigDecimal.ZERO;
+ }
+
+
+
+}
diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/internacionalizacao/RelatorioOCDReembolsoPix_es.properties b/src/java/com/rjconsultores/ventaboletos/relatorios/internacionalizacao/RelatorioOCDReembolsoPix_es.properties
new file mode 100644
index 000000000..ad7492268
--- /dev/null
+++ b/src/java/com/rjconsultores/ventaboletos/relatorios/internacionalizacao/RelatorioOCDReembolsoPix_es.properties
@@ -0,0 +1,49 @@
+#geral
+msg.noData=No se pudo obtener datos con los parámetros reportados.
+msg.a=à
+
+#Labels header
+label.periodo=Período
+label.ate=até
+label.de=de
+label.filtros=Fitros:
+label.dataHora=Emitido em:
+label.impressorPor=Emitido Por:
+label.pagina=Página:
+detail.periodoFecpago=Data Pagamento:
+detail.periodoFecinc=Data OCD:
+
+#Labels detail
+
+detail.numfoliosistema=Boleto
+detail.numoperacion=Num. Operacion
+detail.fecvenda=Fecha Venta
+detail.valorOcd=Valor OCD
+detail.penalizacion=Penalizacion
+detail.multa=Multa
+detail.motivo=Motivo
+detail.nombusuarioinc=Usuário Inc.
+
+detail.fecinc=Fecha OCD
+detail.nombempresa=Empresa
+detail.nombusuario=Usuário
+detail.nombpuntoventainc=Punto Venta Emissão
+detail.nombpuntoventa=Punto Venta
+
+detail.origem=Origem
+detail.destino=Destino
+detail.feccorrida=Data Viagem
+detail.Asiento=Asientos
+detail.dadosOcd=Dados OCD
+detail.dadosVenda=Dados da Venda/Passagem
+detail.totalBilhete=Valor Total
+detail.total=Total
+
+detail.dadosPix=Dados do Pix para Reembolso
+detail.nomePix=Nome
+detail.cpfCnpjPix= Cpf/Cnpj
+detail.telefonePix=Telefone
+detail.tipoChavePix=Tipo da Chave
+detail.chavePix=Chave
+
+linhas=Líneas
\ No newline at end of file
diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/internacionalizacao/RelatorioOCDReembolsoPix_pt_BR.properties b/src/java/com/rjconsultores/ventaboletos/relatorios/internacionalizacao/RelatorioOCDReembolsoPix_pt_BR.properties
new file mode 100644
index 000000000..e48601c3d
--- /dev/null
+++ b/src/java/com/rjconsultores/ventaboletos/relatorios/internacionalizacao/RelatorioOCDReembolsoPix_pt_BR.properties
@@ -0,0 +1,52 @@
+#geral
+msg.noData=Não foi possivel obter dados com os parâmetros informados.
+msg.a=à
+
+#Labels header
+label.periodo=Período
+label.ate=até
+label.de=de
+label.filtros=Fitros:
+label.dataHora=Emitido em:
+label.impressorPor=Emitido Por:
+label.pagina=Página:
+detail.periodoFecpago=Data Pagamento:
+detail.periodoFecinc=Data OCD:
+
+#Labels detail
+
+detail.numfoliosistema=Nº Bilhete
+detail.numoperacion=Localizador
+detail.fecpago=Data Pagamento
+detail.fecvenda=Data Venda
+detail.valorOcd=Valor OCD
+detail.penalizacion=Penalização
+detail.multa=Multa
+detail.motivo=Motivo
+detail.nombusuarioinc=Usuário Geração
+
+detail.fecinc=Data OCD
+detail.nombempresa=Empresa
+detail.nombusuario=Usuário
+detail.nombpuntoventainc=Agência Emissão
+detail.nombpuntoventa=Agência Venda
+
+
+detail.origem=Origem
+detail.destino=Destino
+detail.feccorrida=Data Viagem
+detail.asiento=Assento
+detail.dadosOcd=Dados OCD
+detail.dadosVenda=Dados da Venda/Passagem
+detail.totalBilhete=Valor Total
+detail.total=Total
+
+
+detail.dadosPix=Dados do Pix para Reembolso
+detail.nomePix=Nome
+detail.cpfCnpjPix= Cpf/Cnpj
+detail.telefonePix=Telefone
+detail.tipoChavePix=Tipo da Chave
+detail.chavePix=Chave
+
+linhas=Linhas
\ No newline at end of file
diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioOCDReembolsoPix.jasper b/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioOCDReembolsoPix.jasper
new file mode 100644
index 000000000..d00050ce6
Binary files /dev/null and b/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioOCDReembolsoPix.jasper differ
diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioOCDReembolsoPix.jrxml b/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioOCDReembolsoPix.jrxml
new file mode 100644
index 000000000..422c94c3b
--- /dev/null
+++ b/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioOCDReembolsoPix.jrxml
@@ -0,0 +1,596 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/relatorios/RelatorioOCDController.java b/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/relatorios/RelatorioOCDController.java
index a04a17dc7..87ce45ebe 100644
--- a/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/relatorios/RelatorioOCDController.java
+++ b/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/relatorios/RelatorioOCDController.java
@@ -16,16 +16,19 @@ 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.Checkbox;
import org.zkoss.zul.Combobox;
import org.zkoss.zul.Comboitem;
import org.zkoss.zul.Datebox;
import org.zkoss.zul.Paging;
import org.zkoss.zul.Radio;
+import org.zkoss.zul.Row;
import org.zkoss.zul.Textbox;
import com.rjconsultores.ventaboletos.entidad.Empresa;
import com.rjconsultores.ventaboletos.entidad.PuntoVenta;
import com.rjconsultores.ventaboletos.relatorios.impl.RelatorioOCDNaoResgatadaEmpresa;
+import com.rjconsultores.ventaboletos.relatorios.impl.RelatorioOCDReembolsoPix;
import com.rjconsultores.ventaboletos.relatorios.utilitarios.IndOrdenacion;
import com.rjconsultores.ventaboletos.relatorios.utilitarios.Relatorio;
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
@@ -67,6 +70,9 @@ public class RelatorioOCDController extends MyGenericForwardComposer {
private MyTextbox txtNumOperacao;
private IndOrdenacion ordenacion;
+
+ private Checkbox chOcdReembolsoPix;
+ private Row rowStatusOCD;
private void executarRelatorio() throws Exception {
@@ -130,9 +136,13 @@ public class RelatorioOCDController extends MyGenericForwardComposer {
parametros.put("usuario", UsuarioLogado.getUsuarioLogado().getClaveUsuario());
parametros.put("filtros", filtro.toString());
-
- Relatorio relatorio = new RelatorioOCDNaoResgatadaEmpresa(parametros, dataSourceRead.getConnection());
+ Relatorio relatorio =null;
+ if(chOcdReembolsoPix.isChecked()) {
+ relatorio = new RelatorioOCDReembolsoPix(parametros, dataSourceRead.getConnection());
+ }else {
+ relatorio = new RelatorioOCDNaoResgatadaEmpresa(parametros, dataSourceRead.getConnection());
+ }
Map args = new HashMap();
args.put("relatorio", relatorio);
@@ -169,6 +179,14 @@ public class RelatorioOCDController extends MyGenericForwardComposer {
executarRelatorio();
}
+ public void onClick$chOcdReembolsoPix(Event ev) throws Exception {
+ if(chOcdReembolsoPix.isChecked()) {
+ rowStatusOCD.setVisible(false);
+ }else {
+ rowStatusOCD.setVisible(true);
+ }
+ }
+
private boolean validarDatas(Date dataInicial, Date dataFinal) {
boolean isDataInicial = dataInicial != null;
diff --git a/web/WEB-INF/i3-label_en.label b/web/WEB-INF/i3-label_en.label
index d08ba9654..7fd79af13 100644
--- a/web/WEB-INF/i3-label_en.label
+++ b/web/WEB-INF/i3-label_en.label
@@ -9837,4 +9837,5 @@ winMovimentacionBilhetesPuntoVenta.tipoMovimentacion.label = Natureza
editarEmpresaController.imprimirCupomEmbarqueSimplificado=Deseja Imprimir o cupom de embarque simplificado
editarEmpresaController.imprimirCupomEmbarqueSimplificado.ajuda=A marcar esse campo, o cumpom de embarque impresso, será o cumpom simplificado
editarPuntoVentaController.lbMotivoBloqueio.value=Motivo do Bloqueio
-editarPuntoVentaController.lbMotivo.value=Motivo
\ No newline at end of file
+editarPuntoVentaController.lbMotivo.value=Motivo
+relatorioOCDController.chOcdReembolsoPix.value=Exibir OCD com reembolso PIX
\ No newline at end of file
diff --git a/web/WEB-INF/i3-label_es_MX.label b/web/WEB-INF/i3-label_es_MX.label
index dd9586af9..fb4cd0b3d 100644
--- a/web/WEB-INF/i3-label_es_MX.label
+++ b/web/WEB-INF/i3-label_es_MX.label
@@ -9979,3 +9979,4 @@ editarEmpresaController.imprimirCupomEmbarqueSimplificado=Deseja Imprimir o cupo
editarEmpresaController.imprimirCupomEmbarqueSimplificado.ajuda=A marcar esse campo, o cumpom de embarque impresso, será o cumpom simplificado
editarPuntoVentaController.lbMotivo.value=Motivo
editarPuntoVentaController.lbMotivoBloqueio.value=Motivo do Bloqueio
+relatorioOCDController.chOcdReembolsoPix.value=Exibir OCD com reembolso PIX
diff --git a/web/WEB-INF/i3-label_fr_FR.label b/web/WEB-INF/i3-label_fr_FR.label
index ecb93da9c..dae2dc625 100644
--- a/web/WEB-INF/i3-label_fr_FR.label
+++ b/web/WEB-INF/i3-label_fr_FR.label
@@ -9950,4 +9950,5 @@ winMovimentacionBilhetesPuntoVenta.tipoMovimentacion.label = Nature
editarEmpresaController.imprimirCupomEmbarqueSimplificado=Deseja Imprimir o cupom de embarque simplificado
editarEmpresaController.imprimirCupomEmbarqueSimplificado.ajuda=A marcar esse campo, o cumpom de embarque impresso, será o cumpom simplificado
editarPuntoVentaController.lbMotivo.value=Motivo
-editarPuntoVentaController.lbMotivoBloqueio.value=Motivo do Bloqueio
\ No newline at end of file
+editarPuntoVentaController.lbMotivoBloqueio.value=Motivo do Bloqueio
+relatorioOCDController.chOcdReembolsoPix.value=Exibir OCD com reembolso PIX
\ No newline at end of file
diff --git a/web/WEB-INF/i3-label_pt_BR.label b/web/WEB-INF/i3-label_pt_BR.label
index 29abb6672..b9027e685 100644
--- a/web/WEB-INF/i3-label_pt_BR.label
+++ b/web/WEB-INF/i3-label_pt_BR.label
@@ -10845,4 +10845,5 @@ abastoService.msg.semOrigem=Abasto Origem, não encontrado
detAbastoService.msg.semOrigem=DetAbasto Origem, não encontrado
editarPuntoVentaController.lbMotivo.value=Motivo
editarPuntoVentaController.lbMotivoBloqueio.value=Motivo do Bloqueio
+relatorioOCDController.chOcdReembolsoPix.value=Exibir OCD com reembolso PIX
diff --git a/web/gui/relatorios/filtroRelatorioOCD.zul b/web/gui/relatorios/filtroRelatorioOCD.zul
index cab71a6bf..4d39c03c4 100644
--- a/web/gui/relatorios/filtroRelatorioOCD.zul
+++ b/web/gui/relatorios/filtroRelatorioOCD.zul
@@ -111,7 +111,13 @@
-
+
+
+
+
+
+
+