} $result = restrictedArea($user, 'commande_fournisseur', $id, ''); $mesg = ''; $object = new CommandeFournisseur($db); /* * Actions */ // conditions de reglement if ($action == 'setconditions' && $user->rights->fournisseur->commande->creer) { $object->fetch($id); $result = $object->cond_reglement($_POST['cond_reglement_id']); } // mode de reglement if ($action == 'setmode' && $user->rights->fournisseur->commande->creer) { $object->fetch($id); $result = $object->mode_reglement($_POST['mode_reglement_id']); } // Set project if ($action == 'classin') { $object->fetch($id); $object->setProject($projectid); } if ($action == 'setremisepercent' && $user->rights->fournisseur->commande->creer) { $object->fetch($id); $result = $object->set_remise($user, $_POST['remise_percent']); } if ($action == 'reopen' && $user->rights->fournisseur->commande->approuver) { $order = new CommandeFournisseur($db); $result = $order->fetch($id); if ($order->statut == 5 || $order->statut == 6 || $order->statut == 7 || $order->statut == 9) { if ($order->statut == 5) {