$mesg='<div class="error">'.$commande->error.'</div>'; } } if ($_POST['action'] == 'setdeliveryaddress' && $user->rights->commande->creer) { $commande = new Commande($db); $commande->fetch($_GET['id']); $commande->set_adresse_livraison($user,$_POST['delivery_address_id']); } if ($_POST['action'] == 'setmode' && $user->rights->commande->creer) { $commande = new Commande($db); $commande->fetch($_GET['id']); $result=$commande->mode_reglement($_POST['mode_reglement_id']); if ($result < 0) dol_print_error($db,$commande->error); } if ($_POST['action'] == 'setconditions' && $user->rights->commande->creer) { $commande = new Commande($db); $commande->fetch($_GET['id']); $result=$commande->cond_reglement($_POST['cond_reglement_id']); if ($result < 0) dol_print_error($db,$commande->error); } $html = new Form($db); $formproduct = new FormProduct($db); $formfile = new FormFile($db);