From 69c46ecd86c3c199bf3f6cae3bde473151694dcb Mon Sep 17 00:00:00 2001 From: atm-quentin Date: Tue, 2 Oct 2018 16:54:20 +0200 Subject: [PATCH] set order status to valid when shipping set to draft --- htdocs/expedition/class/expedition.class.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/htdocs/expedition/class/expedition.class.php b/htdocs/expedition/class/expedition.class.php index f5eb969149a..0db89a0a1e0 100644 --- a/htdocs/expedition/class/expedition.class.php +++ b/htdocs/expedition/class/expedition.class.php @@ -2284,6 +2284,13 @@ class Expedition extends CommonObject $result=$this->call_trigger('SHIPPING_UNVALIDATE',$user); if ($result < 0) $error++; } + if($this->origin == 'commande'){ + $commande = new Commande($this->db); + $commande->fetch($this->origin_id); + $commande->statut = Commande::STATUS_VALIDATED; + $commande->update(); + } + if (!$error) { $this->statut=self::STATUS_DRAFT;