$commande = new Commande($db); $commande->fetch($id); $result = $commande->set_date_livraison($user, $datelivraison); if ($result < 0) { $mesg = '<div class="error">' . $commande->error . '</div>'; } } if ($action == 'setdeliveryaddress' && $user->rights->commande->creer) { $commande = new Commande($db); $commande->fetch($id); $commande->setDeliveryAddress(GETPOST('delivery_address_id', 'int')); } if ($action == 'setmode' && $user->rights->commande->creer) { $commande = new Commande($db); $commande->fetch($id); $result = $commande->setPaymentMethods(GETPOST('mode_reglement_id', 'int')); if ($result < 0) { dol_print_error($db, $commande->error); } } if ($action == 'setconditions' && $user->rights->commande->creer) { $commande = new Commande($db); $commande->fetch($id); $result = $commande->setPaymentTerms(GETPOST('cond_reglement_id', 'int')); if ($result < 0) { dol_print_error($db, $commande->error); } } /* * View */