ajout possibilitée d'éditer une commande validée

This commit is contained in:
Regis Houssin 2006-04-29 13:30:21 +00:00
parent 777ddfdcdf
commit 4e0505a53e

View File

@ -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')
{
/*
@ -1066,6 +1076,15 @@ else
}
}
// Edit
if ($commande->statut == 1)
{
if ($user->rights->commande->creer)
{
print '<a class="butAction" href="fiche?id='.$commande->id.'&amp;action=modif">'.$langs->trans('Edit').'</a>';
}
}
// Build PDF
if ($user->rights->commande->creer)
{