From a9bd88ccf7569ee24f97a5b3bf462e76b9279404 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Fri, 17 Jun 2011 13:39:38 +0000 Subject: [PATCH] Fix: missing statut after validation --- htdocs/commande/class/commande.class.php | 1 + htdocs/expedition/class/expedition.class.php | 3 ++- htdocs/livraison/class/livraison.class.php | 8 ++++++++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php index 37e1c73800b..dd75a84f24b 100644 --- a/htdocs/commande/class/commande.class.php +++ b/htdocs/commande/class/commande.class.php @@ -2135,6 +2135,7 @@ class Commande extends CommonObject else { dol_print_error($this->db); + return -1; } } diff --git a/htdocs/expedition/class/expedition.class.php b/htdocs/expedition/class/expedition.class.php index 28d8100730c..bc47a8dd2fc 100644 --- a/htdocs/expedition/class/expedition.class.php +++ b/htdocs/expedition/class/expedition.class.php @@ -539,10 +539,11 @@ class Expedition extends CommonObject } } - // Set new ref + // Set new ref and current status if (! $error) { $this->ref = $numref; + $this->statut = 1; } if (! $error) diff --git a/htdocs/livraison/class/livraison.class.php b/htdocs/livraison/class/livraison.class.php index 2b4c32bc731..9dc3d64f56c 100644 --- a/htdocs/livraison/class/livraison.class.php +++ b/htdocs/livraison/class/livraison.class.php @@ -51,6 +51,7 @@ class Livraison extends CommonObject var $origin_id; var $socid; var $ref_customer; + var $statut; var $expedition_id; @@ -399,6 +400,13 @@ class Livraison extends CommonObject } } } + + // Set new ref and current status + if (! $error) + { + $this->ref = $numref; + $this->statut = 1; + } dol_syslog("livraison.class.php::valid ok"); }