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