本文整理匯總了PHP中FactureFournisseur::update方法的典型用法代碼示例。如果您正苦於以下問題:PHP FactureFournisseur::update方法的具體用法?PHP FactureFournisseur::update怎麽用?PHP FactureFournisseur::update使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類FactureFournisseur
的用法示例。
在下文中一共展示了FactureFournisseur::update方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: restrictedArea
$socid = $user->societe_id;
}
$result = restrictedArea($user, 'fournisseur', $id, 'facture_fourn', 'facture');
$object = new FactureFournisseur($db);
$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
// Set label
if ($action == 'setlabel' && $user->rights->fournisseur->facture->creer) {
$object->label = $_POST['label'];
$result = $object->update($user);
if ($result < 0) {
dol_print_error($db);
}
}
/*
* View
*/
$form = new Form($db);
llxHeader();
if ($object->id > 0) {
$object->fetch_thirdparty();
$head = facturefourn_prepare_head($object);
$titre = $langs->trans('SupplierInvoice');
dol_fiche_head($head, 'note', $titre, 0, 'bill');
print '<table class="border" width="100%">';
示例2: FactureFournisseur
// Set supplier ref
if (($_POST['action'] == 'setref_supplier' || $_POST['action'] == 'set_ref_supplier') && $user->rights->fournisseur->facture->creer)
{
$facturefourn = new FactureFournisseur($db);
$facturefourn->fetch($facid);
$result=$facturefourn->set_ref_supplier($user, $_POST['ref_supplier']);
$_GET['facid']=$facid;
}
// Set supplier ref
if (($_POST['action'] == 'setlabel') && $user->rights->fournisseur->facture->creer)
{
$facturefourn = new FactureFournisseur($db);
$facturefourn->fetch($facid);
$facturefourn->label=$_POST['label'];
$result=$facturefourn->update($user);
if ($result < 0) dol_print_error($db);
$_GET['facid']=$facid;
}
if($_GET['action'] == 'deletepaiement')
{
$facfou = new FactureFournisseur($db);
$facfou->fetch($_GET['facid']);
if ($facfou->statut == 1 && $facfou->paye == 0 && $user->societe_id == 0)
{
$paiementfourn = new PaiementFourn($db);
$paiementfourn->fetch($_GET['paiement_id']);
$paiementfourn->delete();
}
}