Clean code

This commit is contained in:
Laurent Destailleur 2026-01-12 14:14:19 +01:00
parent c92b7874a3
commit 9f151233be

View file

@ -118,7 +118,7 @@ class InterfaceActionsBlockedLog extends DolibarrTriggers
}
// Protect against modification of data that should be immutable on a validated invoice
if (($action === 'BILL_MODIFY' || $action === 'FACTURE_MODIFY') && !empty($object->oldcopy) && in_array($object->element, array('invoice', 'facture')) && $object->status != 0) {
if ($action === 'BILL_MODIFY' && !empty($object->oldcopy) && in_array($object->element, array('invoice', 'facture')) && $object->status != 0) {
if ($object->oldcopy->ref != $object->ref) {
$this->errors[] = 'Modifying the property Ref of a non draft invoice is not allowed';
return -2;