From 03a15687d61bb8d7ab01603511a23f14f71d20d1 Mon Sep 17 00:00:00 2001 From: julio Date: Mon, 16 Oct 2017 19:40:58 +0000 Subject: [PATCH] fixes bug #9386 git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Model/trunk/modelWeb@74905 d1611594-4594-4d17-8e1d-87c2c4800839 --- .../exportacaofiscal/ExportacaoFiscal.java | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/com/rjconsultores/ventaboletos/utilerias/exportacaofiscal/ExportacaoFiscal.java b/src/com/rjconsultores/ventaboletos/utilerias/exportacaofiscal/ExportacaoFiscal.java index 1ad3e20c8..56c5836c0 100644 --- a/src/com/rjconsultores/ventaboletos/utilerias/exportacaofiscal/ExportacaoFiscal.java +++ b/src/com/rjconsultores/ventaboletos/utilerias/exportacaofiscal/ExportacaoFiscal.java @@ -370,7 +370,10 @@ public class ExportacaoFiscal { BigDecimal aliquotaICMS = item.getAliquotaICMS(); BigDecimal valorICMSDebitado = item.getValorICMSDebitado(); BigDecimal valorICMSIsento = item.getValorICMSIsento(); - BigDecimal valorICMSOutros = item.getValorICMSOutros(); +// BigDecimal valorICMSOutros = item.getValorICMSOutros(); + + BigDecimal difValorTotalICMS = valorTotal.subtract(valorBaseCalculoICMS); + Integer codigoSituacaoTribColunaB = item.getCodigoSituacaoTribColunaB(); // 00 - tributação normal; 20 - tributação com redução na base de calculo; 40 - isentos String ufOrigem = item.getUfOrigem(); String municipioOrigem = item.getMunicipioOrigem() == null ? null : item.getMunicipioOrigem().toString(); @@ -392,7 +395,7 @@ public class ExportacaoFiscal { sb.append(formataValor(aliquotaICMS, 5)).append(SEPARADOR); sb.append(formataValor(valorICMSDebitado, 15)).append(SEPARADOR); sb.append(formataValor(valorICMSIsento, 15)).append(SEPARADOR); - sb.append(formataValor(valorICMSOutros, 15)).append(SEPARADOR); + sb.append(formataValor(difValorTotalICMS, 15)).append(SEPARADOR); sb.append("N").append(SEPARADOR); sb.append("N").append(SEPARADOR); sb.append("N").append(SEPARADOR); @@ -763,7 +766,10 @@ public class ExportacaoFiscal { BigDecimal aliquotaICMS = registro.getAliquotaICMS(); BigDecimal valorICMS = registro.getValorICMS(); BigDecimal valorICMSIsento = registro.getValorICMSIsento(); - BigDecimal valorICMSOutros = registro.getValorICMSOutros(); +// BigDecimal valorICMSOutros = registro.getValorICMSOutros(); + + BigDecimal difValorTotalICMS = valorTotal.subtract(valorBaseCalculoICMS); + Integer codigoSituacaoTribColunaB = registro.getCodigoSituacaoTribColunaB(); // 00 - tributação normal; 20 - tributação com redução na base de calculo; 40 - isentos String ufOrigem = registro.getUfOrigem(); Integer municipioestadoOrigem = registro.getMunicipioOrigem(); @@ -783,7 +789,7 @@ public class ExportacaoFiscal { sb.append(formataValor(aliquotaICMS, 5)).append(SEPARADOR); sb.append(formataValor(valorICMS, 15)).append(SEPARADOR); sb.append(formataValor(valorICMSIsento, 15)).append(SEPARADOR); - sb.append(formataValor(valorICMSOutros, 15)).append(SEPARADOR); + sb.append(formataValor(difValorTotalICMS, 15)).append(SEPARADOR); sb.append(codigoSituacaoTribColunaB == 0 ? "00" : formataNumerico(codigoSituacaoTribColunaB, true, 2)).append(SEPARADOR); sb.append(formataCaracter(ufOrigem, true, 2)).append(SEPARADOR); sb.append(municipioOrigem).append(SEPARADOR);