From 9cb0ad7d2b851a540bae94d5421b5bc41e64a5a5 Mon Sep 17 00:00:00 2001 From: julio Date: Wed, 12 Sep 2018 17:24:51 +0000 Subject: [PATCH] bug#11600 dev: julio qua: git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Model/trunk/modelWeb@85274 d1611594-4594-4d17-8e1d-87c2c4800839 --- .../ventaboletos/dao/hibernate/FiscalHibernateDAO.java | 4 ++-- .../utilerias/exportacaofiscal/vo/ExportacaoBPR.java | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/com/rjconsultores/ventaboletos/dao/hibernate/FiscalHibernateDAO.java b/src/com/rjconsultores/ventaboletos/dao/hibernate/FiscalHibernateDAO.java index c2567a4a3..f060e0465 100644 --- a/src/com/rjconsultores/ventaboletos/dao/hibernate/FiscalHibernateDAO.java +++ b/src/com/rjconsultores/ventaboletos/dao/hibernate/FiscalHibernateDAO.java @@ -2367,9 +2367,9 @@ public class FiscalHibernateDAO extends HibernateDaoSupport implements FiscalDAO sb.append(" and f.fechorfolio >= to_date(?,'DD/MM/YYYY HH24:MI:SS') and f.fechorfolio <= to_date(?,'DD/MM/YYYY HH24:MI:SS') "); sb.append(" and f.empresa_id = ? "); sb.append(" and eof.cveestado like ? "); - sb.append(" and ((b.tipoventa_id = 3 and b.indstatusboleto = 'V' and b.indreimpresion = 0) "); + sb.append(" and (f.indcancelacion = 1 or ( ((b.tipoventa_id = 3 and b.indstatusboleto = 'V' and b.indreimpresion = 0) "); sb.append(" or (b.tipoventa_id in (12,18) and b.indstatusboleto = 'E' and b.numfoliosistema = b.numfoliopreimpreso)) "); - sb.append(" and (b.motivocancelacion_id is null or b.motivocancelacion_id <> 35) "); + sb.append(" and (b.motivocancelacion_id is null or b.motivocancelacion_id <> 35) ))"); sb.append(" order by dataEmissaoRMD "); try { diff --git a/src/com/rjconsultores/ventaboletos/utilerias/exportacaofiscal/vo/ExportacaoBPR.java b/src/com/rjconsultores/ventaboletos/utilerias/exportacaofiscal/vo/ExportacaoBPR.java index 1032fb691..e817bd6f6 100644 --- a/src/com/rjconsultores/ventaboletos/utilerias/exportacaofiscal/vo/ExportacaoBPR.java +++ b/src/com/rjconsultores/ventaboletos/utilerias/exportacaofiscal/vo/ExportacaoBPR.java @@ -194,6 +194,9 @@ public class ExportacaoBPR { BigDecimal porc_red_municipal = base.getPorcReducaoMunicipal(); BigDecimal porc_red_estadual = base.getPorcReducaoEstadual(); BigDecimal tributacao_importacao = base.getTributacaoImportacao(); + + if (base.getDocumentoCancelado()) + continue; if (numeroAIDF == null || numeroAIDF.trim().isEmpty() || numeroAIDF.trim().equals("0")) { continue;