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
commit
a1cf720c1b
2
pom.xml
2
pom.xml
|
@ -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>
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue