if ($id > 0 || !empty($ref)) { $ret = $object->fetch($id, $ref); } $permissionnote = $user->rights->fournisseur->facture->creer; // Used by the include of actions_setnotes.inc.php /* * Actions */ include DOL_DOCUMENT_ROOT . '/core/actions_setnotes.inc.php'; // Must be include, not includ_once // Action clone object if ($action == 'confirm_clone' && $confirm == 'yes') { if (1 == 0 && empty($_REQUEST["clone_content"]) && empty($_REQUEST["clone_receivers"])) { $mesg = '<div class="error">' . $langs->trans("NoCloneOptionsSpecified") . '</div>'; } else { $result = $object->createFromClone($id); if ($result > 0) { header("Location: " . $_SERVER['PHP_SELF'] . '?action=editref_supplier&id=' . $result); exit; } else { $langs->load("errors"); $mesg = '<div class="error">' . $langs->trans($object->error) . '</div>'; $action = ''; } } } elseif ($action == 'confirm_valid' && $confirm == 'yes' && $user->rights->fournisseur->facture->valider) { $idwarehouse = GETPOST('idwarehouse'); $object->fetch($id); $object->fetch_thirdparty(); $qualified_for_stock_change = 0; if (empty($conf->global->STOCK_SUPPORTS_SERVICES)) {
/* * Actions */ // Action clone object if ($_REQUEST["action"] == 'confirm_clone' && $_REQUEST['confirm'] == 'yes') { if (1==0 && empty($_REQUEST["clone_content"]) && empty($_REQUEST["clone_receivers"])) { $mesg='<div class="error">'.$langs->trans("NoCloneOptionsSpecified").'</div>'; } else { $object=new FactureFournisseur($db); $result=$object->createFromClone($_REQUEST['facid']); if ($result > 0) { header("Location: ".$_SERVER['PHP_SELF'].'?facid='.$result); exit; } else { $langs->load("errors"); $mesg='<div class="error">'.$langs->trans($object->error).'</div>'; $_GET['action']=''; $_GET['id']=$_REQUEST['id']; } } }