} } if ($_REQUEST['action'] == 'confirm_paid' && $_REQUEST['confirm'] == 'yes' && $user->rights->fournisseur->facture->creer) { $facturefourn=new FactureFournisseur($db); $facturefourn->fetch($_GET['facid']); $result=$facturefourn->set_paid($user); } // Set supplier ref if (($_POST['action'] == 'setref_supplier' || $_POST['action'] == 'set_ref_supplier') && $user->rights->fournisseur->facture->creer) { $facturefourn = new FactureFournisseur($db); $facturefourn->fetch($facid); $result=$facturefourn->set_ref_supplier($user, $_POST['ref_supplier']); $_GET['facid']=$facid; } // Set supplier ref if (($_POST['action'] == 'setlabel') && $user->rights->fournisseur->facture->creer) { $facturefourn = new FactureFournisseur($db); $facturefourn->fetch($facid); $facturefourn->label=$_POST['label']; $result=$facturefourn->update($user); if ($result < 0) dol_print_error($db); $_GET['facid']=$facid; } if($_GET['action'] == 'deletepaiement')
} } elseif ($action == 'confirm_deleteline' && $confirm == 'yes' && $user->rights->fournisseur->facture->creer) { $object->fetch($id); $ret = $object->deleteline(GETPOST('lineid')); if ($ret > 0) { Header('Location: ' . $_SERVER["PHP_SELF"] . '?id=' . $id); exit; } else { $mesg = '<div class="error">' . $object->error . '</div>'; } } elseif ($action == 'confirm_paid' && $confirm == 'yes' && $user->rights->fournisseur->facture->creer) { $object->fetch($id); $result = $object->set_paid($user); } elseif ($action == 'setfacnumber' && $user->rights->fournisseur->facture->creer) { $object->fetch($id); $result = $object->set_ref_supplier($user, GETPOST('facnumber')); } elseif ($action == 'setlabel' && $user->rights->fournisseur->facture->creer) { $object->fetch($id); $object->label = $_POST['label']; $result = $object->update($user); if ($result < 0) { dol_print_error($db); } } elseif ($action == 'setdatef' && $user->rights->fournisseur->facture->creer) { $object->fetch($id); $object->date = dol_mktime(12, 0, 0, $_POST['datefmonth'], $_POST['datefday'], $_POST['datefyear']); if ($object->date_echeance < $object->date) { $object->date_echeance = $object->date; } $result = $object->update($user); if ($result < 0) {