31 require
'../../main.inc.php';
32 require_once DOL_DOCUMENT_ROOT.
'/core/lib/bank.lib.php';
33 require_once DOL_DOCUMENT_ROOT.
'/societe/class/societe.class.php';
34 require_once DOL_DOCUMENT_ROOT.
'/adherents/class/adherent.class.php';
35 require_once DOL_DOCUMENT_ROOT.
'/compta/sociales/class/chargesociales.class.php';
36 require_once DOL_DOCUMENT_ROOT.
'/compta/paiement/class/paiement.class.php';
37 require_once DOL_DOCUMENT_ROOT.
'/compta/tva/class/tva.class.php';
38 require_once DOL_DOCUMENT_ROOT.
'/fourn/class/paiementfourn.class.php';
39 require_once DOL_DOCUMENT_ROOT.
'/compta/bank/class/account.class.php';
40 require_once DOL_DOCUMENT_ROOT.
'/compta/paiement/cheque/class/remisecheque.class.php';
41 require_once DOL_DOCUMENT_ROOT.
'/compta/facture/class/facture.class.php';
42 require_once DOL_DOCUMENT_ROOT.
'/fourn/class/fournisseur.facture.class.php';
43 require_once DOL_DOCUMENT_ROOT.
'/don/class/paymentdonation.class.php';
44 require_once DOL_DOCUMENT_ROOT.
'/loan/class/paymentloan.class.php';
45 require_once DOL_DOCUMENT_ROOT.
'/compta/bank/class/paymentvarious.class.php';
47 require_once DOL_DOCUMENT_ROOT.
'/core/lib/files.lib.php';
48 require_once DOL_DOCUMENT_ROOT.
'/core/lib/functions.lib.php';
51 $langs->loadLangs(array(
"banks",
"categories",
"companies",
"bills",
"trips",
"donations",
"loan",
"salaries"));
53 $action =
GETPOST(
'action',
'aZ09');
56 $dvid =
GETPOST(
'dvid',
'alpha');
57 $numref =
GETPOST(
'num',
'alpha');
59 $brref =
GETPOST(
'brref',
'alpha');
60 $oldbankreceipt =
GETPOST(
'oldbankreceipt',
'alpha');
61 $newbankreceipt =
GETPOST(
'newbankreceipt',
'alpha');
62 $rel =
GETPOST(
"rel",
'alphanohtml');
63 $backtopage =
GETPOST(
'backtopage',
'alpha');
66 $hookmanager->initHooks(array(
'bankaccountstatement',
'globalcard'));
69 $fieldid = (!empty($ref) ? $ref : $id);
70 $fieldname = (!empty($ref) ?
'ref' :
'rowid');
72 $socid = $user->socid;
75 $result =
restrictedArea($user,
'banque', $fieldid,
'bank_account',
'',
'', $fieldname);
77 if ($user->rights->banque->consolidate && $action ==
'dvnext' && !empty($dvid)) {
79 $al->datev_next($dvid);
82 if ($user->rights->banque->consolidate && $action ==
'dvprev' && !empty($dvid)) {
84 $al->datev_previous($dvid);
88 $limit =
GETPOST(
'limit',
'int') ?
GETPOST(
'limit',
'int') : $conf->liste_limit;
89 $sortfield =
GETPOST(
'sortfield',
'aZ09comma');
90 $sortorder =
GETPOST(
'sortorder',
'aZ09comma');
92 $pageplusone =
GETPOST(
"pageplusone",
'int');
94 $page = $pageplusone - 1;
96 if (empty($page) || $page == -1) {
99 $offset = $limit * $page;
100 $pageprev = $page - 1;
101 $pagenext = $page + 1;
106 $sortfield =
"s.nom";
110 if ($id > 0 || !empty($ref)) {
111 $result = $object->fetch($id, $ref);
112 $account = $object->id;
117 $contextpage =
'banktransactionlist'.(empty($object->ref) ?
'' :
'-'.$object->id);
122 if ($rel ==
'prev') {
124 $sql =
"SELECT DISTINCT(b.num_releve) as num";
125 $sql .=
" FROM ".MAIN_DB_PREFIX.
"bank as b";
126 $sql .=
" WHERE b.num_releve < '".$db->escape($numref).
"'";
127 $sql .=
" AND b.fk_account = ".((int) $object->id);
128 $sql .=
" ORDER BY b.num_releve DESC";
130 dol_syslog(
"htdocs/compta/bank/releve.php", LOG_DEBUG);
131 $resql = $db->query($sql);
133 $numrows = $db->num_rows(
$resql);
135 $obj = $db->fetch_object(
$resql);
140 } elseif ($rel ==
'next') {
142 $sql =
"SELECT DISTINCT(b.num_releve) as num";
143 $sql .=
" FROM ".MAIN_DB_PREFIX.
"bank as b";
144 $sql .=
" WHERE b.num_releve > '".$db->escape($numref).
"'";
145 $sql .=
" AND b.fk_account = ".((int) $object->id);
146 $sql .=
" ORDER BY b.num_releve ASC";
148 dol_syslog(
"htdocs/compta/bank/releve.php", LOG_DEBUG);
149 $resql = $db->query($sql);
151 $numrows = $db->num_rows(
$resql);
153 $obj = $db->fetch_object(
$resql);
164 $sql =
"SELECT b.rowid, b.dateo as do, b.datev as dv,";
165 $sql .=
" b.amount, b.label, b.rappro, b.num_releve, b.num_chq, b.fk_type,";
166 $sql .=
" b.fk_bordereau,";
168 $sql .=
" ba.rowid as bankid, ba.ref as bankref, ba.label as banklabel";
169 $sql .=
" FROM ".MAIN_DB_PREFIX.
"bank_account as ba";
170 $sql .=
", ".MAIN_DB_PREFIX.
"bank as b";
171 $sql .=
' LEFT JOIN '.MAIN_DB_PREFIX.
'bordereau_cheque as bc ON bc.rowid=b.fk_bordereau';
172 $sql .=
" WHERE b.num_releve='".$db->escape($numref).
"'";
173 if (empty($numref)) {
174 $sql .=
" OR b.num_releve is null";
176 $sql .=
" AND b.fk_account = ".((int) $object->id);
177 $sql .=
" AND b.fk_account = ba.rowid";
178 $sql .= $db->order(
"b.datev, b.datec",
"ASC");
180 $sqlrequestforbankline = $sql;
188 if ($action ==
'confirm_editbankreceipt' && !empty($oldbankreceipt) && !empty($newbankreceipt)) {
190 $sqlupdate =
"UPDATE ".MAIN_DB_PREFIX.
"bank SET num_releve = '".$db->escape($newbankreceipt).
"'";
191 $sqlupdate .=
" WHERE num_releve = '".$db->escape($oldbankreceipt).
"' AND fk_account = ".((int) $id);
192 $result = $db->query($sqlupdate);
205 $societestatic =
new Societe($db);
210 $paymentvatstatic =
new Tva($db);
211 $bankstatic =
new Account($db);
220 if (!empty($contextpage) && $contextpage != $_SERVER[
"PHP_SELF"]) {
221 $param .=
'&contextpage='.$contextpage;
223 if ($limit > 0 && $limit != $conf->liste_limit) {
224 $param .=
'&limit='.$limit;
227 $param .=
'&id='.urlencode($id);
230 if (empty($numref)) {
231 $title = $object->ref.
' - '.$langs->trans(
"AccountStatements");
234 $title = $langs->trans(
"FinancialAccount").
' - '.$langs->trans(
"AccountStatements");
242 if (empty($numref)) {
247 $sql =
"SELECT DISTINCT(b.num_releve) as numr";
248 $sql .=
" FROM ".MAIN_DB_PREFIX.
"bank as b";
249 $sql .=
" WHERE b.fk_account = ".((int) $object->id);
250 $sql .= $db->order($sortfield, $sortorder);
254 if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) {
255 $result = $db->query($sql);
256 $totalnboflines = $db->num_rows($result);
259 $sql .= $db->plimit($conf->liste_limit + 1, $offset);
261 $result = $db->query($sql);
263 $numrows = $db->num_rows($result);
268 print
dol_get_fiche_head($head,
'statement', $langs->trans(
"FinancialAccount"), 0,
'account');
270 $linkback =
'<a href="'.DOL_URL_ROOT.
'/compta/bank/list.php?restore_lastsearch_values=1">'.$langs->trans(
"BackToList").
'</a>';
274 dol_banner_tab($object,
'ref', $linkback, 1,
'ref',
'ref', $morehtmlref,
'', 0,
'',
'', 1);
279 print
'<div class="tabsAction">';
281 if ($object->canBeConciliated() > 0) {
282 $allowautomaticconciliation =
false;
283 $titletoconciliatemanual = $langs->trans(
"Conciliate");
284 $titletoconciliateauto = $langs->trans(
"Conciliate");
285 if ($allowautomaticconciliation) {
286 $titletoconciliatemanual .=
' ('.$langs->trans(
"Manual").
')';
287 $titletoconciliateauto .=
' ('.$langs->trans(
"Auto").
')';
291 if ($user->rights->banque->consolidate) {
292 $buttonreconcile =
'<a class="butAction" href="'.DOL_URL_ROOT.
'/compta/bank/bankentries_list.php?action=reconcile&sortfield=b.datev,b.dateo,b.rowid&sortorder=asc,asc,asc&search_conciliated=0&search_account='.$id.$param.
'">'.$titletoconciliatemanual.
'</a>';
294 $buttonreconcile =
'<a class="butActionRefused classfortooltip" title="'.$langs->trans(
"NotEnoughPermissions").
'" href="#">'.$titletoconciliatemanual.
'</a>';
298 if ($allowautomaticconciliation) {
300 if ($user->rights->banque->consolidate) {
302 $newparam = preg_replace(
'/search_conciliated=\d+/i',
'', $newparam);
303 $buttonreconcile .=
' <a class="butAction" style="margin-bottom: 5px !important; margin-top: 5px !important" href="'.DOL_URL_ROOT.
'/compta/bank/bankentries_list.php?action=reconcile&sortfield=b.datev,b.dateo,b.rowid&sortorder=asc,asc,asc&search_conciliated=0'.$newparam.
'">'.$titletoconciliateauto.
'</a>';
305 $buttonreconcile .=
' <a class="butActionRefused" style="margin-bottom: 5px !important; margin-top: 5px !important" title="'.$langs->trans(
"NotEnoughPermissions").
'" href="#">'.$titletoconciliateauto.
'</a>';
309 print $buttonreconcile;
315 print_barre_liste(
'', $page, $_SERVER[
"PHP_SELF"],
"&account=".$object->id, $sortfield, $sortorder,
'', $numrows, $totalnboflines,
'');
317 print
'<form name="aaa" action="'.$_SERVER[
"PHP_SELF"].
'" method="POST">';
318 print
'<input type="hidden" name="token" value="'.newToken().
'">';
319 print
'<input type="hidden" name="action" value="confirm_editbankreceipt">';
320 print
'<input type="hidden" name="backtopage" value="'.$backtopage.
'">';
321 print
'<input type="hidden" name="account" value="'.$object->id.
'">';
322 print
'<input type="hidden" name="page" value="'.$page.
'">';
324 print
'<table class="noborder centpercent">';
325 print
'<tr class="liste_titre">';
326 print
'<td>'.$langs->trans(
"Ref").
'</td>';
327 print
'<td class="right">'.$langs->trans(
"InitialBankBalance").
'</td>';
328 print
'<td class="right">'.$langs->trans(
"EndBankBalance").
'</td>';
332 $balancestart = array();
335 while ($i < min($numrows, $conf->liste_limit)) {
336 $objp = $db->fetch_object($result);
338 if (!isset($objp->numr)) {
341 print
'<tr class="oddeven">';
343 if ($action !=
'editbankreceipt' || $objp->numr != $brref) {
344 print
'<a href="releve.php?num='.$objp->numr.
'&account='.$object->id.
'">'.$objp->numr.
'</a>';
346 print
'<input type="hidden" name="oldbankreceipt" value="'.$objp->numr.
'">';
347 print
'<input type="text" name="newbankreceipt" value="'.$objp->numr.
'">';
348 print
'<input type="submit" class="button small" name="actionnewbankreceipt" value="'.$langs->trans(
"Rename").
'">';
349 print
'<input type="submit" class="button button-cancel small" name="cancel" value="'.$langs->trans(
"Cancel").
'">';
354 $sql =
"SELECT sum(b.amount) as amount";
355 $sql .=
" FROM ".MAIN_DB_PREFIX.
"bank as b";
356 $sql .=
" WHERE b.num_releve < '".$db->escape($objp->numr).
"'";
357 $sql .=
" AND b.fk_account = ".((int) $object->id);
358 $resql = $db->query($sql);
360 $obj = $db->fetch_object(
$resql);
361 $balancestart[$objp->numr] = $obj->amount;
364 print
'<td class="right"><span class="amount">'.price($balancestart[$objp->numr],
'', $langs, 1, -1, -1, empty($object->currency_code)?$conf->currency:$object->currency_code).
'</span></td>';
367 $sql =
"SELECT sum(b.amount) as amount";
368 $sql .=
" FROM ".MAIN_DB_PREFIX.
"bank as b";
369 $sql .=
" WHERE b.num_releve = '".$db->escape($objp->numr).
"'";
370 $sql .=
" AND b.fk_account = ".((int) $object->id);
371 $resql = $db->query($sql);
373 $obj = $db->fetch_object(
$resql);
374 $content[$objp->numr] = $obj->amount;
377 print
'<td class="right"><span class="amount">'.price(($balancestart[$objp->numr] + $content[$objp->numr]),
'', $langs, 1, -1, -1, empty($object->currency_code)?$conf->currency:$object->currency_code).
'</span></td>';
379 print
'<td class="center">';
380 if ($user->rights->banque->consolidate && $action !=
'editbankreceipt') {
381 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>';
403 print
dol_get_fiche_head($head,
'statement', $langs->trans(
"AccountStatement"), -1,
'account');
407 $morehtmlright .=
'<div class="pagination"><ul>';
408 $morehtmlright .=
'<li class="pagination"><a class="paginationnext" href="'.$_SERVER[
"PHP_SELF"].
'?rel=prev&num='.$numref.
'&ve='.$ve.
'&account='.$object->id.
'"><i class="fa fa-chevron-left" title="'.
dol_escape_htmltag($langs->trans(
"Previous")).
'"></i></a></li>';
409 $morehtmlright .=
'<li class="pagination"><span class="active">'.$langs->trans(
"AccountStatement").
" ".$numref.
'</span></li>';
410 $morehtmlright .=
'<li class="pagination"><a class="paginationnext" href="'.$_SERVER[
"PHP_SELF"].
'?rel=next&num='.$numref.
'&ve='.$ve.
'&account='.$object->id.
'"><i class="fa fa-chevron-right" title="'.
dol_escape_htmltag($langs->trans(
"Next")).
'"></i></a></li>';
411 $morehtmlright .=
'</ul></div>';
413 $title = $langs->trans(
"AccountStatement").
' '.$numref.
' - '.$langs->trans(
"BankAccount").
' '.$object->getNomUrl(1,
'receipts');
416 print
'<form method="POST" action="'.$_SERVER[
"PHP_SELF"].
'">';
417 print
'<input type="hidden" name="token" value="'.newToken().
'">';
418 print
'<input type="hidden" name="action" value="add">';
420 print
'<div class="div-table-responsive">';
421 print
'<table class="noborder centpercent">';
422 print
'<tr class="liste_titre">';
423 print
'<td class="center">'.$langs->trans(
"DateOperationShort").
'</td>';
424 print
'<td class="center">'.$langs->trans(
"DateValueShort").
'</td>';
425 print
'<td>'.$langs->trans(
"Type").
'</td>';
426 print
'<td>'.$langs->trans(
"Description").
'</td>';
427 print
'<td class="right" width="60">'.$langs->trans(
"Debit").
'</td>';
428 print
'<td class="right" width="60">'.$langs->trans(
"Credit").
'</td>';
429 print
'<td class="right">'.$langs->trans(
"Balance").
'</td>';
430 print
'<td> </td>';
434 $sql =
"SELECT sum(b.amount) as amount";
435 $sql .=
" FROM ".MAIN_DB_PREFIX.
"bank as b";
436 $sql .=
" WHERE b.num_releve < '".$db->escape($numref).
"'";
437 $sql .=
" AND b.fk_account = ".((int) $object->id);
439 $resql = $db->query($sql);
441 $obj = $db->fetch_object(
$resql);
442 $total = $obj->amount;
447 $sql = $sqlrequestforbankline;
449 $result = $db->query($sql);
451 $numrows = $db->num_rows($result);
455 print
'<tr class="oddeven"><td colspan="3"></td>';
456 print
'<td colspan="3"><b>'.$langs->trans(
"InitialBankBalance").
" :</b></td>";
457 print
'<td class="right"><b>'.price($total).
'</b></td><td> </td>';
460 while ($i < $numrows) {
461 $objp = $db->fetch_object($result);
462 $total = $total + $objp->amount;
464 print
'<tr class="oddeven">';
467 print
'<td class="nowrap center">'.dol_print_date($db->jdate($objp->do),
"day").
'</td>';
470 print
'<td valign="center" class="center nowrap">';
471 print
'<span class="spanforajaxedit">'.dol_print_date($db->jdate($objp->dv),
"day").
'</span>';
473 print
'<span class="inline-block">';
474 print
'<a class="ajaxforbankoperationchange reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=dvprev&num='.$numref.
'&account='.$object->id.
'&rowid='.$objp->rowid.
'&dvid='.$objp->rowid.
'">';
476 print
'<a class="ajaxforbankoperationchange reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=dvnext&num='.$numref.
'&account='.$object->id.
'&rowid='.$objp->rowid.
'&dvid='.$objp->rowid.
'">';
482 if ($objp->fk_type ==
'SOLD') {
483 $type_label =
' ';
485 $type_label = ($langs->trans(
"PaymentTypeShort".$objp->fk_type) !=
"PaymentTypeShort".$objp->fk_type) ? $langs->trans(
"PaymentTypeShort".$objp->fk_type) : $objp->fk_type;
488 if ($objp->fk_bordereau > 0) {
489 $remisestatic->id = $objp->fk_bordereau;
490 $remisestatic->ref = $objp->ref;
491 $link =
' '.$remisestatic->getNomUrl(1);
493 print
'<td class="nowrap">'.$type_label.
' '.($objp->num_chq ? $objp->num_chq :
'').$link.
'</td>';
496 print
'<td valign="center">';
497 print
'<a href="'.DOL_URL_ROOT.
'/compta/bank/line.php?rowid='.$objp->rowid.
'&account='.$object->id.
'">';
499 preg_match(
'/\((.+)\)/i', $objp->label, $reg);
500 if ($reg[1] && $langs->trans($reg[1]) != $reg[1]) {
501 print $langs->trans($reg[1]);
511 $links = $object->get_url($objp->rowid);
512 foreach ($links as $key => $val) {
518 if ($links[$key][
'type'] ==
'payment') {
519 $paymentstatic->id = $links[$key][
'url_id'];
520 $paymentstatic->ref = $langs->trans(
"Payment");
521 print
' '.$paymentstatic->getNomUrl(1);
523 } elseif ($links[$key][
'type'] ==
'payment_supplier') {
524 $paymentsupplierstatic->id = $links[$key][
'url_id'];
525 $paymentsupplierstatic->ref = $langs->trans(
"Payment");
526 print
' '.$paymentsupplierstatic->getNomUrl(1);
528 } elseif ($links[$key][
'type'] ==
'payment_sc') {
529 print
'<a href="'.DOL_URL_ROOT.
'/compta/payment_sc/card.php?id='.$links[$key][
'url_id'].
'">';
530 print
' '.img_object($langs->trans(
'ShowPayment'),
'payment').
' ';
531 print $langs->trans(
"SocialContributionPayment");
534 } elseif ($links[$key][
'type'] ==
'payment_vat') {
535 $paymentvatstatic->id = $links[$key][
'url_id'];
536 $paymentvatstatic->ref = $langs->trans(
"Payment");
537 print
' '.$paymentvatstatic->getNomUrl(1);
538 } elseif ($links[$key][
'type'] ==
'payment_salary') {
539 print
'<a href="'.DOL_URL_ROOT.
'/salaries/card.php?id='.$links[$key][
'url_id'].
'">';
540 print
' '.img_object($langs->trans(
'ShowPayment'),
'payment').
' ';
541 print $langs->trans(
"Payment");
544 } elseif ($links[$key][
'type'] ==
'payment_donation') {
545 $paymentdonationstatic->id = $links[$key][
'url_id'];
546 $paymentdonationstatic->ref = $langs->trans(
"Payment");
547 print
' '.$paymentdonationstatic->getNomUrl(1);
549 } elseif ($links[$key][
'type'] ==
'payment_loan') {
550 $paymentloanstatic->id = $links[$key][
'url_id'];
551 $paymentloanstatic->ref = $langs->trans(
"Payment");
552 print
' '.$paymentloanstatic->getNomUrl(1);
554 } elseif ($links[$key][
'type'] ==
'payment_various') {
555 $paymentvariousstatic->id = $links[$key][
'url_id'];
556 $paymentvariousstatic->ref = $langs->trans(
"Payment");
557 print
' '.$paymentvariousstatic->getNomUrl(1);
559 } elseif ($links[$key][
'type'] ==
'banktransfert') {
561 if ($objp->amount > 0) {
562 $banklinestatic->fetch($links[$key][
'url_id']);
563 $bankstatic->id = $banklinestatic->fk_account;
564 $bankstatic->label = $banklinestatic->bank_account_label;
565 print
' ('.$langs->trans(
"from").
' ';
566 print $bankstatic->getNomUrl(1,
'transactions');
567 print
' '.$langs->trans(
"toward").
' ';
568 $bankstatic->id = $objp->bankid;
569 $bankstatic->label = $objp->bankref;
570 print $bankstatic->getNomUrl(1,
'');
573 $bankstatic->id = $objp->bankid;
574 $bankstatic->label = $objp->bankref;
575 print
' ('.$langs->trans(
"from").
' ';
576 print $bankstatic->getNomUrl(1,
'');
577 print
' '.$langs->trans(
"toward").
' ';
578 $banklinestatic->fetch($links[$key][
'url_id']);
579 $bankstatic->id = $banklinestatic->fk_account;
580 $bankstatic->label = $banklinestatic->bank_account_label;
581 print $bankstatic->getNomUrl(1,
'transactions');
584 } elseif ($links[$key][
'type'] ==
'company') {
585 $societestatic->id = $links[$key][
'url_id'];
586 $societestatic->name = $links[$key][
'label'];
587 print $societestatic->getNomUrl(1,
'company', 24);
589 } elseif ($links[$key][
'type'] ==
'member') {
590 print
'<a href="'.DOL_URL_ROOT.
'/adherents/card.php?rowid='.$links[$key][
'url_id'].
'">';
591 print
img_object($langs->trans(
'ShowMember'),
'user').
' ';
592 print $links[$key][
'label'];
595 } elseif ($links[$key][
'type'] ==
'user') {
596 print
'<a href="'.DOL_URL_ROOT.
'/user/card.php?id='.$links[$key][
'url_id'].
'">';
597 print
img_object($langs->trans(
'ShowUser'),
'user').
' ';
598 print $links[$key][
'label'];
601 } elseif ($links[$key][
'type'] ==
'sc') {
602 print
'<a href="'.DOL_URL_ROOT.
'/compta/sociales/card.php?id='.$links[$key][
'url_id'].
'">';
603 print
img_object($langs->trans(
'ShowBill'),
'bill').
' ';
604 print $langs->trans(
"SocialContribution");
608 print
'<a href="'.$links[$key][
'url'].$links[$key][
'url_id'].
'">';
609 print $links[$key][
'label'];
617 $sql =
"SELECT label";
618 $sql .=
" FROM ".MAIN_DB_PREFIX.
"bank_categ as ct";
619 $sql .=
", ".MAIN_DB_PREFIX.
"bank_class as cl";
620 $sql .=
" WHERE ct.rowid = cl.fk_categ";
621 $sql .=
" AND ct.entity = ".((int) $conf->entity);
622 $sql .=
" AND cl.lineid = ".((int) $objp->rowid);
624 $resc = $db->query($sql);
626 $numc = $db->num_rows($resc);
628 if ($numc && !$newline) {
631 while ($ii < $numc) {
632 $objc = $db->fetch_object($resc);
633 print
"<br>- <i>".$objc->label.
"</i>";
643 if ($objp->amount < 0) {
644 $totald = $totald + abs($objp->amount);
645 print
'<td class="nowrap right">'.price($objp->amount * -1).
"</td><td> </td>\n";
647 $totalc = $totalc + abs($objp->amount);
648 print
'<td> </td><td class="nowrap right">'.price($objp->amount).
"</td>\n";
651 print
'<td class="nowrap right">'.price(
price2num($total,
'MT')).
"</td>\n";
653 if ($user->rights->banque->modifier || $user->rights->banque->consolidate) {
654 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='.$numref).
'">';
658 print
"<td class=\"center\"> </td>";
667 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>";
671 print
"<td class=\"right\" colspan=\"3\"> </td><td colspan=\"3\"><b>".$langs->trans(
"EndBankBalance").
" :</b></td>";
672 print
'<td class="right"><b>'.price(
price2num($total,
'MT')).
"</b></td><td> </td>";
677 $urlajax = DOL_URL_ROOT.
'/core/ajax/bankconciliate.php?token='.
currentToken();
679 <script type="text/javascript">
681 $("a.ajaxforbankoperationchange").each(function(){
682 var current = $(this);
683 current.click(function()
685 console.log("We click on ajaxforbankoperationchange");
686 var url = "'.$urlajax.
'&"+current.attr("href").split("?")[1];
687 $.get(url, function(data)
691 current.parent().parent().find(".spanforajaxedit").replaceWith(data);
if(!defined('NOREQUIRESOC')) if(!defined('NOREQUIRETRAN')) if(!defined('NOTOKENRENEWAL')) if(!defined('NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined('NOREQUIREAJAX')) llxHeader()
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.
Classe permettant la gestion des paiements des charges La tva collectee n'est calculee que sur les fa...
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...)
Put here description of your class.
if(isModEnabled('facture') &&!empty($user->rights->facture->lire)) if((isModEnabled('fournisseur') &&empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) && $user->hasRight("fournisseur", "facture", "lire"))||(isModEnabled('supplier_invoice') && $user->hasRight("supplier_invoice", "lire"))) if(isModEnabled('don') &&!empty($user->rights->don->lire)) if(isModEnabled('tax') &&!empty($user->rights->tax->charges->lire)) if(isModEnabled('facture') &&isModEnabled('commande') && $user->hasRight("commande", "lire") &&empty($conf->global->WORKFLOW_DISABLE_CREATE_INVOICE_FROM_ORDER)) $resql
Social contributions to pay.
if($cancel &&! $id) if($action=='add' &&! $cancel) if($action=='delete') if($id) $form
Actions.
dol_banner_tab($object, $paramid, $morehtml='', $shownav=1, $fieldid='rowid', $fieldref='ref', $morehtmlref='', $moreparam='', $nodbprefix=0, $morehtmlleft='', $morehtmlstatus='', $onlybanner=0, $morehtmlright='')
Show tab footer of a card.
load_fiche_titre($titre, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='')
Load a title with picto.
dol_get_fiche_head($links=array(), $active='', $title='', $notab=0, $picto='', $pictoisfullpath=0, $morehtmlright='', $morecss='', $limittoshow=0, $moretabssuffix='')
Show tabs of a record.
dol_escape_htmltag($stringtoescape, $keepb=0, $keepn=0, $noescapetags='', $escapeonlyhtmltags=0)
Returns text escaped for inclusion in HTML alt or title tags, or into values of HTML input fields.
price2num($amount, $rounding='', $option=0)
Function that return a number with universal decimal format (decimal separator is '.
dol_print_error($db='', $error='', $errors=null)
Displays error message system with all the information to facilitate the diagnosis and the escalation...
img_object($titlealt, $picto, $moreatt='', $pictoisfullpath=false, $srconly=0, $notitle=0)
Show a picto called object_picto (generic function)
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.
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.
print_barre_liste($titre, $page, $file, $options='', $sortfield='', $sortorder='', $morehtmlcenter='', $num=-1, $totalnboflines='', $picto='generic', $pictoisfullpath=0, $morehtmlright='', $morecss='', $limit=-1, $hideselectlimit=0, $hidenavigation=0, $pagenavastextinput=0, $morehtmlrightbeforearrow='')
Print a title with navigation controls for pagination.
GETPOSTISSET($paramname)
Return true if we are in a context of submitting the parameter $paramname from a POST of a form.
img_edit_add($titlealt='default', $other='')
Show logo +.
img_edit($titlealt='default', $float=0, $other='')
Show logo editer/modifier 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 -.
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.