当前位置: 首页>>代码示例>>PHP>>正文


PHP FactureFournisseur::delete方法代码示例

本文整理汇总了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 */
开发者ID:LionSystemsSolutions,项目名称:El-Canelo-ERP,代码行数:31,代码来源:fiche.php

示例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;
 }
开发者ID:Samara94,项目名称:dolibarr,代码行数:23,代码来源:FactureFournisseurTest.php

示例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)
开发者ID:remyyounes,项目名称:dolibarr,代码行数:31,代码来源:fiche.php


注:本文中的FactureFournisseur::delete方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。