From 4603bc17ed2dfff7b62b5f862bafa42574af085f Mon Sep 17 00:00:00 2001 From: MinaR Date: Tue, 3 Dec 2024 16:40:04 +0100 Subject: [PATCH] aggiunto controllo su movimento senza codice --- .../ems/contabil/service/RossoGarganoSyncService.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ems-engine/src/main/java/it/integry/ems/contabil/service/RossoGarganoSyncService.java b/ems-engine/src/main/java/it/integry/ems/contabil/service/RossoGarganoSyncService.java index 8673dd1cb8..0d7daf77f3 100644 --- a/ems-engine/src/main/java/it/integry/ems/contabil/service/RossoGarganoSyncService.java +++ b/ems-engine/src/main/java/it/integry/ems/contabil/service/RossoGarganoSyncService.java @@ -280,6 +280,9 @@ public class RossoGarganoSyncService { } Object pnCodAnag = UtilityHashMap.getValueIfExists(c, "PN_COD_ANAG"); + if (UtilityString.isNullOrEmpty(pnCodAnag)) + throw new Exception(String.format("Nessun conto/codice anagrafico trovato sul movimento del %s n. %s)", pnDataCompetenza, pnNroReg)); + sql = Query.format( "SELECT ctb_cont.cod_ccon\n" + "FROM ctb_cont\n" + @@ -306,10 +309,10 @@ public class RossoGarganoSyncService { codCcon = UtilityHashMap.getValueIfExists(datiAnag, "cod_ccon"); tipoAnag = UtilityHashMap.getValueIfExists(datiAnag, "tipo_anag"); if (UtilityString.isNullOrEmpty(codAnag)) - throw new Exception(String.format("Codice cliente\fornitore non codificato (diacod: %s)", pnCodAnag)); + throw new Exception(String.format("Codice cliente/fornitore non codificato (diacod: %s)", pnCodAnag)); if (UtilityString.isNullOrEmpty(codCcon)) - throw new Exception(String.format("Codice conto non agganciato al cliente\fornitore %s (diacod: %s)", codAnag, pnCodAnag)); + throw new Exception(String.format("Codice conto non agganciato al cliente/fornitore %s (diacod: %s)", codAnag, pnCodAnag)); } String sezionaleIva = UtilityHashMap.getValueIfExists(c, "PN_SEZIONALE_IVA");