diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/impl/RelatorioTaxasLinha.java b/src/java/com/rjconsultores/ventaboletos/relatorios/impl/RelatorioTaxasLinha.java index 259f3453a..c14e668e1 100644 --- a/src/java/com/rjconsultores/ventaboletos/relatorios/impl/RelatorioTaxasLinha.java +++ b/src/java/com/rjconsultores/ventaboletos/relatorios/impl/RelatorioTaxasLinha.java @@ -75,7 +75,7 @@ public class RelatorioTaxasLinha extends Relatorio { try { if (fieldName.equals("IMPORTETAXAEMBARQUE") && this.resultSet.getBigDecimal("IMPORTETAXAEMBARQUE") != null && !this.resultSet.getBigDecimal("IMPORTETAXAEMBARQUE").equals(BigDecimal.ZERO)) { - valorIcms = CalculoImposto.getValorImposto(this.relatorio.getConexao(), idEstado, puntoVentaId, indInterestadual, BigDecimal.ZERO, BigDecimal.ZERO, this.resultSet.getBigDecimal("IMPORTETAXAEMBARQUE"), BigDecimal.ZERO); + valorIcms = CalculoImposto.getValorImpostoRelatorioReceitaDiaria(this.relatorio.getConexao(), idEstado, puntoVentaId, indInterestadual, BigDecimal.ZERO, BigDecimal.ZERO, this.resultSet.getBigDecimal("IMPORTETAXAEMBARQUE"), BigDecimal.ZERO); return this.resultSet.getBigDecimal("IMPORTETAXAEMBARQUE").subtract(valorIcms); } else if (fieldName.equals("IMPORTEPEDAGIO") && this.resultSet.getBigDecimal("IMPORTEPEDAGIO") != null && !this.resultSet.getBigDecimal("IMPORTEPEDAGIO").equals(BigDecimal.ZERO)) { diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/negocio/CalculoImposto.java b/src/java/com/rjconsultores/ventaboletos/relatorios/negocio/CalculoImposto.java index eaccc2db3..58700e66d 100644 --- a/src/java/com/rjconsultores/ventaboletos/relatorios/negocio/CalculoImposto.java +++ b/src/java/com/rjconsultores/ventaboletos/relatorios/negocio/CalculoImposto.java @@ -138,8 +138,13 @@ public class CalculoImposto { String estado = rs.getString("NOMBESTADO"); String empresa = rs.getString("NOMBEMPRESA"); - if (!isBuscouConfig) + if (!isBuscouConfig) { + if (!rs.isClosed()) + rs.close(); + if (!stmt.isClosed()) + stmt.close(); throw new ExceptionConfiguracao("Não foi possivel obter a configuração de imposto para o estado: " + estado + " empresa: " + empresa); + } } ; diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioResumoLinhas.jasper b/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioResumoLinhas.jasper index 0d6fe00da..75fceb45e 100644 Binary files a/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioResumoLinhas.jasper and b/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioResumoLinhas.jasper differ diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioResumoLinhas.jrxml b/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioResumoLinhas.jrxml index e36d11e04..79a35a9b2 100644 --- a/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioResumoLinhas.jrxml +++ b/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioResumoLinhas.jrxml @@ -1,7 +1,7 @@ - +