From 2e8e906f9ab09bf0639c3e4d7cc574f185d62a32 Mon Sep 17 00:00:00 2001 From: Fabio Faria Date: Thu, 24 Aug 2023 09:39:33 -0300 Subject: [PATCH] =?UTF-8?q?Corre=C3=A7=C3=A3o=20da=20valida=C3=A7=C3=A3o?= =?UTF-8?q?=20nosso=20numero=20sicoob=20fix=20bug#AL-3124?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 2 +- .../service/impl/ArquivoRemessaCNABImpl.java | 12 ++++-------- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/pom.xml b/pom.xml index 2f2e2e8ed..cf21fbf8b 100644 --- a/pom.xml +++ b/pom.xml @@ -175,7 +175,7 @@ br.com.rjconsultores GeneradorBoletosCNAB - 1.1.0 + 1.1.2 diff --git a/src/com/rjconsultores/ventaboletos/service/impl/ArquivoRemessaCNABImpl.java b/src/com/rjconsultores/ventaboletos/service/impl/ArquivoRemessaCNABImpl.java index d5594d51d..81edc2916 100644 --- a/src/com/rjconsultores/ventaboletos/service/impl/ArquivoRemessaCNABImpl.java +++ b/src/com/rjconsultores/ventaboletos/service/impl/ArquivoRemessaCNABImpl.java @@ -111,25 +111,21 @@ public class ArquivoRemessaCNABImpl implements ArquivoRemessaCNAB { public boolean boletosOk(List boletos) { BancoLayout banco = null; - boolean toReturn = Boolean.TRUE; if(boletos != null && !boletos.isEmpty()) { - for (java.util.Iterator 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; + if(!NossoNumeroUtils.validaNossoNumero(fechamentoBoleto.getNossonumero(), banco)){ + return false; } } } - return toReturn; + return true; } @Override