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


PHP Paiement::delete方法代码示例

本文整理汇总了PHP中Paiement::delete方法的典型用法代码示例。如果您正苦于以下问题:PHP Paiement::delete方法的具体用法?PHP Paiement::delete怎么用?PHP Paiement::delete使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Paiement的用法示例。


在下文中一共展示了Paiement::delete方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: Paiement

    $sql = 'SELECT p.datep as dp, p.num_paiement, p.rowid, p.fk_bank,';
    $sql .= ' c.code as payment_code, c.libelle as payment_label,';
    $sql .= ' pf.amount,';
    $sql .= ' ba.rowid as baid, ba.ref, ba.label';
    $sql .= ' FROM ' . MAIN_DB_PREFIX . 'c_paiement as c, ' . MAIN_DB_PREFIX . 'paiement_facture as pf, ' . MAIN_DB_PREFIX . 'paiement as p';
    $sql .= ' LEFT JOIN ' . MAIN_DB_PREFIX . 'bank as b ON p.fk_bank = b.rowid';
    $sql .= ' LEFT JOIN ' . MAIN_DB_PREFIX . 'bank_account as ba ON b.fk_account = ba.rowid';
    $sql .= ' WHERE pf.fk_facture = ' . $id . ' AND p.fk_paiement = c.id AND pf.fk_paiement = p.rowid';
    $sql .= ' ORDER BY p.datep, p.tms';
    $result = $db->query($sql);
    if ($result) {
        $num = $db->num_rows($result);
        $objp = $db->fetch_object($result);
        $paiement = new Paiement($db);
        $paiement->fetch($objp->rowid);
        $paiement->delete();
    }
    if ($conf->stock->enabled) {
        $object->delete(0, 0, $conf->global->POS_DEFAULT_WAREHOUSE);
    } else {
        $object->delete();
    }
    $sql = 'delete from ' . MAIN_DB_PREFIX . 'pos_facture where fk_facture=' . $id;
    $db->query($sql);
}
//Get records from database
$sql = "SELECT rowid as iddet, facnumber, datec, fk_user_author as user, total_ttc as price FROM " . MAIN_DB_PREFIX . "facture order by rowid DESC limit 50";
$resql = $db->query($sql);
//Add all records to an array
$rows = array();
while ($row = $db->fetch_array($resql)) {
开发者ID:LionSystemsSolutions,项目名称:El-Canelo-ERP,代码行数:31,代码来源:loadhistory.php

示例2: setEventMessage

if ($action == 'setnote' && $user->rights->facture->paiement) {
    $db->begin();
    $object->fetch($id);
    $result = $object->update_note(GETPOST('note'));
    if ($result > 0) {
        $db->commit();
        $action = '';
    } else {
        setEventMessage($object->error, 'errors');
        $db->rollback();
    }
}
if ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->facture->paiement) {
    $db->begin();
    $object->fetch($id);
    $result = $object->delete();
    if ($result > 0) {
        $db->commit();
        header("Location: list.php");
        exit;
    } else {
        $langs->load("errors");
        setEventMessage($langs->trans($object->error), 'errors');
        $db->rollback();
    }
}
if ($action == 'confirm_valide' && $confirm == 'yes' && $user->rights->facture->paiement) {
    $db->begin();
    $object->fetch($id);
    if ($object->valide() > 0) {
        $db->commit();
开发者ID:ADDAdev,项目名称:Dolibarr,代码行数:31,代码来源:card.php

示例3: Paiement

        $action='';
    }
    else
    {
        $mesg='<div class="error">'.$paiement->error.'</div>';
        $db->rollback();
    }
}

if ($action == 'confirm_delete' && GETPOST('confirm') == 'yes' && $user->rights->facture->paiement)
{
	$db->begin();

	$paiement = new Paiement($db);
	$paiement->fetch($id);
	$result = $paiement->delete();
	if ($result > 0)
	{
        $db->commit();
        Header("Location: liste.php");
        exit;
	}
	else
	{
	    $langs->load("errors");
		$mesg='<div class="error">'.$langs->trans($paiement->error).'</div>';
        $db->rollback();
	}
}

if ($action == 'confirm_valide' && GETPOST('confirm') == 'yes' && $user->rights->facture->paiement)
开发者ID:remyyounes,项目名称:dolibarr,代码行数:31,代码来源:fiche.php


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