diff --git a/.classpath b/.classpath
index f3174e3c4..d0424470f 100644
--- a/.classpath
+++ b/.classpath
@@ -102,7 +102,7 @@
-
+
diff --git a/.project b/.project
index d392ba4ba..3b9bf2a5b 100644
--- a/.project
+++ b/.project
@@ -11,6 +11,7 @@
GeneradorBoletosCNAB
WSTotvs
Flyway
+ GeneradorBoletosCNAB
diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/impl/RelatorioDevolucaoBilhetes.java b/src/java/com/rjconsultores/ventaboletos/relatorios/impl/RelatorioDevolucaoBilhetes.java
index 3c6facb04..f5bf6bd36 100644
--- a/src/java/com/rjconsultores/ventaboletos/relatorios/impl/RelatorioDevolucaoBilhetes.java
+++ b/src/java/com/rjconsultores/ventaboletos/relatorios/impl/RelatorioDevolucaoBilhetes.java
@@ -404,10 +404,10 @@ public class RelatorioDevolucaoBilhetes extends Relatorio {
sql.append(" LEFT JOIN BOLETO BANT ON BANT.BOLETO_ID = (CASE WHEN BPEORI.TIPOEVENTO IS NOT NULL THEN COALESCE(B.BOLETOANTERIOR_ID, B.BOLETOORIGINAL_ID) ELSE NULL END) ");
sql.append(" LEFT JOIN BPE BPEANT ON BPEANT.BOLETO_ID = BANT.BOLETO_ID ");
sql.append(" LEFT JOIN PUNTO_VENTA PTVO ON PTVO.PUNTOVENTA_ID = COALESCE(BANT.PUNTOVENTA_ID, BORI.PUNTOVENTA_ID,B.PTOVTAVENTA_ID) ");
- sql.append("WHERE (BPE.CODSTAT IN (100,135,150) AND BPE.CHBPE_SUBSTITUICAO IS NOT NULL ");
- sql.append(" OR (BPE.CODSTAT = 135 AND TO_CHAR(B.FECCREACION, 'MM/YYYY') < TO_CHAR(BORI.FECCREACION, 'MM/YYYY')) ) ");
- sql.append(" AND (BPE.CODSTAT IN (100,135,150) AND BPE.TIPOEVENTO <> 110115 OR BPE.TIPOEVENTO IS NULL) ");
- sql.append(" AND (BPEORI.CODSTAT IN (100,135,150) AND BPEORI.TIPOEVENTO <> 110115 OR BPEORI.TIPOEVENTO IS NULL) ");
+ sql.append("WHERE (BPE.CODSTAT IN (100,101,102,135,150) AND BPE.CHBPE_SUBSTITUICAO IS NOT NULL ");
+ sql.append(" OR (BPE.CODSTAT IN (101,135) AND TO_CHAR(B.FECCREACION, 'MM/YYYY') < TO_CHAR(BORI.FECCREACION, 'MM/YYYY')) ) ");
+ sql.append(" AND (BPE.CODSTAT IN (100,101,102,135,150) AND BPE.TIPOEVENTO <> 110115 OR BPE.TIPOEVENTO IS NULL) ");
+ sql.append(" AND (BPEORI.CODSTAT IN (100,101,102,135,150) AND BPEORI.TIPOEVENTO <> 110115 OR BPEORI.TIPOEVENTO IS NULL) ");
if (dataDevolucaoInicial != null) {
sql.append("AND BORI.FECCREACION >= TO_DATE(:dataDevolucaoInicial,'DD/MM/YYYY HH24:MI') ");
}
@@ -495,9 +495,9 @@ public class RelatorioDevolucaoBilhetes extends Relatorio {
sql.append("LEFT JOIN BPE BPEANT ON BPEANT.BOLETO_ID = BANT.BOLETO_ID ");
sql.append("LEFT JOIN PUNTO_VENTA PTVO ON PTVO.PUNTOVENTA_ID = COALESCE(BANT.PUNTOVENTA_ID, BORI.PUNTOVENTA_ID,B.PTOVTAVENTA_ID) ");
sql.append("WHERE ");
- sql.append(" (BPE.CODSTAT = 135 AND TO_CHAR(B.FECCREACION, 'MM/YYYY') < TO_CHAR(BORI.FECCREACION, 'MM/YYYY')) ");
- sql.append(" AND (BPE.CODSTAT IN (100,135,150) AND BPE.TIPOEVENTO <> 110115 OR BPE.TIPOEVENTO IS NULL) ");
- sql.append(" AND (BPEORI.CODSTAT IN (100,135,150) AND BPEORI.TIPOEVENTO <> 110115 OR BPEORI.TIPOEVENTO IS NULL) ");
+ sql.append(" (BPE.CODSTAT IN (101,135) AND TO_CHAR(B.FECCREACION, 'MM/YYYY') < TO_CHAR(BORI.FECCREACION, 'MM/YYYY')) ");
+ sql.append(" AND (BPE.CODSTAT IN (100,101,102,135,150) AND BPE.TIPOEVENTO <> 110115 OR BPE.TIPOEVENTO IS NULL) ");
+ sql.append(" AND (BPEORI.CODSTAT IN (100,101,102,135,150) AND BPEORI.TIPOEVENTO <> 110115 OR BPEORI.TIPOEVENTO IS NULL) ");
if (dataDevolucaoInicial != null) {
sql.append("AND BORI.FECCREACION >= TO_DATE(:dataDevolucaoInicial,'DD/MM/YYYY HH24:MI') ");
}
diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/impl/RelatorioFinanceiroSintetico.java b/src/java/com/rjconsultores/ventaboletos/relatorios/impl/RelatorioFinanceiroSintetico.java
index fe89fb31b..03a613e19 100644
--- a/src/java/com/rjconsultores/ventaboletos/relatorios/impl/RelatorioFinanceiroSintetico.java
+++ b/src/java/com/rjconsultores/ventaboletos/relatorios/impl/RelatorioFinanceiroSintetico.java
@@ -540,10 +540,10 @@ public class RelatorioFinanceiroSintetico extends Relatorio {
sql.append(" left join boleto bant on bant.boleto_id = (case when bpeori.tipoevento is not null then coalesce(b.boletoanterior_id, b.boletooriginal_id) else null end) ");
sql.append(" left join bpe bpeant on bpeant.boleto_id = bant.boleto_id ");
sql.append(" left join punto_venta ptvo on ptvo.puntoventa_id = coalesce(bant.puntoventa_id, bori.puntoventa_id,b.ptovtaventa_id) ");
- sql.append("where ( (bpe.codstat in (100,135,150) and bpe.chbpe_substituicao is not null) ");
- sql.append(" or (bpe.codstat = 135 and to_char(b.feccreacion, 'mm/yyyy') < to_char(bori.feccreacion, 'mm/yyyy')) ) ");
- sql.append(" and (bpe.codstat in (100,135,150) and bpe.tipoevento <> 110115 or bpe.tipoevento is null) ");
- sql.append(" and (bpeori.codstat in (100,135,150) and bpeori.tipoevento <> 110115 or bpeori.tipoevento is null) ");
+ sql.append("where ( (bpe.codstat in (100,101,102,135,150) and bpe.chbpe_substituicao is not null) ");
+ sql.append(" or (bpe.codstat in (101,135) and to_char(b.feccreacion, 'mm/yyyy') < to_char(bori.feccreacion, 'mm/yyyy')) ) ");
+ sql.append(" and (bpe.codstat in (100,101,102,135,150) and bpe.tipoevento <> 110115 or bpe.tipoevento is null) ");
+ sql.append(" and (bpeori.codstat in (100,101,102,135,150) and bpeori.tipoevento <> 110115 or bpeori.tipoevento is null) ");
sql.append(" and bori.feccreacion >= :DATE_INICIO and bori.feccreacion <= :DATE_FIM ");
sql.append(" and e.empresa_id = :EMPRESA_ID ");
sql.append(ufs == null ? "" : " and est_bpe.estado_id in ( " + ufs + " ) ");
@@ -599,9 +599,9 @@ public class RelatorioFinanceiroSintetico extends Relatorio {
sql.append("left join bpe bpeant on bpeant.boleto_id = bant.boleto_id ");
sql.append("left join punto_venta ptvo on ptvo.puntoventa_id = coalesce(bant.puntoventa_id, bori.puntoventa_id,b.ptovtaventa_id) ");
sql.append("where ");
- sql.append(" (bpe.codstat = 135 and to_char(b.feccreacion, 'mm/yyyy') < to_char(bori.feccreacion, 'mm/yyyy')) ");
- sql.append(" and (bpe.codstat in (100,135,150) and bpe.tipoevento <> 110115 or bpe.tipoevento is null) ");
- sql.append(" and (bpeori.codstat in (100,135,150) and bpeori.tipoevento <> 110115 or bpeori.tipoevento is null) ");
+ sql.append(" (bpe.codstat in (101,135) and to_char(b.feccreacion, 'mm/yyyy') < to_char(bori.feccreacion, 'mm/yyyy')) ");
+ sql.append(" and (bpe.codstat in (100,101,102,135,150) and bpe.tipoevento <> 110115 or bpe.tipoevento is null) ");
+ sql.append(" and (bpeori.codstat in (100,101,102,135,150) and bpeori.tipoevento <> 110115 or bpeori.tipoevento is null) ");
sql.append(" and bori.feccreacion >= :DATE_INICIO and bori.feccreacion <= :DATE_FIM ");
sql.append(" and e.empresa_id = :EMPRESA_ID ");
sql.append(ufs == null ? "" : " and est_bpe.estado_id in ( " + ufs + " ) ");
diff --git a/src/java/com/rjconsultores/ventaboletos/web/utilerias/MyAppInit.java b/src/java/com/rjconsultores/ventaboletos/web/utilerias/MyAppInit.java
index 709a31b2c..cb785c8fe 100644
--- a/src/java/com/rjconsultores/ventaboletos/web/utilerias/MyAppInit.java
+++ b/src/java/com/rjconsultores/ventaboletos/web/utilerias/MyAppInit.java
@@ -91,26 +91,26 @@ public class MyAppInit implements org.zkoss.zk.ui.util.WebAppInit {
* Executa os sqls novos na base de dados
*/
private void executeFlyway() {
- FlyWay.getInstance().defineDataSource(getDataSoure());
- FlyWay.getInstance().start();
-
- log.info("Executando Flyway...");
-
- try{
- final Flyway flyway = new Flyway();
-
- flyway.setDataSource(getDataSoure());
- flyway.setValidateOnMigrate(false);
- flyway.setIgnoreFutureMigrations(true);
- flyway.setOutOfOrder(true);
- flyway.setBaselineOnMigrate(true);
-
- flyway.migrate();
- }catch(Throwable t){
- log.error("Erro ao executar o flyway",t);
- }
-
- log.info("Flyway executado.");
+// FlyWay.getInstance().defineDataSource(getDataSoure());
+// FlyWay.getInstance().start();
+//
+// log.info("Executando Flyway...");
+//
+// try{
+// final Flyway flyway = new Flyway();
+//
+// flyway.setDataSource(getDataSoure());
+// flyway.setValidateOnMigrate(false);
+// flyway.setIgnoreFutureMigrations(true);
+// flyway.setOutOfOrder(true);
+// flyway.setBaselineOnMigrate(true);
+//
+// flyway.migrate();
+// }catch(Throwable t){
+// log.error("Erro ao executar o flyway",t);
+// }
+//
+// log.info("Flyway executado.");
}
private boolean ipBloqueadoGeracaoServico() {