From cf7268aeb56bef174e5aef42f4d544fd2b389e96 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Sat, 29 Apr 2006 13:30:21 +0000 Subject: [PATCH] =?UTF-8?q?ajout=20possibilit=E9e=20d'=E9diter=20une=20com?= =?UTF-8?q?mande=20valid=E9e?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/commande/commande.class.php | 21 +++++++++++++++++++++ htdocs/commande/fiche.php | 2 +- 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/htdocs/commande/commande.class.php b/htdocs/commande/commande.class.php index 95d309fcaae..48f3a2069b6 100644 --- a/htdocs/commande/commande.class.php +++ b/htdocs/commande/commande.class.php @@ -181,6 +181,27 @@ class Commande } return $result ; } + + /** + * + * + */ + function reopen($userid) + { + $sql = "UPDATE ".MAIN_DB_PREFIX."commande SET fk_statut = 0"; + + $sql .= " WHERE rowid = $this->id;"; + + if ($this->db->query($sql) ) + { + return 1; + } + else + { + dolibarr_print_error($this->db); + } + } + /** * \brief Cloture la commande * \param user Objet utilisateur qui cloture diff --git a/htdocs/commande/fiche.php b/htdocs/commande/fiche.php index bd4e1334c0e..5fd793792a6 100644 --- a/htdocs/commande/fiche.php +++ b/htdocs/commande/fiche.php @@ -1081,7 +1081,7 @@ else { if ($user->rights->commande->creer) { - print ''.$langs->trans('Edit').''; + print ''.$langs->trans('Edit').''; } }