diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/impl/RelatorioTaxasLinha.java b/src/java/com/rjconsultores/ventaboletos/relatorios/impl/RelatorioTaxasLinha.java index 8302382d8..228390444 100644 --- a/src/java/com/rjconsultores/ventaboletos/relatorios/impl/RelatorioTaxasLinha.java +++ b/src/java/com/rjconsultores/ventaboletos/relatorios/impl/RelatorioTaxasLinha.java @@ -19,6 +19,7 @@ import com.rjconsultores.ventaboletos.relatorios.utilitarios.ExceptionConfigurac import com.rjconsultores.ventaboletos.relatorios.utilitarios.Relatorio; import com.rjconsultores.ventaboletos.relatorios.utilitarios.RelatorioTaxasLinhaBean; import com.rjconsultores.ventaboletos.utilerias.DateUtil; +import com.rjconsultores.ventaboletos.utilerias.MoneyHelper; import com.rjconsultores.ventaboletos.web.utilerias.NamedParameterStatement; import net.sf.jasperreports.engine.data.JRBeanCollectionDataSource; @@ -117,37 +118,37 @@ public class RelatorioTaxasLinha extends Relatorio { if(!importeTaxaEmbarque.equals(BigDecimal.ZERO) && (Boolean) this.relatorio.getParametros().get("B_SUBTRAIR_ICMS")){ valorIcms = CalculoImposto.getValorImposto(this.relatorio.getConexao(), idEstado, empresaId, indInterestadual, BigDecimal.ZERO, BigDecimal.ZERO, importeTaxaEmbarque, BigDecimal.ZERO); - importeTaxaEmbarque = importeTaxaEmbarque.subtract(valorIcms); + importeTaxaEmbarque = MoneyHelper.subtrair(importeTaxaEmbarque, valorIcms); } taxasLinha.setIMPORTETAXAEMBARQUE(importeTaxaEmbarque); if(!importePedagio.equals(BigDecimal.ZERO) && (Boolean) this.relatorio.getParametros().get("B_SUBTRAIR_ICMS")){ valorIcms = CalculoImposto.getValorImposto(this.relatorio.getConexao(), idEstado, empresaId, indInterestadual, BigDecimal.ZERO, BigDecimal.ZERO, BigDecimal.ZERO, importePedagio); - importePedagio = importePedagio.subtract(valorIcms); + importePedagio = MoneyHelper.subtrair(importePedagio, valorIcms); } taxasLinha.setIMPORTEPEDAGIO(importePedagio); if(!importeSeguro.equals(BigDecimal.ZERO) && (Boolean) this.relatorio.getParametros().get("B_SUBTRAIR_ICMS")){ valorIcms = CalculoImposto.getValorImposto(this.relatorio.getConexao(), idEstado, empresaId, indInterestadual, BigDecimal.ZERO, importeSeguro, BigDecimal.ZERO, BigDecimal.ZERO); - importeSeguro = importeSeguro.subtract(valorIcms); + importeSeguro = MoneyHelper.subtrair(importeSeguro, valorIcms); } taxasLinha.setIMPORTESEGURO(importeSeguro); if(!totalEmbarque.equals(BigDecimal.ZERO) && (Boolean) this.relatorio.getParametros().get("B_SUBTRAIR_ICMS")){ valorIcms = CalculoImposto.getValorImposto(this.relatorio.getConexao(), idEstado, empresaId, indInterestadual, BigDecimal.ZERO, BigDecimal.ZERO, totalEmbarque , BigDecimal.ZERO); - totalEmbarque = totalEmbarque.subtract(valorIcms); + totalEmbarque = MoneyHelper.subtrair(totalEmbarque, valorIcms); } taxasLinha.setTOTAL_EMBARQUE(totalEmbarque); if(!totalPedagio.equals(BigDecimal.ZERO) && (Boolean) this.relatorio.getParametros().get("B_SUBTRAIR_ICMS")){ valorIcms = CalculoImposto.getValorImposto(this.relatorio.getConexao(), idEstado, empresaId, indInterestadual, BigDecimal.ZERO, BigDecimal.ZERO, BigDecimal.ZERO, totalPedagio); - totalPedagio = totalPedagio.subtract(valorIcms); + totalPedagio = MoneyHelper.subtrair(totalPedagio, valorIcms); } taxasLinha.setTOTAL_PEDAGIO(totalPedagio); if(!totalSeguro.equals(BigDecimal.ZERO) && (Boolean) this.relatorio.getParametros().get("B_SUBTRAIR_ICMS")){ valorIcms = CalculoImposto.getValorImposto(this.relatorio.getConexao(), idEstado, empresaId, indInterestadual, BigDecimal.ZERO, totalSeguro, BigDecimal.ZERO, BigDecimal.ZERO); - totalSeguro = totalSeguro.subtract(valorIcms); + totalSeguro = MoneyHelper.subtrair(totalSeguro, valorIcms); } taxasLinha.setTOTAL_SEGURO(totalSeguro);