本文整理汇总了PHP中AccountLine类的典型用法代码示例。如果您正苦于以下问题:PHP AccountLine类的具体用法?PHP AccountLine怎么用?PHP AccountLine使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了AccountLine类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: header
} else {
$error++;
$langs->load("errors");
$mesg = '<div class="error">' . $langs->trans("ErrorPleaseTypeBankTransactionReportName") . '</div>';
}
if (!$error) {
header('Location: ' . DOL_URL_ROOT . '/compta/bank/rappro.php?account=' . $id);
// To avoid to submit twice and allow back
exit;
}
}
/*
* Action suppression ecriture
*/
if ($action == 'del') {
$bankline = new AccountLine($db);
$bankline->fetch($_GET["rowid"]);
$result = $bankline->delete($user);
if ($result < 0) {
dol_print_error($db, $bankline->error);
}
}
// Load bank groups
$sql = "SELECT rowid, label FROM " . MAIN_DB_PREFIX . "bank_categ ORDER BY label";
$resql = $db->query($sql);
$options = "";
if ($resql) {
$var = True;
$num = $db->num_rows($resql);
if ($num > 0) {
$options .= '<option value="0"' . (GETPOST('cat') ? '' : ' selected="true"') . '> </option>';
示例2: delete
/**
* Supprime un paiement ainsi que les lignes qu'il a genere dans comptes
* Si le paiement porte sur un ecriture compte qui est rapprochee, on refuse
* Si le paiement porte sur au moins une facture a "payee", on refuse
*
* @param int $notrigger No trigger
* @return int <0 si ko, >0 si ok
*/
function delete($notrigger = 0)
{
global $conf, $user, $langs;
$bank_line_id = $this->bank_line;
$this->db->begin();
// Verifier si paiement porte pas sur une facture a l'etat payee
// Si c'est le cas, on refuse la suppression
$billsarray = $this->getBillsArray('paye=1');
if (is_array($billsarray)) {
if (count($billsarray)) {
$this->error = "ErrorCantDeletePaymentSharedWithPayedInvoice";
$this->db->rollback();
return -1;
}
} else {
$this->db->rollback();
return -2;
}
// Verifier si paiement ne porte pas sur ecriture bancaire rapprochee
// Si c'est le cas, on refuse le delete
if ($bank_line_id) {
$accline = new AccountLine($this->db, $bank_line_id);
$accline->fetch($bank_line_id);
if ($accline->rappro) {
$this->error = "ErrorCantDeletePaymentReconciliated";
$this->db->rollback();
return -3;
}
}
// Efface la ligne de paiement (dans paiement_facture et paiement)
$sql = 'DELETE FROM ' . MAIN_DB_PREFIX . 'paiementfourn_facturefourn';
$sql .= ' WHERE fk_paiementfourn = ' . $this->id;
$resql = $this->db->query($sql);
if ($resql) {
$sql = 'DELETE FROM ' . MAIN_DB_PREFIX . 'paiementfourn';
$sql .= ' WHERE rowid = ' . $this->id;
$result = $this->db->query($sql);
if (!$result) {
$this->error = $this->db->error();
$this->db->rollback();
return -3;
}
// Supprimer l'ecriture bancaire si paiement lie a ecriture
if ($bank_line_id) {
$accline = new AccountLine($this->db);
$result = $accline->fetch($bank_line_id);
if ($result > 0) {
$result = $accline->delete();
}
if ($result < 0) {
$this->error = $accline->error;
$this->db->rollback();
return -4;
}
}
if (!$notrigger) {
// Appel des triggers
$result = $this->call_trigger('PAYMENT_SUPPLIER_DELETE', $user);
if ($result < 0) {
$this->db->rollback();
return -1;
}
// Fin appel triggers
}
$this->db->commit();
return 1;
} else {
$this->error = $this->db->error;
$this->db->rollback();
return -5;
}
}
示例3: restrictedArea
if ($user->societe_id) {
$socid = $user->societe_id;
}
$result = restrictedArea($user, 'banque', $fieldvalue, 'bank_account', '', '', $fieldtype);
if (!$user->rights->banque->lire && !$user->rights->banque->consolidate) {
accessforbidden();
}
/*
* Actions
*/
if ($user->rights->banque->consolidate && $action == 'dvnext') {
$al = new AccountLine($db);
$al->datev_next($_GET["rowid"]);
}
if ($user->rights->banque->consolidate && $action == 'dvprev') {
$al = new AccountLine($db);
$al->datev_previous($_GET["rowid"]);
}
if ($action == 'confirm_delete_categ' && $confirm == "yes" && $user->rights->banque->modifier) {
$sql = "DELETE FROM " . MAIN_DB_PREFIX . "bank_class WHERE lineid = " . $rowid . " AND fk_categ = " . GETPOST("cat1");
if (!$db->query($sql)) {
dol_print_error($db);
}
}
if ($user->rights->banque->modifier && $action == 'class') {
$sql = "DELETE FROM " . MAIN_DB_PREFIX . "bank_class WHERE lineid = " . $rowid . " AND fk_categ = " . $_POST["cat1"];
if (!$db->query($sql)) {
dol_print_error($db);
}
$sql = "INSERT INTO " . MAIN_DB_PREFIX . "bank_class (lineid, fk_categ) VALUES (" . $rowid . ", " . $_POST["cat1"] . ")";
if (!$db->query($sql)) {
示例4: delete
/**
* Supprime un paiement ainsi que les lignes qu'il a genere dans comptes
* Si le paiement porte sur un ecriture compte qui est rapprochee, on refuse
* Si le paiement porte sur au moins une facture a "payee", on refuse
* @return int <0 si ko, >0 si ok
*/
function delete($notrigger=0)
{
global $conf, $user, $langs;
$error=0;
$bank_line_id = $this->bank_line;
$this->db->begin();
// Verifier si paiement porte pas sur une facture classee
// Si c'est le cas, on refuse la suppression
$billsarray=$this->getBillsArray('fk_statut > 1');
if (is_array($billsarray))
{
if (sizeof($billsarray))
{
$this->error="ErrorDeletePaymentLinkedToAClosedInvoiceNotPossible";
$this->db->rollback();
return -1;
}
}
else
{
$this->db->rollback();
return -2;
}
// Delete bank urls. If payment if on a conciliated line, return error.
if ($bank_line_id)
{
$accline = new AccountLine($this->db);
$accline->fetch($bank_line_id);
$result=$accline->delete_urls($user);
if ($result < 0)
{
$this->error=$accline->error;
$this->db->rollback();
return -3;
}
}
// Delete payment (into paiement_facture and paiement)
$sql = 'DELETE FROM '.MAIN_DB_PREFIX.'paiement_facture';
$sql.= ' WHERE fk_paiement = '.$this->id;
$result = $this->db->query($sql);
if ($result)
{
$sql = 'DELETE FROM '.MAIN_DB_PREFIX.'paiement';
$sql.= ' WHERE rowid = '.$this->id;
$result = $this->db->query($sql);
if (! $result)
{
$this->error=$this->db->lasterror();
$this->db->rollback();
return -3;
}
// Supprimer l'ecriture bancaire si paiement lie a ecriture
if ($bank_line_id)
{
$accline = new AccountLine($this->db);
$accline->fetch($bank_line_id);
$result=$accline->delete();
if ($result < 0)
{
$this->error=$accline->error;
$this->db->rollback();
return -4;
}
}
if (! $notrigger)
{
// Appel des triggers
include_once(DOL_DOCUMENT_ROOT . "/core/class/interfaces.class.php");
$interface=new Interfaces($this->db);
$result=$interface->run_triggers('PAYMENT_DELETE',$this,$user,$langs,$conf);
if ($result < 0) { $error++; $this->errors=$interface->errors; }
// Fin appel triggers
}
$this->db->commit();
return 1;
}
else
{
$this->error=$this->db->error;
$this->db->rollback();
return -5;
}
}
示例5: dol_print_date
print '<td width="25%">' . $langs->trans("Ref") . '</td><td colspan="3">';
print $vatpayment->ref;
print '</td></tr>';
// Label
print '<tr><td>' . $langs->trans("Label") . '</td><td>' . $vatpayment->label . '</td></tr>';
print "<tr>";
print '<td>' . $langs->trans("DatePayment") . '</td><td colspan="3">';
print dol_print_date($vatpayment->datep, 'day');
print '</td></tr>';
print '<tr><td>' . $langs->trans("DateValue") . '</td><td colspan="3">';
print dol_print_date($vatpayment->datev, 'day');
print '</td></tr>';
print '<tr><td>' . $langs->trans("Amount") . '</td><td colspan="3">' . price($vatpayment->amount) . '</td></tr>';
if (!empty($conf->banque->enabled)) {
if ($vatpayment->fk_account > 0) {
$bankline = new AccountLine($db);
$bankline->fetch($vatpayment->fk_bank);
print '<tr>';
print '<td>' . $langs->trans('BankTransactionLine') . '</td>';
print '<td colspan="3">';
print $bankline->getNomUrl(1, 0, 'showall');
print '</td>';
print '</tr>';
}
}
// Other attributes
$parameters = array('colspan' => ' colspan="3"');
$reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $vatpayment, $action);
// Note that $action and $object may have been modified by hook
print '</table>';
print '</div>';
示例6: Paiement
$i++;
}
print "</table>";
print '<div class="tabsAction">';
if ($user->rights->banque->cheque) {
print '<input type="submit" class="button" value="' . $langs->trans('NewCheckDepositOn', $account_label) . '">';
} else {
print '<a class="butActionRefused" href="#" title="' . $langs->trans("NotEnoughPermissions") . '">' . $langs->trans('NewCheckDepositOn', $account_label) . '</a>';
}
print '</div><br>';
print '</form>';
}
} else {
$linkback = '<a href="' . $_SERVER["PHP_SELF"] . '?leftmenu=customers_bills_checks&action=new">' . $langs->trans("BackToList") . '</a>';
$paymentstatic = new Paiement($db);
$accountlinestatic = new AccountLine($db);
$accountstatic = new Account($db);
$accountstatic->id = $object->account_id;
$accountstatic->label = $object->account_label;
print '<table class="border" width="100%">';
print '<tr><td width=20%>';
print '<table class="nobordernopadding" width="100%"><tr><td>';
print $langs->trans('Ref');
print '</td>';
if ($action != 'editref') {
print '<td align="right"><a href="' . $_SERVER["PHP_SELF"] . '?action=editref&id=' . $object->id . '">' . img_edit($langs->trans('SetRef'), 1) . '</a></td>';
}
print '</tr></table>';
print '</td><td colspan="2">';
if ($action == 'editref') {
print '<form name="setdate" action="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '" method="post">';
示例7: delete
/**
* Delete a subscription
*
* @param User $user User that delete
* @return int <0 if KO, 0 if not found, >0 if OK
*/
function delete($user)
{
// It subscription is linked to a bank transaction, we get it
if ($this->fk_bank) {
require_once DOL_DOCUMENT_ROOT . '/compta/bank/class/account.class.php';
$accountline = new AccountLine($this->db);
$result = $accountline->fetch($this->fk_bank);
}
$this->db->begin();
$sql = "DELETE FROM " . MAIN_DB_PREFIX . "cotisation WHERE rowid = " . $this->id;
dol_syslog(get_class($this) . "::delete sql=" . $sql);
$resql = $this->db->query($sql);
if ($resql) {
$num = $this->db->affected_rows($resql);
if ($num) {
require_once DOL_DOCUMENT_ROOT . '/adherents/class/adherent.class.php';
$member = new Adherent($this->db);
$result = $member->fetch($this->fk_adherent);
$result = $member->update_end_date($user);
if ($accountline->rowid > 0) {
$result = $accountline->delete($user);
// Return false if refused because line is conciliated
if ($result > 0) {
$this->db->commit();
return 1;
} else {
$this->error = $accountline->error;
$this->db->rollback();
return -1;
}
} else {
$this->db->commit();
return 1;
}
} else {
$this->db->commit();
return 0;
}
} else {
$this->error = $this->db->lasterror();
$this->db->rollback();
return -1;
}
}
示例8: require
require("./pre.inc.php");
require_once(DOL_DOCUMENT_ROOT."/lib/functions2.lib.php");
require_once(DOL_DOCUMENT_ROOT."/compta/paiement/class/paiement.class.php");
$langs->load("banks");
$langs->load("companies");
/*
* View
*/
llxHeader();
$line = new AccountLine($db);
$line->fetch($_GET["rowid"]);
$line->info($_GET["rowid"]);
$h=0;
$head[$h][0] = DOL_URL_ROOT.'/compta/bank/ligne.php?rowid='.$_GET["rowid"];
$head[$h][1] = $langs->trans("Card");
$h++;
$head[$h][0] = DOL_URL_ROOT.'/compta/bank/info.php?rowid='.$_GET["rowid"];
$head[$h][1] = $langs->trans("Info");
$hselected = $h;
$h++;
示例9: delete
/**
* Delete a social contribution
*
* @param User $user Object user making delete
* @return int <0 if KO, >0 if OK
*/
function delete($user)
{
$error = 0;
$this->db->begin();
// Get bank transaction lines for this social contributions
include_once DOL_DOCUMENT_ROOT . '/compta/bank/class/account.class.php';
$account = new Account($this->db);
$lines_url = $account->get_url('', $this->id, 'sc');
// Delete bank urls
foreach ($lines_url as $line_url) {
if (!$error) {
$accountline = new AccountLine($this->db);
$accountline->fetch($line_url['fk_bank']);
$result = $accountline->delete_urls($user);
if ($result < 0) {
$error++;
}
}
}
// Delete payments
if (!$error) {
$sql = "DELETE FROM " . MAIN_DB_PREFIX . "paiementcharge where fk_charge='" . $this->id . "'";
dol_syslog(get_class($this) . "::delete", LOG_DEBUG);
$resql = $this->db->query($sql);
if (!$resql) {
$error++;
$this->error = $this->db->lasterror();
}
}
if (!$error) {
$sql = "DELETE FROM " . MAIN_DB_PREFIX . "chargesociales where rowid='" . $this->id . "'";
dol_syslog(get_class($this) . "::delete", LOG_DEBUG);
$resql = $this->db->query($sql);
if (!$resql) {
$error++;
$this->error = $this->db->lasterror();
}
}
if (!$error) {
$this->db->commit();
return 1;
} else {
$this->db->rollback();
return -1;
}
}
示例10: dol_print_date
print $form->showrefnav($paiement, 'id', '', 1, 'rowid', 'id');
print '</td></tr>';
// Date
print '<tr><td valign="top" width="120">' . $langs->trans('Date') . '</td><td colspan="3">' . dol_print_date($paiement->datep, 'day') . '</td></tr>';
// Mode
print '<tr><td valign="top">' . $langs->trans('Mode') . '</td><td colspan="3">' . $langs->trans("PaymentType" . $paiement->type_code) . '</td></tr>';
// Numero
print '<tr><td valign="top">' . $langs->trans('Numero') . '</td><td colspan="3">' . $paiement->num_paiement . '</td></tr>';
// Montant
print '<tr><td valign="top">' . $langs->trans('Amount') . '</td><td colspan="3">' . price($paiement->amount) . ' ' . $langs->trans('Currency' . $conf->currency) . '</td></tr>';
// Note
print '<tr><td valign="top">' . $langs->trans('Note') . '</td><td colspan="3">' . nl2br($paiement->note) . '</td></tr>';
// Bank account
if ($conf->banque->enabled) {
if ($paiement->bank_account) {
$bankline = new AccountLine($db);
$bankline->fetch($paiement->bank_line);
print '<tr>';
print '<td>' . $langs->trans('BankTransactionLine') . '</td>';
print '<td colspan="3">';
print $bankline->getNomUrl(1, 0, 'showall');
print '</td>';
print '</tr>';
}
}
print '</table>';
/*
* List of social contributions payed
*/
$disable_delete = 0;
$sql = 'SELECT f.rowid as scid, f.libelle, f.paye, f.amount as sc_amount, pf.amount, pc.libelle as sc_type';
示例11: GETPOST
}
//if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN','1'); // Required to knwo date format for dol_print_date
require '../../main.inc.php';
require_once DOL_DOCUMENT_ROOT . '/core/lib/admin.lib.php';
require_once DOL_DOCUMENT_ROOT . '/compta/bank/class/account.class.php';
$action = GETPOST('action');
/*
* View
*/
// Ajout directives pour resoudre bug IE
//header('Cache-Control: Public, must-revalidate');
//header('Pragma: public');
//top_htmlhead("", "", 1); // Replaced with top_httphead. An ajax page does not need html header.
top_httphead();
//print '<!-- Ajax page called with url '.$_SERVER["PHP_SELF"].'?'.$_SERVER["QUERY_STRING"].' -->'."\n";
if (($user->rights->banque->modifier || $user->rights->banque->consolidate) && $action == 'dvnext') {
// Increase date
$al = new AccountLine($db);
$al->datev_next($_GET["rowid"]);
$al->fetch($_GET["rowid"]);
print '<span>' . dol_print_date($db->jdate($al->datev), "day") . '</span>';
exit;
}
if (($user->rights->banque->modifier || $user->rights->banque->consolidate) && $action == 'dvprev') {
// Decrease date
$al = new AccountLine($db);
$al->datev_previous($_GET["rowid"]);
$al->fetch($_GET["rowid"]);
print '<span>' . dol_print_date($db->jdate($al->datev), "day") . '</span>';
exit;
}
示例12: dol_print_date
print '<td>' . $langs->trans("DateSubscription") . '</td><td class="valeur" colspan="3">' . dol_print_date($subscription->dateh, 'day') . '</td>';
print '</tr>';
// Date end subscription
print '<tr>';
print '<td>' . $langs->trans("DateEndSubscription") . '</td><td class="valeur" colspan="3">' . dol_print_date($subscription->datef, 'day') . '</td>';
print '</tr>';
// Amount
print '<tr><td>' . $langs->trans("Amount") . '</td><td class="valeur" colspan="3">' . price($subscription->amount) . '</td></tr>';
// Amount
print '<tr><td>' . $langs->trans("Label") . '</td><td class="valeur" colspan="3">' . $subscription->note . '</td></tr>';
// Bank line
if (!empty($conf->banque->enabled)) {
if ($conf->global->ADHERENT_BANK_USE || $subscription->fk_bank) {
print '<tr><td>' . $langs->trans("BankTransactionLine") . '</td><td class="valeur" colspan="3">';
if ($subscription->fk_bank) {
$bankline = new AccountLine($db);
$result = $bankline->fetch($subscription->fk_bank);
print $bankline->getNomUrl(1, 0, 'showall');
} else {
print $langs->trans("NoneF");
}
print '</td></tr>';
}
}
print "</table>\n";
print '</form>';
dol_fiche_end();
/*
* Barre d'actions
*
*/
示例13: rejectCheck
/**
* Check return management
* Reopen linked invoices and create a new negative payment.
*
* @param int $bank_id Id of bank transaction line concerned
* @param date $rejection_date Date to use on the negative payment
* @return int Id of negative payment line created
*/
function rejectCheck($bank_id, $rejection_date)
{
global $db, $user;
$payment = new Paiement($db);
$payment->fetch(0, 0, $bank_id);
$bankline = new AccountLine($db);
$bankline->fetch($bank_id);
/* Conciliation is allowed because when check is returned, a new line is created onto bank transaction log.
if ($bankline->rappro)
{
$this->error='ActionRefusedLineAlreadyConciliated';
return -1;
}*/
$this->db->begin();
// Not conciliated, we can delete it
//$bankline->delete($user); // We delete
$bankaccount = $payment->fk_account;
// Get invoices list to reopen them
$sql = 'SELECT pf.fk_facture, pf.amount';
$sql .= ' FROM ' . MAIN_DB_PREFIX . 'paiement_facture as pf';
$sql .= ' WHERE pf.fk_paiement = ' . $payment->id;
$resql = $db->query($sql);
if ($resql) {
$rejectedPayment = new Paiement($db);
$rejectedPayment->amounts = array();
$rejectedPayment->datepaye = $rejection_date;
$rejectedPayment->paiementid = dol_getIdFromCode($this->db, 'CHQ', 'c_paiement');
$rejectedPayment->num_paiement = $payment->numero;
while ($obj = $db->fetch_object($resql)) {
$invoice = new Facture($db);
$invoice->fetch($obj->fk_facture);
$invoice->set_unpaid($user);
$rejectedPayment->amounts[$obj->fk_facture] = price2num($obj->amount) * -1;
}
$result = $rejectedPayment->create($user);
if ($result > 0) {
// We created a negative payment, we also add the line as bank transaction
$result = $rejectedPayment->addPaymentToBank($user, 'payment', '(CheckRejected)', $bankaccount, '', '');
if ($result > 0) {
$result = $payment->reject();
if ($result > 0) {
$this->db->commit();
return $rejectedPayment->id;
} else {
$this->db->rollback();
return -1;
}
} else {
$this->error = $rejectedPayment->error;
$this->errors = $rejectedPayment->errors;
$this->db->rollback();
return -1;
}
} else {
$this->error = $rejectedPayment->error;
$this->errors = $rejectedPayment->errors;
$this->db->rollback();
return -1;
}
} else {
$this->error = $this->db->lasterror();
$this->db->rollback();
return -1;
}
}
示例14: Account
$sql.= " ORDER BY dateo ASC";
$result = $db->query($sql);
if ($result)
{
$i = 0; $total = 0;
if ($db->num_rows($result))
{
$objp = $db->fetch_object($result);
$total = $total + $objp->amount;
$acct=new Account($db);
$acct->fetch($objp->fk_account);
$account = $acct->id;
$bankline = new AccountLine($db);
$bankline->fetch($rowid,$ref);
$links=$acct->get_url($rowid);
$bankline->load_previous_next_ref('','rowid');
// Confirmations
if ($action == 'delete_categ')
{
$ret=$html->form_confirm("ligne.php?rowid=".$rowid."&cat1=".GETPOST("fk_categ")."&orig_account=".$orig_account, $langs->trans("RemoveFromRubrique"), $langs->trans("RemoveFromRubriqueConfirm"), "confirm_delete_categ", '', 'yes', 1);
if ($ret == 'html') print '<br>';
}
print '<form name="update" method="post" action="ligne.php?rowid='.$rowid.'">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<input type="hidden" name="action" value="update">';
示例15: delete
/**
* Supprime un paiement ainsi que les lignes qu'il a genere dans comptes
* Si le paiement porte sur un ecriture compte qui est rapprochee, on refuse
* Si le paiement porte sur au moins une facture a "payee", on refuse
*
* @param int $notrigger No trigger
* @return int <0 si ko, >0 si ok
*/
function delete($notrigger = 0)
{
global $conf, $user, $langs;
$error = 0;
$bank_line_id = $this->bank_line;
$this->db->begin();
// Verifier si paiement porte pas sur une facture classee
// Si c'est le cas, on refuse la suppression
$billsarray = $this->getBillsArray('fk_statut > 1');
if (is_array($billsarray)) {
if (count($billsarray)) {
$this->error = "ErrorDeletePaymentLinkedToAClosedInvoiceNotPossible";
$this->db->rollback();
return -1;
}
} else {
$this->db->rollback();
return -2;
}
$accline = new AccountLine($this->db);
// Delete bank urls. If payment is on a conciliated line, return error.
if ($bank_line_id) {
$result = $accline->fetch($bank_line_id);
if ($result == 0) {
$accline->rowid = $bank_line_id;
}
// If not found, we set artificially rowid to allow delete of llx_bank_url
$result = $accline->delete_urls($user);
if ($result < 0) {
$this->error = $accline->error;
$this->db->rollback();
return -3;
}
}
// Delete payment (into paiement_facture and paiement)
$sql = 'DELETE FROM ' . MAIN_DB_PREFIX . 'paiement_facture';
$sql .= ' WHERE fk_paiement = ' . $this->id;
dol_syslog($sql);
$result = $this->db->query($sql);
if ($result) {
$sql = 'DELETE FROM ' . MAIN_DB_PREFIX . 'paiement';
$sql .= ' WHERE rowid = ' . $this->id;
dol_syslog($sql);
$result = $this->db->query($sql);
if (!$result) {
$this->error = $this->db->lasterror();
$this->db->rollback();
return -3;
}
// Supprimer l'ecriture bancaire si paiement lie a ecriture
if ($bank_line_id) {
$result = $accline->delete($user);
if ($result < 0) {
$this->error = $accline->error;
$this->db->rollback();
return -4;
}
}
if (!$notrigger) {
// Appel des triggers
$result = $this->call_trigger('PAYMENT_DELETE', $user);
if ($result < 0) {
$this->db->rollback();
return -1;
}
// Fin appel triggers
}
$this->db->commit();
return 1;
} else {
$this->error = $this->db->error;
$this->db->rollback();
return -5;
}
}