From 5c82756330146baa9f792d7a0c88078fddb79bb3 Mon Sep 17 00:00:00 2001 From: marc_ocebo Date: Sun, 6 Mar 2005 14:22:39 +0000 Subject: [PATCH] =?UTF-8?q?Le=20module=20Commande=20re=E7oit=20l'argument?= =?UTF-8?q?=20soci=E9t=E9=20pour=20calculer=20son=20num=E9ro?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/commande/commande.class.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/htdocs/commande/commande.class.php b/htdocs/commande/commande.class.php index 167085be2de..bbf13d8732c 100644 --- a/htdocs/commande/commande.class.php +++ b/htdocs/commande/commande.class.php @@ -124,7 +124,9 @@ class Commande // Recuperation de la nouvelle reference $objMod = new $modName($this->db); - $num = $objMod->commande_get_num(); + $soc = new Societe($this->db); + $soc->fetch($this->soc_id); + $num = $objMod->commande_get_num($soc); $sql = "UPDATE ".MAIN_DB_PREFIX."commande SET ref='$num', fk_statut = 1, date_valid=now(), fk_user_valid=$user->id"; $sql .= " WHERE rowid = $this->id AND fk_statut = 0 ;";