forked from Wavyzz/dolibarr
clean code (#35183)
* clean code * clean code * clean code * clean code * clean code * clean code * clean code * clean code * clean code
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2024 William Mead <william.mead@manchenumerique.fr>
|
||||
/* Copyright (C) 2024 William Mead <william.mead@manchenumerique.fr>
|
||||
* Copyright (C) 2025 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -49,7 +50,7 @@ trait CommonSignedObject
|
||||
'STATUS_SIGNED_SENDER' => 1,
|
||||
'STATUS_SIGNED_RECEIVER' => 2,
|
||||
'STATUS_SIGNED_RECEIVER_ONLINE' => 3,
|
||||
'STATUS_SIGNED_ALL' => 9 // To handle future kind of signature (ex: tripartite contract)
|
||||
'STATUS_SIGNED_ALL' => 9, // To handle future kind of signature (ex: tripartite contract)
|
||||
];
|
||||
|
||||
/**
|
||||
@@ -140,11 +141,9 @@ trait CommonSignedObject
|
||||
$sql .= " WHERE rowid = ".((int) $this->id);
|
||||
|
||||
if ($this->db->query($sql)) {
|
||||
if (!$error) {
|
||||
$this->oldcopy = clone $this;
|
||||
}
|
||||
$this->oldcopy = clone $this;
|
||||
|
||||
if (!$error && !$notrigger) {
|
||||
if (!$notrigger) {
|
||||
// Call trigger
|
||||
$result = $this->call_trigger($triggercode, $user);
|
||||
if ($result < 0) {
|
||||
|
||||
Reference in New Issue
Block a user