33require
'../../main.inc.php';
34require_once DOL_DOCUMENT_ROOT.
'/core/lib/bank.lib.php';
35require_once DOL_DOCUMENT_ROOT.
'/societe/class/societe.class.php';
36require_once DOL_DOCUMENT_ROOT.
'/adherents/class/adherent.class.php';
37require_once DOL_DOCUMENT_ROOT.
'/compta/sociales/class/chargesociales.class.php';
38require_once DOL_DOCUMENT_ROOT.
'/compta/paiement/class/paiement.class.php';
39require_once DOL_DOCUMENT_ROOT.
'/compta/tva/class/tva.class.php';
40require_once DOL_DOCUMENT_ROOT.
'/fourn/class/paiementfourn.class.php';
41require_once DOL_DOCUMENT_ROOT.
'/compta/bank/class/account.class.php';
42require_once DOL_DOCUMENT_ROOT.
'/compta/paiement/cheque/class/remisecheque.class.php';
43require_once DOL_DOCUMENT_ROOT.
'/compta/facture/class/facture.class.php';
44require_once DOL_DOCUMENT_ROOT.
'/fourn/class/fournisseur.facture.class.php';
45require_once DOL_DOCUMENT_ROOT.
'/don/class/paymentdonation.class.php';
46require_once DOL_DOCUMENT_ROOT.
'/loan/class/paymentloan.class.php';
47require_once DOL_DOCUMENT_ROOT.
'/compta/bank/class/paymentvarious.class.php';
49require_once DOL_DOCUMENT_ROOT.
'/core/lib/files.lib.php';
50require_once DOL_DOCUMENT_ROOT.
'/core/lib/functions.lib.php';
61$langs->loadLangs(array(
"banks",
"categories",
"companies",
"bills",
"trips",
"donations",
"loan",
"salaries"));
63$action =
GETPOST(
'action',
'aZ09');
66$dvid =
GETPOST(
'dvid',
'alpha');
67$numref =
GETPOST(
'num',
'alpha');
69$brref =
GETPOST(
'brref',
'alpha');
70$oldbankreceipt =
GETPOST(
'oldbankreceipt',
'alpha');
71$newbankreceipt =
GETPOST(
'newbankreceipt',
'alpha');
72$rel =
GETPOST(
"rel",
'alphanohtml');
73$backtopage =
GETPOST(
'backtopage',
'alpha');
76$hookmanager->initHooks(array(
'bankaccountstatement',
'globalcard'));
78if ($user->hasRight(
'banque',
'consolidate') && $action ==
'dvnext' && !empty($dvid)) {
80 $al->datev_next($dvid);
83if ($user->hasRight(
'banque',
'consolidate') && $action ==
'dvprev' && !empty($dvid)) {
85 $al->datev_previous($dvid);
90$sortfield =
GETPOST(
'sortfield',
'aZ09comma');
91$sortorder =
GETPOST(
'sortorder',
'aZ09comma');
93if (empty($page) || $page < 0 ||
GETPOST(
'button_search',
'alpha') ||
GETPOST(
'button_removefilter',
'alpha')) {
97$offset = $limit * $page;
104 $sortfield =
"s.nom";
108if ($id > 0 || !empty($ref)) {
109 $result =
$object->fetch($id, $ref);
115$contextpage =
'banktransactionlist'.(empty(
$object->ref) ?
'' :
'-'.$object->id);
118$fieldid = (!empty($ref) ? $ref :
$id);
119$fieldname = (!empty($ref) ?
'ref' :
'rowid');
121 $socid = $user->socid;
124$result =
restrictedArea($user,
'banque', $fieldid,
'bank_account',
'',
'', $fieldname);
132$sql =
"SELECT b.num_releve as num";
133$sql .=
" FROM ".MAIN_DB_PREFIX.
"bank as b";
134$sql .=
" WHERE b.num_releve < '".$db->escape($numref).
"'";
135$sql .=
" AND b.num_releve <> ''";
136$sql .=
" AND b.fk_account = ".((int)
$object->id);
137$sql .=
" ORDER BY b.num_releve DESC";
138$sql .= $db->plimit(1);
140dol_syslog(
"htdocs/compta/bank/releve.php", LOG_DEBUG);
141$resql = $db->query($sql);
143 $numrows = $db->num_rows($resql);
145 $obj = $db->fetch_object($resql);
146 if ($rel ==
'prev') {
149 $foundprevious = $obj->num;
155$sql =
"SELECT b.num_releve as num";
156$sql .=
" FROM ".MAIN_DB_PREFIX.
"bank as b";
157$sql .=
" WHERE b.num_releve > '".$db->escape($numref).
"'";
158$sql .=
" AND b.fk_account = ".((int)
$object->id);
159$sql .=
" ORDER BY b.num_releve ASC";
160$sql .= $db->plimit(1);
162dol_syslog(
"htdocs/compta/bank/releve.php", LOG_DEBUG);
163$resql = $db->query($sql);
165 $numrows = $db->num_rows($resql);
167 $obj = $db->fetch_object($resql);
168 if ($rel ==
'next') {
171 $foundnext = $obj->num;
177$sql =
"SELECT b.rowid, b.dateo as do, b.datev as dv,";
178$sql .=
" b.amount, b.label, b.rappro, b.num_releve, b.num_chq, b.fk_type,";
179$sql .=
" b.fk_bordereau,";
181$sql .=
" ba.rowid as bankid, ba.ref as bankref, ba.label as banklabel";
182$sql .=
" FROM ".MAIN_DB_PREFIX.
"bank_account as ba,";
183$sql .=
" ".MAIN_DB_PREFIX.
"bank as b";
184$sql .=
' LEFT JOIN '.MAIN_DB_PREFIX.
'bordereau_cheque as bc ON bc.rowid=b.fk_bordereau';
185$sql .=
" WHERE b.num_releve = '".$db->escape($numref).
"'";
187 $sql .=
" OR b.num_releve is null";
189$sql .=
" AND b.fk_account = ".((int)
$object->id);
190$sql .=
" AND b.fk_account = ba.rowid";
191$sql .=
" AND ba.entity IN (".getEntity(
$object->element).
")";
192$sql .= $db->order(
"b.datev, b.datec",
"ASC");
194$sqlrequestforbankline = $sql;
201if ($action ==
'confirm_editbankreceipt' && !empty($oldbankreceipt) && !empty($newbankreceipt) && $user->hasRight(
'banque',
'consolidate')) {
203 $sqltest =
"SELECT b.rowid FROM ".MAIN_DB_PREFIX.
"bank as b, ".MAIN_DB_PREFIX.
"bank_account as ba";
204 $sqltest .=
" WHERE b.fk_account = ba.rowid AND ba.entity = ".((int)
$conf->entity);
205 $sqltest .=
" AND num_releve = '".$db->escape($newbankreceipt).
"'";
206 $sqltest .= $db->plimit(1);
208 $resql = $db->query($sqltest);
210 $obj = $db->fetch_object($resql);
211 if ($obj && $obj->rowid) {
221 $sqlupdate =
"UPDATE ".MAIN_DB_PREFIX.
"bank SET num_releve = '".$db->escape($newbankreceipt).
"'";
222 $sqlupdate .=
" WHERE num_releve = '".$db->escape($oldbankreceipt).
"' AND fk_account = ".((int) $id);
224 $resql = $db->query($sqlupdate);
238$form =
new Form($db);
239$societestatic =
new Societe($db);
244$paymentvatstatic =
new Tva($db);
254if (!empty($contextpage) && $contextpage != $_SERVER[
"PHP_SELF"]) {
255 $param .=
'&contextpage='.$contextpage;
257if ($limit > 0 && $limit !=
$conf->liste_limit) {
258 $param .=
'&limit='.$limit;
261 $param .=
'&id='.urlencode((
string) ($id));
265 $title =
$object->ref.
' - '.$langs->trans(
"AccountStatements");
268 $title = $langs->trans(
"FinancialAccount").
' - '.$langs->trans(
"AccountStatements");
281 $sql =
"SELECT DISTINCT(b.num_releve) as numr";
282 $sql .=
" FROM ".MAIN_DB_PREFIX.
"bank as b";
283 $sql .=
" WHERE b.fk_account = ".((int)
$object->id);
284 $sql .=
" AND b.num_releve IS NOT NULL AND b.num_releve <> '' AND b.num_releve <> '0'";
285 $sql .= $db->order($sortfield, $sortorder);
290 $result = $db->query($sql);
291 $totalnboflines = $db->num_rows($result);
294 $sql .= $db->plimit($limit + 1, $offset);
296 $resql = $db->query($sql);
298 $num = $db->num_rows($resql);
303 print
dol_get_fiche_head($head,
'statement', $langs->trans(
"FinancialAccount"), 0,
'account');
305 $linkback =
'<a href="'.DOL_URL_ROOT.
'/compta/bank/list.php?restore_lastsearch_values=1">'.$langs->trans(
"BackToList").
'</a>';
309 dol_banner_tab($object,
'ref', $linkback, 1,
'ref',
'ref', $morehtmlref,
'', 0,
'',
'', 1);
345 $arrayofmassactions = array(
352 $massactionbutton = $form->selectMassAction(
'', $arrayofmassactions);
355 if ($action !=
'addline' && $action !=
'reconcile') {
356 $morehtml .= $buttonreconcile;
359 print
'<form name="aaa" action="'.$_SERVER[
"PHP_SELF"].
'" method="POST">';
360 print
'<input type="hidden" name="token" value="'.newToken().
'">';
361 print
'<input type="hidden" name="action" value="confirm_editbankreceipt">';
362 print
'<input type="hidden" name="backtopage" value="'.$backtopage.
'">';
363 print
'<input type="hidden" name="account" value="'.$object->id.
'">';
364 print
'<input type="hidden" name="page" value="'.$page.
'">';
366 $param =
"&account=".$object->id.($limit ?
'&limit='.$limit :
'');
367 print_barre_liste($langs->trans(
"AccountStatements"), $page, $_SERVER[
"PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton.$morehtml, $num, $totalnboflines,
'', 0,
'',
'', $limit, 0, 0, 1);
369 print
'<table class="noborder centpercent">';
370 print
'<tr class="liste_titre">';
371 print
'<td>'.$langs->trans(
"Ref").
'</td>';
372 print
'<td class="right">'.$langs->trans(
"InitialBankBalance").
'</td>';
373 print
'<td class="right">'.$langs->trans(
"EndBankBalance").
'</td>';
377 $balancestart = array();
380 $imaxinloop = ($limit ? min($num, $limit) : $num);
381 while ($i < $imaxinloop) {
382 $objp = $db->fetch_object($resql);
384 print
'<tr class="oddeven">';
386 if ($action !=
'editbankreceipt' || $objp->numr != $brref) {
387 print
'<a href="releve.php?num='.$objp->numr.
'&account='.
$object->id.
'">'.$objp->numr.
'</a>';
389 print
'<input type="hidden" name="oldbankreceipt" value="'.$objp->numr.
'">';
390 print
'<input type="text" name="newbankreceipt" value="'.$objp->numr.
'">';
391 print
'<input type="submit" class="button smallpaddingimp" name="actionnewbankreceipt" value="'.$langs->trans(
"Save").
'">';
392 print
'<input type="submit" class="button button-cancel smallpaddingimp" name="cancel" value="'.$langs->trans(
"Cancel").
'">';
397 $sql =
"SELECT sum(b.amount) as amount";
398 $sql .=
" FROM ".MAIN_DB_PREFIX.
"bank as b";
399 $sql .=
" WHERE b.num_releve < '".$db->escape($objp->numr).
"'";
400 $sql .=
" AND b.num_releve <> ''";
401 $sql .=
" AND b.fk_account = ".((int)
$object->id);
402 $resqlstart = $db->query($sql);
404 $obj = $db->fetch_object($resqlstart);
405 $balancestart[$objp->numr] = $obj->amount;
406 $db->free($resqlstart);
408 print
'<td class="right"><span class="amount">'.price($balancestart[$objp->numr], 0, $langs, 1, -1, -1, empty(
$object->currency_code) ?
$conf->currency :
$object->currency_code).
'</span></td>';
411 $sql =
"SELECT sum(b.amount) as amount";
412 $sql .=
" FROM ".MAIN_DB_PREFIX.
"bank as b";
413 $sql .=
" WHERE b.num_releve = '".$db->escape($objp->numr).
"'";
414 $sql .=
" AND b.fk_account = ".((int)
$object->id);
415 $resqlend = $db->query($sql);
417 $obj = $db->fetch_object($resqlend);
418 $content[$objp->numr] = $obj->amount;
419 $db->free($resqlend);
421 print
'<td class="right"><span class="amount">'.price(($balancestart[$objp->numr] + $content[$objp->numr]), 0, $langs, 1, -1, -1, empty(
$object->currency_code) ?
$conf->currency :
$object->currency_code).
'</span></td>';
423 print
'<td class="center">';
424 if ($user->hasRight(
'banque',
'consolidate') && $action !=
'editbankreceipt') {
425 print
'<a class="editfielda" href="'.$_SERVER[
"PHP_SELF"].
'?account='.
$object->id.($page > 0 ?
'&page='.$page :
'').
'&action=editbankreceipt&token='.
newToken().
'&brref='.urlencode($objp->numr).
'">'.
img_edit().
'</a>';
436 print
'<tr><td colspan="5"><span class="opacitymedium">'.$langs->trans(
"None").
'</span></td></tr>';
453 print
dol_get_fiche_head($head,
'statement', $langs->trans(
"AccountStatement"), -1,
'account');
457 $morehtmlright .=
'<div class="pagination"><ul>';
458 if ($foundprevious) {
459 $morehtmlright .=
'<li class="pagination"><a class="paginationnext" href="'.$_SERVER[
"PHP_SELF"].
'?num='.urlencode($foundprevious).
'&ve='.urlencode($ve).
'&account='.((int)
$object->id).
'"><i class="fa fa-chevron-left" title="'.
dol_escape_htmltag($langs->trans(
"Previous")).
'"></i></a></li>';
461 $morehtmlright .=
'<li class="pagination"><span class="active">'.$langs->trans(
"AccountStatement").
" ".$numref.
'</span></li>';
463 $morehtmlright .=
'<li class="pagination"><a class="paginationnext" href="'.$_SERVER[
"PHP_SELF"].
'?num='.urlencode($foundnext).
'&ve='.urlencode($ve).
'&account='.((int)
$object->id).
'"><i class="fa fa-chevron-right" title="'.
dol_escape_htmltag($langs->trans(
"Next")).
'"></i></a></li>';
465 $morehtmlright .=
'</ul></div>';
467 $title = $langs->trans(
"AccountStatement").
' '.$numref.
' - '.$langs->trans(
"BankAccount").
' '.
$object->getNomUrl(1,
'receipts');
470 print
'<form method="POST" action="'.$_SERVER[
"PHP_SELF"].
'">';
471 print
'<input type="hidden" name="token" value="'.newToken().
'">';
472 print
'<input type="hidden" name="action" value="add">';
474 print
'<div class="div-table-responsive">';
475 print
'<table class="noborder centpercent">';
476 print
'<tr class="liste_titre">';
477 print
'<td class="center">'.$langs->trans(
"DateOperationShort").
'</td>';
478 print
'<td class="center">'.$langs->trans(
"DateValueShort").
'</td>';
479 print
'<td>'.$langs->trans(
"Type").
'</td>';
480 print
'<td>'.$langs->trans(
"Description").
'</td>';
481 print
'<td class="right" width="60">'.$langs->trans(
"Debit").
'</td>';
482 print
'<td class="right" width="60">'.$langs->trans(
"Credit").
'</td>';
483 print
'<td class="right">'.$langs->trans(
"Balance").
'</td>';
484 print
'<td> </td>';
488 $sql =
"SELECT sum(b.amount) as amount";
489 $sql .=
" FROM ".MAIN_DB_PREFIX.
"bank as b";
490 $sql .=
" WHERE b.num_releve < '".$db->escape($numref).
"'";
491 $sql .=
" AND b.num_releve <> ''";
492 $sql .=
" AND b.fk_account = ".((int)
$object->id);
494 $resql = $db->query($sql);
496 $obj = $db->fetch_object($resql);
497 $total = $obj->amount;
503 $totalc = $totald = 0;
506 $sql = $sqlrequestforbankline;
508 $resql = $db->query($sql);
510 $num = $db->num_rows($resql);
514 print
'<tr class="oddeven"><td colspan="3"></td>';
515 print
'<td colspan="3"><b>'.$langs->trans(
"InitialBankBalance").
" :</b></td>";
516 print
'<td class="right"><b>'.price($total).
'</b></td><td> </td>';
520 $objp = $db->fetch_object($resql);
521 $total += $objp->amount;
523 print
'<tr class="oddeven">';
526 print
'<td class="nowrap center">'.dol_print_date($db->jdate($objp->do),
"day").
'</td>';
529 print
'<td valign="center" class="center nowrap">';
530 print
'<span class="spanforajaxedit">'.dol_print_date($db->jdate($objp->dv),
"day").
'</span>';
532 print
'<span class="inline-block">';
533 print
'<a class="ajaxforbankoperationchange reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=dvprev&num='.urlencode($numref).
'&account='.
$object->id.
'&rowid='.$objp->rowid.
'&dvid='.$objp->rowid.
'">';
535 print
'<a class="ajaxforbankoperationchange reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=dvnext&num='.urlencode($numref).
'&account='.
$object->id.
'&rowid='.$objp->rowid.
'&dvid='.$objp->rowid.
'">';
541 if ($objp->fk_type ==
'SOLD') {
542 $type_label =
' ';
544 $type_label = ($langs->trans(
"PaymentTypeShort".$objp->fk_type) !=
"PaymentTypeShort".$objp->fk_type) ? $langs->trans(
"PaymentTypeShort".$objp->fk_type) : $objp->fk_type;
547 if ($objp->fk_bordereau > 0) {
548 $remisestatic->id = $objp->fk_bordereau;
549 $remisestatic->ref = $objp->ref;
550 $link =
' '.$remisestatic->getNomUrl(1);
552 print
'<td class="nowrap">'.$type_label.
' '.($objp->num_chq ? $objp->num_chq :
'').$link.
'</td>';
555 print
'<td valign="center">';
556 print
'<a href="'.DOL_URL_ROOT.
'/compta/bank/line.php?rowid='.$objp->rowid.
'&account='.
$object->id.
'">';
559 preg_match(
'/\((.+)\)/i', $objp->label, $reg);
560 if (!empty($reg[1]) && $langs->trans($reg[1]) != $reg[1]) {
561 print $langs->trans($reg[1]);
571 $links =
$object->get_url($objp->rowid);
572 foreach ($links as $key => $val) {
578 if ($links[$key][
'type'] ==
'payment') {
579 $paymentstatic->id = $links[$key][
'url_id'];
580 $paymentstatic->ref = $langs->trans(
"Payment");
581 print
' '.$paymentstatic->getNomUrl(1);
583 } elseif ($links[$key][
'type'] ==
'payment_supplier') {
584 $paymentsupplierstatic->id = $links[$key][
'url_id'];
585 $paymentsupplierstatic->ref = $langs->trans(
"Payment");
586 print
' '.$paymentsupplierstatic->getNomUrl(1);
588 } elseif ($links[$key][
'type'] ==
'payment_sc') {
589 print
'<a href="'.DOL_URL_ROOT.
'/compta/payment_sc/card.php?id='.$links[$key][
'url_id'].
'">';
590 print
' '.img_object($langs->trans(
'ShowPayment'),
'payment').
' ';
591 print $langs->trans(
"SocialContributionPayment");
594 } elseif ($links[$key][
'type'] ==
'payment_vat') {
595 $paymentvatstatic->id = $links[$key][
'url_id'];
596 $paymentvatstatic->ref = $langs->trans(
"Payment");
597 print
' '.$paymentvatstatic->getNomUrl(1);
598 } elseif ($links[$key][
'type'] ==
'payment_salary') {
599 print
'<a href="'.DOL_URL_ROOT.
'/salaries/card.php?id='.$links[$key][
'url_id'].
'">';
600 print
' '.img_object($langs->trans(
'ShowPayment'),
'payment').
' ';
601 print $langs->trans(
"Payment");
604 } elseif ($links[$key][
'type'] ==
'payment_donation') {
605 $paymentdonationstatic->id = $links[$key][
'url_id'];
606 $paymentdonationstatic->ref = $langs->trans(
"Payment");
607 print
' '.$paymentdonationstatic->getNomUrl(1);
609 } elseif ($links[$key][
'type'] ==
'payment_loan') {
610 $paymentloanstatic->id = $links[$key][
'url_id'];
611 $paymentloanstatic->ref = $langs->trans(
"Payment");
612 print
' '.$paymentloanstatic->getNomUrl(1);
614 } elseif ($links[$key][
'type'] ==
'payment_various') {
615 $paymentvariousstatic->id = $links[$key][
'url_id'];
616 $paymentvariousstatic->ref = $langs->trans(
"Payment");
617 print
' '.$paymentvariousstatic->getNomUrl(1);
619 } elseif ($links[$key][
'type'] ==
'banktransfert') {
621 if ($objp->amount > 0) {
622 $banklinestatic->fetch($links[$key][
'url_id']);
623 $bankstatic->id = $banklinestatic->fk_account;
624 $bankstatic->label = $banklinestatic->bank_account_label;
625 print
' ('.$langs->trans(
"from").
' ';
626 print $bankstatic->getNomUrl(1,
'transactions');
627 print
' '.$langs->trans(
"toward").
' ';
628 $bankstatic->id = $objp->bankid;
629 $bankstatic->label = $objp->bankref;
630 print $bankstatic->getNomUrl(1,
'');
633 $bankstatic->id = $objp->bankid;
634 $bankstatic->label = $objp->bankref;
635 print
' ('.$langs->trans(
"from").
' ';
636 print $bankstatic->getNomUrl(1,
'');
637 print
' '.$langs->trans(
"toward").
' ';
638 $banklinestatic->fetch($links[$key][
'url_id']);
639 $bankstatic->id = $banklinestatic->fk_account;
640 $bankstatic->label = $banklinestatic->bank_account_label;
641 print $bankstatic->getNomUrl(1,
'transactions');
644 } elseif ($links[$key][
'type'] ==
'company') {
645 $societestatic->id = $links[$key][
'url_id'];
646 $societestatic->name = $links[$key][
'label'];
647 print $societestatic->getNomUrl(1,
'company', 24);
649 } elseif ($links[$key][
'type'] ==
'member') {
650 print
'<a href="'.DOL_URL_ROOT.
'/adherents/card.php?rowid='.$links[$key][
'url_id'].
'">';
651 print
img_object($langs->trans(
'ShowMember'),
'user').
' ';
652 print $links[$key][
'label'];
655 } elseif ($links[$key][
'type'] ==
'user') {
656 print
'<a href="'.DOL_URL_ROOT.
'/user/card.php?id='.$links[$key][
'url_id'].
'">';
657 print
img_object($langs->trans(
'ShowUser'),
'user').
' ';
658 print $links[$key][
'label'];
661 } elseif ($links[$key][
'type'] ==
'sc') {
662 print
'<a href="'.DOL_URL_ROOT.
'/compta/sociales/card.php?id='.$links[$key][
'url_id'].
'">';
663 print
img_object($langs->trans(
'ShowBill'),
'bill').
' ';
664 print $langs->trans(
"SocialContribution");
668 print
'<a href="'.$links[$key][
'url'].$links[$key][
'url_id'].
'">';
669 print $links[$key][
'label'];
677 $sql =
"SELECT label";
678 $sql .=
" FROM ".MAIN_DB_PREFIX.
"categorie as ct";
679 $sql .=
", ".MAIN_DB_PREFIX.
"category_bankline as cl";
680 $sql .=
" WHERE ct.rowid = cl.fk_categ";
681 $sql .=
" AND ct.entity = ".((int)
$conf->entity);
682 $sql .=
" AND cl.lineid = ".((int) $objp->rowid);
684 $resc = $db->query($sql);
686 $numc = $db->num_rows($resc);
688 if ($numc && !$newline) {
691 while ($ii < $numc) {
692 $objc = $db->fetch_object($resc);
693 print
"<br>- <i>".$objc->label.
"</i>";
703 if ($objp->amount < 0) {
704 $totald += abs($objp->amount);
705 print
'<td class="nowrap right">'.price($objp->amount * -1).
"</td><td> </td>\n";
707 $totalc += abs($objp->amount);
708 print
'<td> </td><td class="nowrap right">'.price($objp->amount).
"</td>\n";
711 print
'<td class="nowrap right">'.price(
price2num($total,
'MT')).
"</td>\n";
713 if ($user->hasRight(
'banque',
'modifier') || $user->hasRight(
'banque',
'consolidate')) {
714 print
'<td class="center"><a class="editfielda reposition" href="'.DOL_URL_ROOT.
'/compta/bank/line.php?rowid='.$objp->rowid.
'&account='.
$object->id.
'&backtopage='.urlencode($_SERVER[
"PHP_SELF"].
'?account='.
$object->id.
'&num='.urlencode($numref)).
'">';
718 print
"<td class=\"center\"> </td>";
729 print
"\n".
'<tr class="liste_total"><td class="right" colspan="4">'.$langs->trans(
"Total").
' :</td><td class="right">'.
price($totald).
'</td><td class="right">'.
price($totalc).
"</td><td> </td><td> </td></tr>";
733 print
"<td class=\"right\" colspan=\"3\"> </td><td colspan=\"3\"><b>".$langs->trans(
"EndBankBalance").
" :</b></td>";
734 print
'<td class="right"><b>'.price(
price2num($total,
'MT')).
"</b></td><td> </td>";
739 $urlajax = DOL_URL_ROOT.
'/core/ajax/bankconciliate.php?token='.
currentToken();
741 <script type="text/javascript">
743 $("a.ajaxforbankoperationchange").each(function(){
744 var current = $(this);
745 current.click(function()
747 console.log("We click on ajaxforbankoperationchange");
748 var url = "'.$urlajax.
'&"+current.attr("href").split("?")[1];
749 $.get(url, function(data)
753 current.parent().parent().find(".spanforajaxedit").replaceWith(data);
if( $user->socid > 0) if(! $user->hasRight('accounting', 'chartofaccount')) $object
if(!defined('NOREQUIRESOC')) if(!defined( 'NOREQUIRETRAN')) if(!defined('NOTOKENRENEWAL')) if(!defined( 'NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined( 'NOREQUIREAJAX')) llxHeader($head='', $title='', $help_url='', $target='', $disablejs=0, $disablehead=0, $arrayofjs='', $arrayofcss='', $morequerystring='', $morecssonbody='', $replacemainareaby='', $disablenofollow=0, $disablenoindex=0)
Empty header.
account_statement_prepare_head($object, $num)
Prepare array with list of tabs.
bank_prepare_head(Account $object)
Prepare array with list of tabs.
Class to manage bank accounts.
Class to manage bank transaction lines.
Class to manage members of a foundation.
Class for managing the social charges.
Class to manage payments for supplier invoices.
Class to manage payments of customer invoices.
Class to manage payments of donations.
Class to manage payments of loans.
Class to manage various payments.
Class to manage cheque delivery receipts.
Class to manage third parties objects (customers, suppliers, prospects...)
Class to manage VAT - Value-added tax (also known in French as TVA - Taxe sur la valeur ajoutée)
load_fiche_titre($title, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='')
Load a title with picto.
img_object($titlealt, $picto, $moreatt='', $pictoisfullpath=0, $srconly=0, $notitle=0)
Show a picto called object_picto (generic function)
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='', $noduplicate=0, $attop=0)
Set event messages in dol_events session object.
print_barre_liste($title, $page, $file, $options='', $sortfield='', $sortorder='', $morehtmlcenter='', $num=-1, $totalnboflines='', $picto='generic', $pictoisfullpath=0, $morehtmlright='', $morecss='', $limit=-1, $selectlimitsuffix=0, $hidenavigation=0, $pagenavastextinput=0, $morehtmlrightbeforearrow='')
Print a title with navigation controls for pagination.
GETPOSTINT($paramname, $method=0)
Return the value of a $_GET or $_POST supervariable, converted into integer.
dol_get_fiche_head($links=array(), $active='', $title='', $notab=0, $picto='', $pictoisfullpath=0, $morehtmlright='', $morecss='', $limittoshow=0, $moretabssuffix='', $dragdropfile=0)
Show tabs of a record.
price2num($amount, $rounding='', $option=0)
Function that return a number with universal decimal format (decimal separator is '.
currentToken()
Return the value of token currently saved into session with name 'token'.
dol_get_fiche_end($notab=0)
Return tab footer of a card.
price($amount, $form=0, $outlangs='', $trunc=1, $rounding=-1, $forcerounding=-1, $currency_code='')
Function to format a value into an amount for visual output Function used into PDF and HTML pages.
getDolGlobalInt($key, $default=0)
Return a Dolibarr global constant int value.
newToken()
Return the value of token currently saved into session with name 'newtoken'.
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
dol_print_error($db=null, $error='', $errors=null)
Displays error message system with all the information to facilitate the diagnosis and the escalation...
img_edit_add($titlealt='default', $other='')
Show logo +.
img_edit($titlealt='default', $float=0, $other='')
Show logo edit/modify fiche.
dol_syslog($message, $level=LOG_INFO, $ident=0, $suffixinfilename='', $restricttologhandler='', $logcontext=null)
Write log message into outputs.
img_edit_remove($titlealt='default', $other='')
Show logo -.
dol_escape_htmltag($stringtoescape, $keepb=0, $keepn=0, $noescapetags='', $escapeonlyhtmltags=0, $cleanalsojavascript=0)
Returns text escaped for inclusion in HTML alt or title or value tags, or into values of HTML input f...
global $conf
The following vars must be defined: $type2label $form $conf, $lang, The following vars may also be de...
restrictedArea(User $user, $features, $object=0, $tableandshare='', $feature2='', $dbt_keyfield='fk_soc', $dbt_select='rowid', $isdraft=0, $mode=0)
Check permissions of a user to show a page and an object.