本文整理匯總了PHP中FactureFournisseur::createFromClone方法的典型用法代碼示例。如果您正苦於以下問題:PHP FactureFournisseur::createFromClone方法的具體用法?PHP FactureFournisseur::createFromClone怎麽用?PHP FactureFournisseur::createFromClone使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類FactureFournisseur
的用法示例。
在下文中一共展示了FactureFournisseur::createFromClone方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: header
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)) {
示例2: FactureFournisseur
/*
* 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'];
}
}
}