Fix check quantità nelle regole di MtbColr

This commit is contained in:
2025-11-24 12:00:42 +01:00
parent ddd9c73f49
commit 0a12dc23f2

View File

@@ -308,7 +308,7 @@ rule "checkDeleteMtbColtWithDoc"
no-loop
when
eval(checkRulesEnabled)
$entity : MtbColt(operation == OperationType.DELETE && hasDocument && hasQuantity)
$entity : MtbColt(operation == OperationType.DELETE && hasDocument)
then
throw new CheckConstraintException("Impossibile eliminare un collo agganciato a documento");
end
@@ -318,7 +318,7 @@ rule "checkDeleteMtbColtWithoutDoc"
no-loop
when
eval(checkRulesEnabled)
$entity : MtbColt(operation == OperationType.DELETE && !hasDocument || !hasQuantity)
$entity : MtbColt(operation == OperationType.DELETE && !hasDocument)
then
PackagesRules.checkForAnyColloRif(conn, $entity.getGestione(), $entity.getSerCollo(), $entity.getNumCollo(), $entity.getDataCollo());
end