Corretto rollback su salvataggio documenti in caso di errore e creazione doc imballo se cod forn trasp impostato
Some checks failed
IntegryManagementSystem_Multi/pipeline/head Something is wrong with the build of this commit

This commit is contained in:
2025-09-24 11:23:41 +02:00
parent 685fa64f46
commit af6bc8ebe9

View File

@@ -106,6 +106,7 @@ public class DocumentiDirettiService {
entityList.addAll(mtbLisaCostoData);
}
try {
List<EntityBase> entityRet = entityProcessor.processEntityList(entityList, true);
UtilityEntity.throwEntitiesException(entityRet);
@@ -121,7 +122,7 @@ public class DocumentiDirettiService {
entityRet = entityProcessor.processEntityList(mtbLisaCostoData, true);
UtilityEntity.throwEntitiesException(entityRet);
}
} else if (gestione.equalsIgnoreCase("V") &&
} else if (gestione.equalsIgnoreCase("V") && !UtilityString.isNullOrEmpty(dtbDoct.getCodFornTrasp()) &&
TipoEmissione.valueOf(UtilityHashMap.getValueIfExists(datiTipoDoc, "tipo_emissione")) == TipoEmissione.DIRETTA &&
!dtbDoct.getDtbDocImb().isEmpty() && salvaImballiAttiva) {
DtbDoct dtbDoctSave =
@@ -132,7 +133,10 @@ public class DocumentiDirettiService {
multiDBTransactionManager.commitAll();
return entityRet;
} catch (Exception e) {
multiDBTransactionManager.rollbackAll();
throw e;
}
}
private DtbDoct checkUDSForTransfer(DtbDoct dtbDoct, List<EntityBase> entityList, boolean isNewDoc) throws Exception {