Clean code
This commit is contained in:
parent
c92b7874a3
commit
9f151233be
1 changed files with 1 additions and 1 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue