julio 2017-10-13 18:04:12 +00:00
parent d17de6b6f8
commit 06c34f923c
2 changed files with 8 additions and 6 deletions

View File

@ -3837,13 +3837,15 @@ public class FiscalHibernateDAO extends HibernateDaoSupport implements FiscalDAO
sql.append(" join estado eie on eie.estado_id = cie.estado_id "); sql.append(" join estado eie on eie.estado_id = cie.estado_id ");
sql.append(" join empresa_imposto ei on ei.empresa_id = b.empresacorrida_id "); sql.append(" join empresa_imposto ei on ei.empresa_id = b.empresacorrida_id ");
sql.append(" and ei.estado_id = coalesce(ae.estado_id, eos.estado_id) and ei.activo = 1 "); sql.append(" and ei.estado_id = coalesce(ae.estado_id, eos.estado_id) and ei.activo = 1 ");
sql.append("where "); sql.append("where b.tipoventa_id = 3 ");
sql.append(" b.tipoventa_id = 3 "); sql.append(" and (b.motivocancelacion_id is null or b.motivocancelacion_id <> 35) ");
sql.append(" and b.indcancelacion = 0 ");
sql.append(" and b.preciopagado > 0 ");
sql.append(" and b.indstatusboleto = 'V' and b.indreimpresion = 0 "); sql.append(" and b.indstatusboleto = 'V' and b.indreimpresion = 0 ");
sql.append(" and b.empresacorrida_id = :EMPRESA_ID "); sql.append(" and b.empresacorrida_id = :EMPRESA_ID ");
sql.append(" and b.feccreacion between :DATE_INICIO and :DATE_FIM "); sql.append(" and b.feccreacion between :DATE_INICIO and :DATE_FIM ");
sql.append(" and coalesce(ae.cveestado, eos.cveestado) = :CVEESTADO "); sql.append(" and coalesce(ae.cveestado, eos.cveestado) = :CVEESTADO ");
sql.append(" and b.rmd_id is null "); sql.append(" and b.rmd_id is null ");
sql.append("order by estadoId, fechorVenta, nombPuntoVenta, numPuntoVenta "); sql.append("order by estadoId, fechorVenta, nombPuntoVenta, numPuntoVenta ");
return sql.toString(); return sql.toString();

View File

@ -419,9 +419,9 @@ public class ExportacaoFiscal {
municipioOrigem = municipioOrigem.substring(municipioOrigem.length() - 5, municipioOrigem.length()); municipioOrigem = municipioOrigem.substring(municipioOrigem.length() - 5, municipioOrigem.length());
} }
if (item.getTributacao() != null && item.getTributacao().compareTo(BigDecimal.ZERO) > 0) { // if (item.getTributacao() != null && item.getTributacao().compareTo(BigDecimal.ZERO) > 0) {
valorICMS = MoneyHelper.multiplicar(valorBaseCalculoICMS, item.getTributacao()); // valorICMS = MoneyHelper.multiplicar(valorBaseCalculoICMS, item.getTributacao());
} // }
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
sb.append("PRC").append(SEPARADOR); sb.append("PRC").append(SEPARADOR);