diff --git a/src/com/rjconsultores/ventaboletos/utilerias/exportacaofiscal/ExportacaoFiscal.java b/src/com/rjconsultores/ventaboletos/utilerias/exportacaofiscal/ExportacaoFiscal.java index 67d7c0b64..91a6e0180 100644 --- a/src/com/rjconsultores/ventaboletos/utilerias/exportacaofiscal/ExportacaoFiscal.java +++ b/src/com/rjconsultores/ventaboletos/utilerias/exportacaofiscal/ExportacaoFiscal.java @@ -563,12 +563,13 @@ public class ExportacaoFiscal { Long numeroFormularioAIDF = registro.getNumeroFormularioAIDF(); String dataEmissao = registro.getDataEmissao(); Boolean cancelado = registro.getCancelado(); - Integer codigoParticipante = registro.getCodigoParticipante(); + // Integer codigoParticipante = registro.getCodigoParticipante(); String codigoContabil = registro.getCodigoContabil(); StringBuilder sb = new StringBuilder(); sb.append("RMD").append(SEPARADOR); - sb.append(String.format("%04d", cancelado ? codigoParticipante : codigoEstabelecimento)).append(SEPARADOR); + // sb.append(String.format("%04d", cancelado ? codigoParticipante : codigoEstabelecimento)).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); diff --git a/src/com/rjconsultores/ventaboletos/utilerias/exportacaofiscal/vo/ExportacaoBPR.java b/src/com/rjconsultores/ventaboletos/utilerias/exportacaofiscal/vo/ExportacaoBPR.java index e817bd6f6..51a796150 100644 --- a/src/com/rjconsultores/ventaboletos/utilerias/exportacaofiscal/vo/ExportacaoBPR.java +++ b/src/com/rjconsultores/ventaboletos/utilerias/exportacaofiscal/vo/ExportacaoBPR.java @@ -129,7 +129,7 @@ public class ExportacaoBPR { registro = new ExportacaoRMDTipoRMD(); registro.setDataEmissao(base.getDataEmissaoRMD()); registro.setCodigoParticipante(base.getDocumentoCancelado() ? base.getCodigoParticipantePar() : base.getCodigoParticipante()); - registro.setCodigoEstabelecimento(base.getCodigoEstabelecimento()); + registro.setCodigoEstabelecimento( base.getDocumentoCancelado() ? base.getCodigoEstabelecimentoPar() : base.getCodigoEstabelecimento()); registro.setNumeroAIDF(base.getNumeroAIDFRMD()); registro.setSerieAIDF(base.getSerieAIDFRMD()); registro.setSubSerieAIDF(base.getSubSerieAIDFRMD());