$result = $object->setPaymentTerms(GETPOST('cond_reglement_id', 'int')); } else { if ($action == 'setmode' && $user->rights->fournisseur->commande->creer) { $result = $object->setPaymentMethods(GETPOST('mode_reglement_id', 'int')); } } // date de livraison if ($action == 'setdate_livraison' && $user->rights->fournisseur->commande->creer) { $datelivraison = dol_mktime(0, 0, 0, GETPOST('liv_month', 'int'), GETPOST('liv_day', 'int'), GETPOST('liv_year', 'int')); $result = $object->set_date_livraison($user, $datelivraison); if ($result < 0) { setEventMessage($object->error, 'errors'); } } else { if ($action == 'classin' && $user->rights->fournisseur->commande->creer) { $object->setProject($projectid); } else { if ($action == 'setremisepercent' && $user->rights->fournisseur->commande->creer) { $result = $object->set_remise($user, $_POST['remise_percent']); } else { if ($action == 'reopen' && $user->rights->fournisseur->commande->approuver) { if (in_array($object->statut, array(1, 5, 6, 7, 9))) { if ($object->statut == 1) { $newstatus = 0; } else { if ($object->statut == 5) { $newstatus = 4; } else { if ($object->statut == 6) { $newstatus = 2; } else {