本文整理汇总了PHP中FactureFournisseur::delete方法的典型用法代码示例。如果您正苦于以下问题:PHP FactureFournisseur::delete方法的具体用法?PHP FactureFournisseur::delete怎么用?PHP FactureFournisseur::delete使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FactureFournisseur
的用法示例。
在下文中一共展示了FactureFournisseur::delete方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: setEventMessage
$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>';
}
} elseif ($action == 'confirm_delete_line' && $confirm == 'yes' && $user->rights->fournisseur->facture->creer) {
$object->fetch($id);
$ret = $object->deleteline(GETPOST('lineid'));
if ($ret > 0) {
header('Location: ' . $_SERVER["PHP_SELF"] . '?id=' . $id);
exit;
} else {
$mesg = '<div class="error">' . $object->error . '</div>';
/* Fix bug 1485 : Reset action to avoid asking again confirmation on failure */
示例2: testFactureFournisseurDelete
/**
* testFactureFournisseurDelete
*
* @param int $id Id of supplier invoice
* @return void
*
* @depends testFactureFournisseurOther
* The depends says test is run only if previous is ok
*/
public function testFactureFournisseurDelete($id)
{
global $conf, $user, $langs, $db;
$conf = $this->savconf;
$user = $this->savuser;
$langs = $this->savlangs;
$db = $this->savdb;
$localobject = new FactureFournisseur($this->savdb);
$result = $localobject->fetch($id);
$result = $localobject->delete($id);
print __METHOD__ . " id=" . $id . " result=" . $result . "\n";
$this->assertLessThan($result, 0);
return $result;
}
示例3: FactureFournisseur
$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)
{
Header('Location: index.php');
exit;
}
else
{
$mesg='<div class="error">'.$facturefourn->error.'</div>';
}
}
}
if ($_REQUEST['action'] == 'confirm_deleteproductline' && $_REQUEST['confirm'] == 'yes')
{
if ($user->rights->fournisseur->facture->creer)