diff --git a/htdocs/commande/fiche.php b/htdocs/commande/fiche.php
index 10f1bcbc129..bd4e1334c0e 100644
--- a/htdocs/commande/fiche.php
+++ b/htdocs/commande/fiche.php
@@ -272,6 +272,16 @@ if ($_POST['action'] == 'confirm_delete' && $_POST['confirm'] == 'yes')
}
}
+if ($_GET['action'] == 'modif' && $user->rights->commande->creer)
+{
+ /*
+ * Repasse la commande en mode brouillon
+ */
+ $commande = new Commande($db);
+ $commande->fetch($_GET['id']);
+ $commande->reopen($user->id);
+}
+
if ($_POST['action'] == 'builddoc')
{
/*
@@ -1065,6 +1075,15 @@ else
print ''.$langs->trans('Valid').'';
}
}
+
+ // Edit
+ if ($commande->statut == 1)
+ {
+ if ($user->rights->commande->creer)
+ {
+ print ''.$langs->trans('Edit').'';
+ }
+ }
// Build PDF
if ($user->rights->commande->creer)