Correção da validação nosso numero sicoob fix bug#AL-3124
parent
cd283d078a
commit
2e8e906f9a
2
pom.xml
2
pom.xml
|
@ -175,7 +175,7 @@
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>br.com.rjconsultores</groupId>
|
<groupId>br.com.rjconsultores</groupId>
|
||||||
<artifactId>GeneradorBoletosCNAB</artifactId>
|
<artifactId>GeneradorBoletosCNAB</artifactId>
|
||||||
<version>1.1.0</version>
|
<version>1.1.2</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
|
|
|
@ -111,25 +111,21 @@ public class ArquivoRemessaCNABImpl implements ArquivoRemessaCNAB {
|
||||||
public boolean boletosOk(List<FechamentoBoleto> boletos) {
|
public boolean boletosOk(List<FechamentoBoleto> boletos) {
|
||||||
|
|
||||||
BancoLayout banco = null;
|
BancoLayout banco = null;
|
||||||
boolean toReturn = Boolean.TRUE;
|
|
||||||
|
|
||||||
if(boletos != null && !boletos.isEmpty()) {
|
if(boletos != null && !boletos.isEmpty()) {
|
||||||
for (java.util.Iterator<FechamentoBoleto> it = boletos.iterator(); it.hasNext();) {
|
for (FechamentoBoleto fechamentoBoleto : boletos) {
|
||||||
|
|
||||||
FechamentoBoleto fechamentoBoleto = it.next();
|
|
||||||
|
|
||||||
if(banco == null){
|
if(banco == null){
|
||||||
banco = BancoLayout.getInstanceByCodBanco(remessaCNABBancosDAO.findBanco(fechamentoBoleto.getFechamentoCntcorrente().getEmpresa()));
|
banco = BancoLayout.getInstanceByCodBanco(remessaCNABBancosDAO.findBanco(fechamentoBoleto.getFechamentoCntcorrente().getEmpresa()));
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!NossoNumeroUtils.validaNossoNumero(fechamentoBoleto.getNossonumero(), banco)){
|
if(!NossoNumeroUtils.validaNossoNumero(fechamentoBoleto.getNossonumero(), banco)){
|
||||||
it.remove();
|
return false;
|
||||||
toReturn = Boolean.FALSE;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return toReturn;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in New Issue