fixes bug#16588

dev: Thiago Clemente
qua:

git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/GeneradorBoletosCNAB/trunk@99336 d1611594-4594-4d17-8e1d-87c2c4800839
master
fabio 2019-12-12 17:59:41 +00:00
parent 4f38cc12e8
commit ead6e21b75
3 changed files with 19 additions and 11 deletions

View File

@ -62,7 +62,8 @@ public class BradescoFlatFile extends AbstractFlatFile implements RemessaInterfa
transacaoTitulos.setValue("NumeroControleDoParticipante", FormataUtil.formatarValorPorTamanho(titulo.getNumeroControleDoParticipante(), 25)); transacaoTitulos.setValue("NumeroControleDoParticipante", FormataUtil.formatarValorPorTamanho(titulo.getNumeroControleDoParticipante(), 25));
transacaoTitulos.setValue("Filler1", FormataUtil.formatarValorPorTamanho("0", 8)); transacaoTitulos.setValue("Filler1", FormataUtil.formatarValorPorTamanho("0", 8));
transacaoTitulos.setValue("NossoNumeroComDigito", FormataUtil.formatarValorPorTamanho(titulo.getNossoNumeroComDigito(), 12)); transacaoTitulos.setValue("NossoNumeroComDigito", FormataUtil.formatarValorPorTamanho(titulo.getNossoNumeroComDigito(), 12));
transacaoTitulos.setValue("DadosIgnorados2", FormataUtil.formatarValorPorTamanho("", 25)); transacaoTitulos.setValue("DescontoBonificacaoDia", FormataUtil.formatarValorPorTamanho("0", 10));
transacaoTitulos.setValue("DadosIgnorados2", FormataUtil.formatarValorPorTamanho("", 15));
transacaoTitulos.setValue("QtdPagamento", FormataUtil.formatarValorPorTamanho(titulo.getQtdPagamento().toString(), 25)); transacaoTitulos.setValue("QtdPagamento", FormataUtil.formatarValorPorTamanho(titulo.getQtdPagamento().toString(), 25));
//transacaoTitulos.setValue("CodigoDeOcorrencia", FormataUtil.formatarValorPorTamanho(titulo.getCodigoDeOcorrencia().toString(), 2)); //transacaoTitulos.setValue("CodigoDeOcorrencia", FormataUtil.formatarValorPorTamanho(titulo.getCodigoDeOcorrencia().toString(), 2));
transacaoTitulos.setValue("NumeroDoDocumento", FormataUtil.formatarValorPorTamanho(titulo.getNumeroDoDocumento(), 10)); transacaoTitulos.setValue("NumeroDoDocumento", FormataUtil.formatarValorPorTamanho(titulo.getNumeroDoDocumento(), 10));

View File

@ -79,7 +79,6 @@ public class NossoNumeroUtils {
*/ */
public static String dacBradesco(Integer numCarteira, BigInteger nossoNumero){ public static String dacBradesco(Integer numCarteira, BigInteger nossoNumero){
int multiplicadores[] = {2,7,6,5,4,3,2,7,6,5,4,3,2}; int multiplicadores[] = {2,7,6,5,4,3,2,7,6,5,4,3,2};
int multiplicandos[] = new int[13]; int multiplicandos[] = new int[13];
@ -89,16 +88,13 @@ public class NossoNumeroUtils {
String base = carteira + nNumero; String base = carteira + nNumero;
for (int i = 0; i < multiplicandos.length; i++) { for (int i = 0; i < multiplicandos.length; i++) {
String d = base.charAt(i) + ""; String d = base.charAt(i) + "";
multiplicandos[i] = Integer.valueOf(d) * multiplicadores[i]; multiplicandos[i] = Integer.valueOf(d) * multiplicadores[i];
} }
int dac = 0; int dac = 0;
for(Integer v : multiplicandos){ for(Integer v : multiplicandos){
dac += v; dac += v;
} }

View File

@ -52,19 +52,30 @@
<GroupOfFields> <GroupOfFields>
<IdType name="IDReg" value="1" length="1" position="1" /> <IdType name="IDReg" value="1" length="1" position="1" />
<Field name="DadosIgnorados1" length="19" /> <Field name="DadosIgnorados1" length="19" />
<!-- Definicao dos dados ignorados acima
<Field name="AgenciaDebito" length="5" />
<Field name="DigitoAgenciaDebito" length="1" />
<Field name="RazaoContaCorrente" length="5" />
<Field name="ContaCorrente" length="7" />
<Field name="DigitoContaCorrrente" length="1" />
-->
<Field name="Filler0" length="1" type="INTEGER" value="0" /> <Field name="Filler0" length="1" type="INTEGER" value="0" />
<Field name="Carteira" type="INTEGER" length="3" padding="ZERO_LEFT"/> <Field name="Carteira" type="INTEGER" length="3" padding="ZERO_LEFT"/>
<Field name="Agencia" type="INTEGER" length="5" padding="ZERO_LEFT"/> <Field name="Agencia" type="INTEGER" length="5" padding="ZERO_LEFT"/>
<Field name="Contacorrente" type="INTEGER" length="7" padding="ZERO_LEFT"/> <Field name="Contacorrente" type="INTEGER" length="7" padding="ZERO_LEFT"/>
<Field name="DvConta" type="INTEGER" length="1" padding="ZERO_LEFT"/> <Field name="DvConta" type="INTEGER" length="1" padding="ZERO_LEFT"/>
<Field name="NumeroControleDoParticipante" length="25" /> <Field name="NumeroControleDoParticipante" length="25" />
<Field name="Filler1" type="INTEGER" length="8" padding="ZERO_LEFT" /> <Field name="BancoCamaraCompensacao" length="3" padding="ZERO_LEFT"/>
<Field name="Multa" length="1" padding="ZERO_LEFT"/>
<Field name="PercentualMulta" length="4" padding="ZERO_LEFT"/>
<Field name="NossoNumeroComDigito" length="12" /> <Field name="NossoNumeroComDigito" length="12" />
<Field name="DescontoBonificacaoDia" length="10" /> <Field name="DescontoBonificacaoDia" length="10" padding="ZERO_LEFT"/>
<Field name="EmissaoBoleto" length="1" value="2" /> <Field name="EmissaoBoleto" length="1" value="2" />
<Field name="DebitoAuto" length="1" value="N" /> <Field name="DebitoAuto" length="1" value="N" />
<Field name="DadosIgnorados3" length="12" /> <Field name="IdentificacaoOperacaoBanco" length="10" />
<Field name="QtdPagamento" length="2" type="INTEGER" blankAccepted="true" /> <Field name="RateioCredito" length="1" />
<Field name="AvisoDebitoAutomatico" length="1" />
<Field name="QtdPagamento" length="2" type="INTEGER" blankAccepted="true" padding="ZERO_LEFT"/>
<Field name="CodigoDeOcorrencia" length="2" type="INTEGER" value="01" padding="ZERO_LEFT" /> <Field name="CodigoDeOcorrencia" length="2" type="INTEGER" value="01" padding="ZERO_LEFT" />
<Field name="NumeroDoDocumento" length="10" type="CHARACTER" /> <Field name="NumeroDoDocumento" length="10" type="CHARACTER" />
<!-- <Field name="Vencimento" length="6" type="DATE" format="DATE_DDMMYY" padding="ZERO_LEFT" /> --> <!-- <Field name="Vencimento" length="6" type="DATE" format="DATE_DDMMYY" padding="ZERO_LEFT" /> -->