本文整理匯總了PHP中FactureFournisseur::validate方法的典型用法代碼示例。如果您正苦於以下問題:PHP FactureFournisseur::validate方法的具體用法?PHP FactureFournisseur::validate怎麽用?PHP FactureFournisseur::validate使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類FactureFournisseur
的用法示例。
在下文中一共展示了FactureFournisseur::validate方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: setEventMessage
if (empty($conf->global->STOCK_SUPPORTS_SERVICES)) {
$qualified_for_stock_change = $object->hasProductsOrServices(2);
} else {
$qualified_for_stock_change = $object->hasProductsOrServices(1);
}
// Check parameters
if (!empty($conf->stock->enabled) && !empty($conf->global->STOCK_CALCULATE_ON_SUPPLIER_BILL) && $qualified_for_stock_change) {
$langs->load("stocks");
if (!$idwarehouse || $idwarehouse == -1) {
$error++;
$errors[] = $langs->trans('ErrorFieldRequired', $langs->transnoentitiesnoconv("Warehouse"));
$action = '';
}
}
if (!$error) {
$result = $object->validate($user, '', $idwarehouse);
if ($result < 0) {
setEventMessage($object->error, 'errors');
setEventMessage($object->errors, 'errors');
}
}
} elseif ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->fournisseur->facture->supprimer) {
$object->fetch($id);
$object->fetch_thirdparty();
$result = $object->delete($id);
if ($result > 0) {
header('Location: list.php');
exit;
} else {
$mesg = '<div class="error">' . $object->error . '</div>';
}
示例2: FactureFournisseur
}
else
{
$langs->load("errors");
$mesg='<div class="error">'.$langs->trans($object->error).'</div>';
$_GET['action']='';
$_GET['id']=$_REQUEST['id'];
}
}
}
if ($_REQUEST['action'] == 'confirm_valid' && $_REQUEST['confirm'] == 'yes' && $user->rights->fournisseur->facture->valider)
{
$facturefourn=new FactureFournisseur($db);
$facturefourn->fetch($_GET['facid']);
$result = $facturefourn->validate($user);
if ($result < 0)
{
$mesg='<div class="error">'.$facturefourn->error.'</div>';
}
}
if ($_REQUEST['action'] == 'confirm_delete' && $_REQUEST['confirm'] == 'yes')
{
if ($user->rights->fournisseur->facture->supprimer )
{
$facturefourn = new FactureFournisseur($db);
$factfournid = $_GET['facid'];
$result=$facturefourn->delete($factfournid);
if ($result > 0)
{