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);
118 $contextpage =
'banktransactionlist'.(empty($object->ref) ?
'' :
'-'.$object->id);
123 if ($rel ==
'prev') {
125 $sql =
"SELECT DISTINCT(b.num_releve) as num";
126 $sql .=
" FROM ".MAIN_DB_PREFIX.
"bank as b";
127 $sql .=
" WHERE b.num_releve < '".$db->escape($numref).
"'";
128 $sql .=
" AND b.fk_account = ".((int) $object->id);
129 $sql .=
" ORDER BY b.num_releve DESC";
131 dol_syslog(
"htdocs/compta/bank/releve.php", LOG_DEBUG);
132 $resql = $db->query(
$sql);
134 $numrows = $db->num_rows($resql);
136 $obj = $db->fetch_object($resql);
141 } elseif ($rel ==
'next') {
143 $sql =
"SELECT DISTINCT(b.num_releve) as num";
144 $sql .=
" FROM ".MAIN_DB_PREFIX.
"bank as b";
145 $sql .=
" WHERE b.num_releve > '".$db->escape($numref).
"'";
146 $sql .=
" AND b.fk_account = ".((int) $object->id);
147 $sql .=
" ORDER BY b.num_releve ASC";
149 dol_syslog(
"htdocs/compta/bank/releve.php", LOG_DEBUG);
150 $resql = $db->query(
$sql);
152 $numrows = $db->num_rows($resql);
154 $obj = $db->fetch_object($resql);
165 $sql =
"SELECT b.rowid, b.dateo as do, b.datev as dv,";
166 $sql .=
" b.amount, b.label, b.rappro, b.num_releve, b.num_chq, b.fk_type,";
167 $sql .=
" b.fk_bordereau,";
169 $sql .=
" ba.rowid as bankid, ba.ref as bankref, ba.label as banklabel";
170 $sql .=
" FROM ".MAIN_DB_PREFIX.
"bank_account as ba";
171 $sql .=
", ".MAIN_DB_PREFIX.
"bank as b";
172 $sql .=
' LEFT JOIN '.MAIN_DB_PREFIX.
'bordereau_cheque as bc ON bc.rowid=b.fk_bordereau';
173 $sql .=
" WHERE b.num_releve='".$db->escape($numref).
"'";
174 if (empty($numref)) {
175 $sql .=
" OR b.num_releve is null";
177 $sql .=
" AND b.fk_account = ".((int) $object->id);
178 $sql .=
" AND b.fk_account = ba.rowid";
179 $sql .= $db->order(
"b.datev, b.datec",
"ASC");
181 $sqlrequestforbankline =
$sql;
189 if ($action ==
'confirm_editbankreceipt' && !empty($oldbankreceipt) && !empty($newbankreceipt)) {
191 $sqlupdate =
"UPDATE ".MAIN_DB_PREFIX.
"bank SET num_releve = '".$db->escape($newbankreceipt).
"'";
192 $sqlupdate .=
" WHERE num_releve = '".$db->escape($oldbankreceipt).
"' AND fk_account = ".((int) $id);
193 $result = $db->query($sqlupdate);
206 $societestatic =
new Societe($db);
211 $paymentvatstatic =
new Tva($db);
212 $bankstatic =
new Account($db);
221 if (!empty($contextpage) && $contextpage != $_SERVER[
"PHP_SELF"]) {
222 $param .=
'&contextpage='.$contextpage;
224 if ($limit > 0 && $limit != $conf->liste_limit) {
225 $param .=
'&limit='.$limit;
228 $param .=
'&id='.urlencode($id);
231 if (empty($numref)) {
232 $title = $object->ref.
' - '.$langs->trans(
"AccountStatements");
235 $title = $langs->trans(
"FinancialAccount").
' - '.$langs->trans(
"AccountStatements");
243 if (empty($numref)) {
248 $sql =
"SELECT DISTINCT(b.num_releve) as numr";
249 $sql .=
" FROM ".MAIN_DB_PREFIX.
"bank as b";
250 $sql .=
" WHERE b.fk_account = ".((int) $object->id);
251 $sql .= $db->order($sortfield, $sortorder);
256 $result = $db->query(
$sql);
257 $totalnboflines = $db->num_rows($result);
260 $sql .= $db->plimit($conf->liste_limit + 1, $offset);
262 $result = $db->query(
$sql);
264 $numrows = $db->num_rows($result);
269 print
dol_get_fiche_head($head,
'statement', $langs->trans(
"FinancialAccount"), 0,
'account');
271 $linkback =
'<a href="'.DOL_URL_ROOT.
'/compta/bank/list.php?restore_lastsearch_values=1">'.$langs->trans(
"BackToList").
'</a>';
275 dol_banner_tab($object,
'ref', $linkback, 1,
'ref',
'ref', $morehtmlref,
'', 0,
'',
'', 1);
280 print
'<div class="tabsAction">';
282 if ($object->canBeConciliated() > 0) {
283 $allowautomaticconciliation =
false;
284 $titletoconciliatemanual = $langs->trans(
"Conciliate");
285 $titletoconciliateauto = $langs->trans(
"Conciliate");
286 if ($allowautomaticconciliation) {
287 $titletoconciliatemanual .=
' ('.$langs->trans(
"Manual").
')';
288 $titletoconciliateauto .=
' ('.$langs->trans(
"Auto").
')';
292 if ($user->rights->banque->consolidate) {
293 $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>';
295 $buttonreconcile =
'<a class="butActionRefused classfortooltip" title="'.$langs->trans(
"NotEnoughPermissions").
'" href="#">'.$titletoconciliatemanual.
'</a>';
299 if ($allowautomaticconciliation) {
301 if ($user->rights->banque->consolidate) {
303 $newparam = preg_replace(
'/search_conciliated=\d+/i',
'', $newparam);
304 $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>';
306 $buttonreconcile .=
' <a class="butActionRefused" style="margin-bottom: 5px !important; margin-top: 5px !important" title="'.$langs->trans(
"NotEnoughPermissions").
'" href="#">'.$titletoconciliateauto.
'</a>';
310 print $buttonreconcile;
316 print_barre_liste(
'', $page, $_SERVER[
"PHP_SELF"],
"&account=".$object->id, $sortfield, $sortorder,
'', $numrows, $totalnboflines,
'');
318 print
'<form name="aaa" action="'.$_SERVER[
"PHP_SELF"].
'" method="POST">';
319 print
'<input type="hidden" name="token" value="'.newToken().
'">';
320 print
'<input type="hidden" name="action" value="confirm_editbankreceipt">';
321 print
'<input type="hidden" name="backtopage" value="'.$backtopage.
'">';
322 print
'<input type="hidden" name="account" value="'.$object->id.
'">';
323 print
'<input type="hidden" name="page" value="'.$page.
'">';
325 print
'<table class="noborder centpercent">';
326 print
'<tr class="liste_titre">';
327 print
'<td>'.$langs->trans(
"Ref").
'</td>';
328 print
'<td class="right">'.$langs->trans(
"InitialBankBalance").
'</td>';
329 print
'<td class="right">'.$langs->trans(
"EndBankBalance").
'</td>';
333 $balancestart = array();
336 while ($i < min($numrows, $conf->liste_limit)) {
337 $objp = $db->fetch_object($result);
339 if (!isset($objp->numr)) {
342 print
'<tr class="oddeven">';
344 if ($action !=
'editbankreceipt' || $objp->numr != $brref) {
345 print
'<a href="releve.php?num='.$objp->numr.
'&account='.$object->id.
'">'.$objp->numr.
'</a>';
347 print
'<input type="hidden" name="oldbankreceipt" value="'.$objp->numr.
'">';
348 print
'<input type="text" name="newbankreceipt" value="'.$objp->numr.
'">';
349 print
'<input type="submit" class="button small" name="actionnewbankreceipt" value="'.$langs->trans(
"Rename").
'">';
350 print
'<input type="submit" class="button button-cancel small" name="cancel" value="'.$langs->trans(
"Cancel").
'">';
355 $sql =
"SELECT sum(b.amount) as amount";
356 $sql .=
" FROM ".MAIN_DB_PREFIX.
"bank as b";
357 $sql .=
" WHERE b.num_releve < '".$db->escape($objp->numr).
"'";
358 $sql .=
" AND b.fk_account = ".((int) $object->id);
359 $resql = $db->query(
$sql);
361 $obj = $db->fetch_object($resql);
362 $balancestart[$objp->numr] = $obj->amount;
365 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>';
368 $sql =
"SELECT sum(b.amount) as amount";
369 $sql .=
" FROM ".MAIN_DB_PREFIX.
"bank as b";
370 $sql .=
" WHERE b.num_releve = '".$db->escape($objp->numr).
"'";
371 $sql .=
" AND b.fk_account = ".((int) $object->id);
372 $resql = $db->query(
$sql);
374 $obj = $db->fetch_object($resql);
375 $content[$objp->numr] = $obj->amount;
378 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>';
380 print
'<td class="center">';
381 if ($user->rights->banque->consolidate && $action !=
'editbankreceipt') {
382 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>';
404 print
dol_get_fiche_head($head,
'statement', $langs->trans(
"AccountStatement"), -1,
'account');
408 $morehtmlright .=
'<div class="pagination"><ul>';
409 $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>';
410 $morehtmlright .=
'<li class="pagination"><span class="active">'.$langs->trans(
"AccountStatement").
" ".$numref.
'</span></li>';
411 $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>';
412 $morehtmlright .=
'</ul></div>';
414 $title = $langs->trans(
"AccountStatement").
' '.$numref.
' - '.$langs->trans(
"BankAccount").
' '.$object->getNomUrl(1,
'receipts');
417 print
'<form method="POST" action="'.$_SERVER[
"PHP_SELF"].
'">';
418 print
'<input type="hidden" name="token" value="'.newToken().
'">';
419 print
'<input type="hidden" name="action" value="add">';
421 print
'<div class="div-table-responsive">';
422 print
'<table class="noborder centpercent">';
423 print
'<tr class="liste_titre">';
424 print
'<td class="center">'.$langs->trans(
"DateOperationShort").
'</td>';
425 print
'<td class="center">'.$langs->trans(
"DateValueShort").
'</td>';
426 print
'<td>'.$langs->trans(
"Type").
'</td>';
427 print
'<td>'.$langs->trans(
"Description").
'</td>';
428 print
'<td class="right" width="60">'.$langs->trans(
"Debit").
'</td>';
429 print
'<td class="right" width="60">'.$langs->trans(
"Credit").
'</td>';
430 print
'<td class="right">'.$langs->trans(
"Balance").
'</td>';
431 print
'<td> </td>';
435 $sql =
"SELECT sum(b.amount) as amount";
436 $sql .=
" FROM ".MAIN_DB_PREFIX.
"bank as b";
437 $sql .=
" WHERE b.num_releve < '".$db->escape($numref).
"'";
438 $sql .=
" AND b.fk_account = ".((int) $object->id);
440 $resql = $db->query(
$sql);
442 $obj = $db->fetch_object($resql);
443 $total = $obj->amount;
448 $sql = $sqlrequestforbankline;
450 $result = $db->query(
$sql);
452 $numrows = $db->num_rows($result);
456 print
'<tr class="oddeven"><td colspan="3"></td>';
457 print
'<td colspan="3"><b>'.$langs->trans(
"InitialBankBalance").
" :</b></td>";
458 print
'<td class="right"><b>'.price($total).
'</b></td><td> </td>';
461 while ($i < $numrows) {
462 $objp = $db->fetch_object($result);
463 $total = $total + $objp->amount;
465 print
'<tr class="oddeven">';
468 print
'<td class="nowrap center">'.dol_print_date($db->jdate($objp->do),
"day").
'</td>';
471 print
'<td valign="center" class="center nowrap">';
472 print
'<span class="spanforajaxedit">'.dol_print_date($db->jdate($objp->dv),
"day").
'</span>';
474 print
'<span class="inline-block">';
475 print
'<a class="ajaxforbankoperationchange reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=dvprev&num='.$numref.
'&account='.$object->id.
'&rowid='.$objp->rowid.
'&dvid='.$objp->rowid.
'">';
477 print
'<a class="ajaxforbankoperationchange reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=dvnext&num='.$numref.
'&account='.$object->id.
'&rowid='.$objp->rowid.
'&dvid='.$objp->rowid.
'">';
483 if ($objp->fk_type ==
'SOLD') {
484 $type_label =
' ';
486 $type_label = ($langs->trans(
"PaymentTypeShort".$objp->fk_type) !=
"PaymentTypeShort".$objp->fk_type) ? $langs->trans(
"PaymentTypeShort".$objp->fk_type) : $objp->fk_type;
489 if ($objp->fk_bordereau > 0) {
490 $remisestatic->id = $objp->fk_bordereau;
491 $remisestatic->ref = $objp->ref;
492 $link =
' '.$remisestatic->getNomUrl(1);
494 print
'<td class="nowrap">'.$type_label.
' '.($objp->num_chq ? $objp->num_chq :
'').$link.
'</td>';
497 print
'<td valign="center">';
498 print
'<a href="'.DOL_URL_ROOT.
'/compta/bank/line.php?rowid='.$objp->rowid.
'&account='.$object->id.
'">';
500 preg_match(
'/\((.+)\)/i', $objp->label, $reg);
501 if ($reg[1] && $langs->trans($reg[1]) != $reg[1]) {
502 print $langs->trans($reg[1]);
512 $links = $object->get_url($objp->rowid);
513 foreach ($links as $key => $val) {
519 if ($links[$key][
'type'] ==
'payment') {
520 $paymentstatic->id = $links[$key][
'url_id'];
521 $paymentstatic->ref = $langs->trans(
"Payment");
522 print
' '.$paymentstatic->getNomUrl(1);
524 } elseif ($links[$key][
'type'] ==
'payment_supplier') {
525 $paymentsupplierstatic->id = $links[$key][
'url_id'];
526 $paymentsupplierstatic->ref = $langs->trans(
"Payment");
527 print
' '.$paymentsupplierstatic->getNomUrl(1);
529 } elseif ($links[$key][
'type'] ==
'payment_sc') {
530 print
'<a href="'.DOL_URL_ROOT.
'/compta/payment_sc/card.php?id='.$links[$key][
'url_id'].
'">';
531 print
' '.img_object($langs->trans(
'ShowPayment'),
'payment').
' ';
532 print $langs->trans(
"SocialContributionPayment");
535 } elseif ($links[$key][
'type'] ==
'payment_vat') {
536 $paymentvatstatic->id = $links[$key][
'url_id'];
537 $paymentvatstatic->ref = $langs->trans(
"Payment");
538 print
' '.$paymentvatstatic->getNomUrl(1);
539 } elseif ($links[$key][
'type'] ==
'payment_salary') {
540 print
'<a href="'.DOL_URL_ROOT.
'/salaries/card.php?id='.$links[$key][
'url_id'].
'">';
541 print
' '.img_object($langs->trans(
'ShowPayment'),
'payment').
' ';
542 print $langs->trans(
"Payment");
545 } elseif ($links[$key][
'type'] ==
'payment_donation') {
546 $paymentdonationstatic->id = $links[$key][
'url_id'];
547 $paymentdonationstatic->ref = $langs->trans(
"Payment");
548 print
' '.$paymentdonationstatic->getNomUrl(1);
550 } elseif ($links[$key][
'type'] ==
'payment_loan') {
551 $paymentloanstatic->id = $links[$key][
'url_id'];
552 $paymentloanstatic->ref = $langs->trans(
"Payment");
553 print
' '.$paymentloanstatic->getNomUrl(1);
555 } elseif ($links[$key][
'type'] ==
'payment_various') {
556 $paymentvariousstatic->id = $links[$key][
'url_id'];
557 $paymentvariousstatic->ref = $langs->trans(
"Payment");
558 print
' '.$paymentvariousstatic->getNomUrl(1);
560 } elseif ($links[$key][
'type'] ==
'banktransfert') {
562 if ($objp->amount > 0) {
563 $banklinestatic->fetch($links[$key][
'url_id']);
564 $bankstatic->id = $banklinestatic->fk_account;
565 $bankstatic->label = $banklinestatic->bank_account_label;
566 print
' ('.$langs->trans(
"from").
' ';
567 print $bankstatic->getNomUrl(1,
'transactions');
568 print
' '.$langs->trans(
"toward").
' ';
569 $bankstatic->id = $objp->bankid;
570 $bankstatic->label = $objp->bankref;
571 print $bankstatic->getNomUrl(1,
'');
574 $bankstatic->id = $objp->bankid;
575 $bankstatic->label = $objp->bankref;
576 print
' ('.$langs->trans(
"from").
' ';
577 print $bankstatic->getNomUrl(1,
'');
578 print
' '.$langs->trans(
"toward").
' ';
579 $banklinestatic->fetch($links[$key][
'url_id']);
580 $bankstatic->id = $banklinestatic->fk_account;
581 $bankstatic->label = $banklinestatic->bank_account_label;
582 print $bankstatic->getNomUrl(1,
'transactions');
585 } elseif ($links[$key][
'type'] ==
'company') {
586 $societestatic->id = $links[$key][
'url_id'];
587 $societestatic->name = $links[$key][
'label'];
588 print $societestatic->getNomUrl(1,
'company', 24);
590 } elseif ($links[$key][
'type'] ==
'member') {
591 print
'<a href="'.DOL_URL_ROOT.
'/adherents/card.php?rowid='.$links[$key][
'url_id'].
'">';
592 print
img_object($langs->trans(
'ShowMember'),
'user').
' ';
593 print $links[$key][
'label'];
596 } elseif ($links[$key][
'type'] ==
'user') {
597 print
'<a href="'.DOL_URL_ROOT.
'/user/card.php?id='.$links[$key][
'url_id'].
'">';
598 print
img_object($langs->trans(
'ShowUser'),
'user').
' ';
599 print $links[$key][
'label'];
602 } elseif ($links[$key][
'type'] ==
'sc') {
603 print
'<a href="'.DOL_URL_ROOT.
'/compta/sociales/card.php?id='.$links[$key][
'url_id'].
'">';
604 print
img_object($langs->trans(
'ShowBill'),
'bill').
' ';
605 print $langs->trans(
"SocialContribution");
609 print
'<a href="'.$links[$key][
'url'].$links[$key][
'url_id'].
'">';
610 print $links[$key][
'label'];
618 $sql =
"SELECT label";
619 $sql .=
" FROM ".MAIN_DB_PREFIX.
"bank_categ as ct";
620 $sql .=
", ".MAIN_DB_PREFIX.
"bank_class as cl";
621 $sql .=
" WHERE ct.rowid = cl.fk_categ";
622 $sql .=
" AND ct.entity = ".((int) $conf->entity);
623 $sql .=
" AND cl.lineid = ".((int) $objp->rowid);
625 $resc = $db->query(
$sql);
627 $numc = $db->num_rows($resc);
629 if ($numc && !$newline) {
632 while ($ii < $numc) {
633 $objc = $db->fetch_object($resc);
634 print
"<br>- <i>".$objc->label.
"</i>";
644 if ($objp->amount < 0) {
645 $totald = $totald + abs($objp->amount);
646 print
'<td class="nowrap right">'.price($objp->amount * -1).
"</td><td> </td>\n";
648 $totalc = $totalc + abs($objp->amount);
649 print
'<td> </td><td class="nowrap right">'.price($objp->amount).
"</td>\n";
652 print
'<td class="nowrap right">'.price(
price2num($total,
'MT')).
"</td>\n";
654 if ($user->rights->banque->modifier || $user->rights->banque->consolidate) {
655 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).
'">';
659 print
"<td class=\"center\"> </td>";
668 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>";
672 print
"<td class=\"right\" colspan=\"3\"> </td><td colspan=\"3\"><b>".$langs->trans(
"EndBankBalance").
" :</b></td>";
673 print
'<td class="right"><b>'.price(
price2num($total,
'MT')).
"</b></td><td> </td>";
678 $urlajax = DOL_URL_ROOT.
'/core/ajax/bankconciliate.php?token='.
currentToken();
680 <script type="text/javascript">
682 $("a.ajaxforbankoperationchange").each(function(){
683 var current = $(this);
684 current.click(function()
686 console.log("We click on ajaxforbankoperationchange");
687 var url = "'.$urlajax.
'&"+current.attr("href").split("?")[1];
688 $.get(url, function(data)
692 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') && $user->hasRight('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') && $user->hasRight('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)) $sql
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='', $dragdropfile=0)
Show tabs of a record.
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.
getDolGlobalInt($key, $default=0)
Return 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.
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 -.
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...
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.