From b131073010f2d488cdfc30911e01a78300fc4fe9 Mon Sep 17 00:00:00 2001 From: alberto Date: Tue, 20 Jun 2017 14:19:11 +0000 Subject: [PATCH] =?UTF-8?q?Exporta=C3=A7=C3=A3o=20Fiscal=20:=20ECF=20e=20R?= =?UTF-8?q?MD=20(issue=208120)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Model/trunk/modelWeb@70084 d1611594-4594-4d17-8e1d-87c2c4800839 --- .../utilerias/exportacaofiscal/ExportacaoFiscal.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/com/rjconsultores/ventaboletos/utilerias/exportacaofiscal/ExportacaoFiscal.java b/src/com/rjconsultores/ventaboletos/utilerias/exportacaofiscal/ExportacaoFiscal.java index 9820b2ce2..43ad47f23 100644 --- a/src/com/rjconsultores/ventaboletos/utilerias/exportacaofiscal/ExportacaoFiscal.java +++ b/src/com/rjconsultores/ventaboletos/utilerias/exportacaofiscal/ExportacaoFiscal.java @@ -432,6 +432,10 @@ public class ExportacaoFiscal { adicionarRegistroRMDTipoBPS(writer, listaRegistroRMDTipoBPS); adicionarRegistroRMDTipoDBP(writer, listaRegistroRMDTipoDBP); + int linhas = listaRegistroRMDTipoPAR.size() + listaRegistroRMDTipoRMD.size() + listaRegistroRMDTipoBPS.size() + listaRegistroRMDTipoDBP.size() + 1 + 1; + + writer.print("TRA|" + linhas + UtiliteriasFiscal.QUEBRA_LINHA); + writer.close(); return arquivo; @@ -446,7 +450,7 @@ public class ExportacaoFiscal { private void adicionarRegistroRMDTipoCAB(PrintWriter writer, Date dataInicial, Date dataFinal, String nomeEmpresa, String nomeArquivo) { StringBuilder sb = new StringBuilder(); sb.append("CAB").append(SEPARADOR); - sb.append("63").append(SEPARADOR); + sb.append("116").append(SEPARADOR); sb.append("TotalBus").append(SEPARADOR); sb.append(new SimpleDateFormat("yyyyMMdd").format(new Date())).append(SEPARADOR); sb.append(formataCaracter(nomeEmpresa, false, 15)).append(SEPARADOR); @@ -528,7 +532,7 @@ public class ExportacaoFiscal { StringBuilder sb = new StringBuilder(); sb.append("RMD").append(SEPARADOR); - sb.append(formataNumerico(codigoEstabelecimento, true, 9)).append(SEPARADOR); + sb.append(String.format("%04d", codigoEstabelecimento)).append(SEPARADOR); sb.append(formataNumerico(numeroAIDF, true, 25)).append(SEPARADOR); sb.append(formataCaracter(serieAIDF, false, 3)).append(SEPARADOR); sb.append(formataCaracter(subSerieAIDF, false, 3)).append(SEPARADOR);