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').'';
}
}