Correção da validação nosso numero sicoob fix bug#AL-3124

Reviewed-on: adm/ModelWeb#94
Reviewed-by: Valdir Cordeiro <valdir.cordeiro@totvs.com.br>
master
fabio 2023-08-24 12:40:58 +00:00
commit a1cf720c1b
2 changed files with 5 additions and 9 deletions

View File

@ -175,7 +175,7 @@
<dependency>
<groupId>br.com.rjconsultores</groupId>
<artifactId>GeneradorBoletosCNAB</artifactId>
<version>1.1.0</version>
<version>1.1.2</version>
</dependency>
<dependency>

View File

@ -111,25 +111,21 @@ public class ArquivoRemessaCNABImpl implements ArquivoRemessaCNAB {
public boolean boletosOk(List<FechamentoBoleto> boletos) {
BancoLayout banco = null;
boolean toReturn = Boolean.TRUE;
if(boletos != null && !boletos.isEmpty()) {
for (java.util.Iterator<FechamentoBoleto> it = boletos.iterator(); it.hasNext();) {
FechamentoBoleto fechamentoBoleto = it.next();
for (FechamentoBoleto fechamentoBoleto : boletos) {
if(banco == null){
banco = BancoLayout.getInstanceByCodBanco(remessaCNABBancosDAO.findBanco(fechamentoBoleto.getFechamentoCntcorrente().getEmpresa()));
}
if(!NossoNumeroUtils.validaNossoNumero(fechamentoBoleto.getNossonumero(), banco)){
it.remove();
toReturn = Boolean.FALSE;
return false;
}
}
}
return toReturn;
return true;
}
@Override