本文整理汇总了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)
{