本文整理汇总了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'];
}
}
}