RMD - Arquivo Exportação para QS (bug #6374) - Parte 1 - ECF
git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Model/trunk/modelWeb@45192 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
dc2e3d4539
commit
57d75eede2
|
@ -82,9 +82,9 @@ public class FiscalServiceImpl implements FiscalService {
|
|||
String filialCliente = StringUtils.rightPad("", 2, "9");
|
||||
String condicaoPagamento = StringUtils.rightPad("", 3, "9");
|
||||
|
||||
String valorPIS = StringUtils.rightPad("", 14, " ");
|
||||
String valorCofins = StringUtils.rightPad("", 14, " ");
|
||||
String valorCSLL = StringUtils.rightPad("", 14, " ");
|
||||
String valorPIS = StringUtils.rightPad("", 14, "0");
|
||||
String valorCofins = StringUtils.rightPad("", 14, "0");
|
||||
String valorCSLL = StringUtils.rightPad("", 14, "0");
|
||||
|
||||
String coo = fiscal.getCoo();
|
||||
if (coo.length() < 9) {
|
||||
|
@ -93,12 +93,12 @@ public class FiscalServiceImpl implements FiscalService {
|
|||
|
||||
String valorTotalDocumanto = fiscal.getValorTotal().toString();
|
||||
if (valorTotalDocumanto.length() < 14) {
|
||||
valorTotalDocumanto = StringUtils.rightPad("", (14 - valorTotalDocumanto.length()), " ") + valorTotalDocumanto;
|
||||
valorTotalDocumanto = StringUtils.rightPad("", (14 - valorTotalDocumanto.length()), "0") + valorTotalDocumanto;
|
||||
}
|
||||
|
||||
String valorItens = fiscal.getValorTotal().toString();
|
||||
if (valorItens.length() < 14) {
|
||||
valorItens = StringUtils.rightPad("", (14 - valorItens.length()), " ") + valorItens;
|
||||
valorItens = StringUtils.rightPad("", (14 - valorItens.length()), "0") + valorItens;
|
||||
}
|
||||
|
||||
HashMap<String, String> aliquotaBaseCalculo = getAliquotaBaseCalculo(fiscal);
|
||||
|
@ -199,18 +199,18 @@ public class FiscalServiceImpl implements FiscalService {
|
|||
|
||||
String valorUnitario = item.getValorItem().toString();
|
||||
if (valorUnitario.length() < 15) {
|
||||
valorUnitario = StringUtils.rightPad("", (15 - valorUnitario.length()), " ") + valorUnitario;
|
||||
valorUnitario = StringUtils.rightPad("", (15 - valorUnitario.length()), "0") + valorUnitario;
|
||||
}
|
||||
|
||||
String valorTotal = item.getValorItem().toString();
|
||||
if (valorTotal.length() < 15) {
|
||||
valorTotal = StringUtils.rightPad("", (15 - valorTotal.length()), " ") + valorTotal;
|
||||
valorTotal = StringUtils.rightPad("", (15 - valorTotal.length()), "0") + valorTotal;
|
||||
}
|
||||
|
||||
String aliquotaItem = StringUtils.rightPad("", 7, " ");
|
||||
String impostoItem = StringUtils.rightPad("", 15, " ");
|
||||
String totalICMSIsentoItem = StringUtils.rightPad("", 15, " ");
|
||||
String totalICMSNaotributadoItem = StringUtils.rightPad("", 15, " ");
|
||||
String aliquotaItem = StringUtils.rightPad("", 7, "0");
|
||||
String impostoItem = StringUtils.rightPad("", 15, "0");
|
||||
String totalICMSIsentoItem = StringUtils.rightPad("", 15, "0");
|
||||
String totalICMSNaotributadoItem = StringUtils.rightPad("", 15, "0");
|
||||
|
||||
HashMap<String, BigDecimal> aliquotaItens = new HashMap<String, BigDecimal>(0);
|
||||
|
||||
|
@ -232,7 +232,7 @@ public class FiscalServiceImpl implements FiscalService {
|
|||
totalICMSNaotributadoItem = soma.toString();
|
||||
|
||||
if (totalICMSNaotributadoItem.length() < 15) {
|
||||
totalICMSNaotributadoItem = StringUtils.rightPad("", (15 - totalICMSNaotributadoItem.length()), " ") + totalICMSNaotributadoItem;
|
||||
totalICMSNaotributadoItem = StringUtils.rightPad("", (15 - totalICMSNaotributadoItem.length()), "0") + totalICMSNaotributadoItem;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -256,23 +256,23 @@ public class FiscalServiceImpl implements FiscalService {
|
|||
aliquotaItem = UtileriasFiscal.formataNumerico(aliquotaItem, aliquotaItem.length());
|
||||
|
||||
if (aliquotaItem.length() < 7) {
|
||||
aliquotaItem = StringUtils.rightPad("", (7 - aliquotaItem.length()), " ") + aliquotaItem;
|
||||
aliquotaItem = StringUtils.rightPad("", (7 - aliquotaItem.length()), "0") + aliquotaItem;
|
||||
}
|
||||
|
||||
if (impostoItem.length() < 15) {
|
||||
impostoItem = StringUtils.rightPad("", (15 - impostoItem.length()), " ") + impostoItem;
|
||||
impostoItem = StringUtils.rightPad("", (15 - impostoItem.length()), "0") + impostoItem;
|
||||
}
|
||||
}
|
||||
|
||||
String aliquotaPIS = StringUtils.rightPad("", 7, " ");
|
||||
String valorPIS = StringUtils.rightPad("", 15, " ");
|
||||
String aliquotaCofins = StringUtils.rightPad("", 7, " ");
|
||||
String valorCofins = StringUtils.rightPad("", 15, " ");
|
||||
String aliquotaCSLL = StringUtils.rightPad("", 7, " ");
|
||||
String valorCSLL = StringUtils.rightPad("", 15, " ");
|
||||
String aliquotaPIS = StringUtils.rightPad("", 7, "0");
|
||||
String valorPIS = StringUtils.rightPad("", 15, "0");
|
||||
String aliquotaCofins = StringUtils.rightPad("", 7, "0");
|
||||
String valorCofins = StringUtils.rightPad("", 15, "0");
|
||||
String aliquotaCSLL = StringUtils.rightPad("", 7, "0");
|
||||
String valorCSLL = StringUtils.rightPad("", 15, "0");
|
||||
|
||||
String aliquotaISS = StringUtils.rightPad("", 7, " ");
|
||||
String valorISS = StringUtils.rightPad("", 15, " ");
|
||||
String aliquotaISS = StringUtils.rightPad("", 7, "0");
|
||||
String valorISS = StringUtils.rightPad("", 15, "0");
|
||||
|
||||
seq++;
|
||||
String sequencial = seq.toString();
|
||||
|
@ -363,7 +363,7 @@ public class FiscalServiceImpl implements FiscalService {
|
|||
totalICMSNaotributado = soma.toString();
|
||||
|
||||
if (totalICMSNaotributado.length() < 14) {
|
||||
totalICMSNaotributado = StringUtils.rightPad("", (14 - totalICMSNaotributado.length()), " ") + totalICMSNaotributado;
|
||||
totalICMSNaotributado = StringUtils.rightPad("", (14 - totalICMSNaotributado.length()), "0") + totalICMSNaotributado;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -387,26 +387,26 @@ public class FiscalServiceImpl implements FiscalService {
|
|||
aliquota = UtileriasFiscal.formataNumerico(aliquota, aliquota.length());
|
||||
|
||||
if (aliquota.length() < 14) {
|
||||
aliquota = StringUtils.rightPad("", (14 - aliquota.length()), " ") + aliquota;
|
||||
aliquota = StringUtils.rightPad("", (14 - aliquota.length()), "0") + aliquota;
|
||||
}
|
||||
|
||||
if (imposto.length() < 14) {
|
||||
imposto = StringUtils.rightPad("", (14 - imposto.length()), " ") + imposto;
|
||||
imposto = StringUtils.rightPad("", (14 - imposto.length()), "0") + imposto;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (StringUtils.isBlank(aliquota))
|
||||
aliquota = StringUtils.rightPad("", 14, " ");
|
||||
aliquota = StringUtils.rightPad("", 14, "0");
|
||||
|
||||
if (StringUtils.isBlank(imposto))
|
||||
imposto = StringUtils.rightPad("", 14, " ");
|
||||
imposto = StringUtils.rightPad("", 14, "0");
|
||||
|
||||
if (StringUtils.isBlank(totalICMSIsento))
|
||||
totalICMSIsento = StringUtils.rightPad("", 14, " ");
|
||||
totalICMSIsento = StringUtils.rightPad("", 14, "0");
|
||||
|
||||
if (StringUtils.isBlank(totalICMSNaotributado))
|
||||
totalICMSNaotributado = StringUtils.rightPad("", 14, " ");
|
||||
totalICMSNaotributado = StringUtils.rightPad("", 14, "0");
|
||||
|
||||
resp.put("aliquota", aliquota);
|
||||
resp.put("imposto", imposto);
|
||||
|
|
Loading…
Reference in New Issue