The signature of the Sale order ->cancel() method and shipment

->cancel() has been modified to introduce the $user param like for other
methods that modify a status.
This commit is contained in:
ldestailleur
2025-09-03 16:08:00 +02:00
parent cc6f43493c
commit 0255512c1c
7 changed files with 13 additions and 12 deletions

View File

@@ -881,10 +881,11 @@ class Commande extends CommonOrder
* Cancel an order
* If stock is decremented on order validation, we must reincrement it
*
* @param User $user User making action
* @param int $idwarehouse Id warehouse to use for stock change.
* @return int Return integer <0 if KO, >0 if OK
*/
public function cancel($idwarehouse = -1)
public function cancel($user, $idwarehouse = -1)
{
global $user, $langs;