dolibarr 25.0.0-alpha
bank.lib.php
Go to the documentation of this file.
1<?php
2/* Copyright (C) 2006-2016 Laurent Destailleur <eldy@users.sourceforge.net>
3 * Copyright (C) 2012 Regis Houssin <regis.houssin@inodbox.com>
4 * Copyright (C) 2015 Alexandre Spangaro <alexandre@inovea-conseil.com>
5 * Copyright (C) 2016 Juanjo Menent <jmenent@2byte.es>
6 * Copyright (C) 2019 Nicolas ZABOURI <info@inovea-conseil.com>
7 * Copyright (C) 2021 Ferran Marcet <fmarcet@2byte.es>
8 * Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
9 * Copyright (C) 2024-2026 Frédéric France <frederic.france@free.fr>
10 * Copyright (C) 2026 Solution Libre SAS <contact@solution-libre.fr>
11 *
12 * This program is free software; you can redistribute it and/or modify
13 * it under the terms of the GNU General Public License as published by
14 * the Free Software Foundation; either version 3 of the License, or
15 * (at your option) any later version.
16 *
17 * This program is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
21 *
22 * You should have received a copy of the GNU General Public License
23 * along with this program. If not, see <https://www.gnu.org/licenses/>.
24 * or see https://www.gnu.org/
25 */
26
41{
42 global $db, $langs, $conf, $user;
43
44 $h = 0;
45 $head = array();
46
47 $head[$h][0] = dolBuildUrl(DOL_URL_ROOT.'/compta/bank/card.php', ['id' => $object->id]);
48 $head[$h][1] = $langs->trans("BankAccount");
49 $head[$h][2] = 'bankname';
50 $h++;
51
52 $head[$h][0] = dolBuildUrl(DOL_URL_ROOT.'/compta/bank/bankentries_list.php', ['id' => $object->id]);
53 $head[$h][1] = $langs->trans("BankTransactions");
54 $head[$h][2] = 'journal';
55 $h++;
56
57 if ($object->canBeConciliated() > 0) {
58 $allowautomaticconciliation = getDolGlobalBool('MAIN_ALLOW_AUTOMATIC_CONCILIATION'); // TODO
59 $titletoconciliatemanual = $langs->trans("Conciliate");
60 $titletoconciliateauto = $langs->trans("Conciliate");
61 if ($allowautomaticconciliation) {
62 $titletoconciliatemanual .= ' ('.$langs->trans("Manual").')';
63 $titletoconciliateauto .= ' ('.$langs->trans("Auto").')';
64 }
65
66 $param = '';
67
68 // If not cash account and can be reconciliate
69 if ($user->hasRight('banque', 'consolidate')) {
70 $query = [
71 'id' => $object->id,
72 'action' => 'reconcile',
73 'sortfield' => 'b.datev,b.dateo,b.rowid',
74 'sortorder' => 'asc,asc,asc',
75 'search_conciliated' => 0,
76 'search_account' => $object->id,
77 ];
78 $head[$h][0] = dolBuildUrl(DOL_URL_ROOT.'/compta/bank/bankentries_list.php', $query).$param;
79 $head[$h][1] = $titletoconciliatemanual;
80 $head[$h][2] = 'reconcile';
81 $h++;
82 }/* else {
83 $buttonreconcile = '<a class="butActionRefused classfortooltip" title="'.$langs->trans("NotEnoughPermissions").'" href="#">'.$titletoconciliatemanual.'</a>';
84 }*/
85
86 if ($allowautomaticconciliation) {
87 // If not cash account and can be reconciliate
88 if ($user->hasRight('banque', 'consolidate')) {
89 $newparam = $param;
90 $newparam = preg_replace('/search_conciliated=\d+/i', '', $newparam);
91
92 $head[$h][0] = DOL_URL_ROOT."/compta/bank/bankentries_list.php?id=".$object->id.'&action=reconcile&sortfield=b.datev,b.dateo,b.rowid&sortorder=asc,asc,asc&search_conciliated=0&search_account='.$object->id.$newparam;
93 $head[$h][1] = $titletoconciliateauto;
94 $head[$h][2] = 'reconcileauto';
95 $h++;
96
97 //$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>';
98 }/* else {
99 $buttonreconcile .= ' <a class="butActionRefused" style="margin-bottom: 5px !important; margin-top: 5px !important" title="'.$langs->trans("NotEnoughPermissions").'" href="#">'.$titletoconciliateauto.'</a>';
100 }*/
101 }
102 }
103
104 if ($object->type != Account::TYPE_CASH || getDolGlobalString('BANK_CAN_RECONCILIATE_CASHACCOUNT')) {
105 $nbReceipts = 0;
106
107 // List of all standing receipts
108 $sql = "SELECT COUNT(DISTINCT(b.num_releve)) as nb";
109 $sql .= " FROM ".MAIN_DB_PREFIX."bank as b";
110 $sql .= " WHERE b.fk_account = ".((int) $object->id);
111
112 $resql = $db->query($sql);
113 if ($resql) {
114 $obj = $db->fetch_object($resql);
115 if ($obj) {
116 $nbReceipts = $obj->nb;
117 }
118 $db->free($resql);
119 }
120
121 $head[$h][0] = dolBuildUrl(DOL_URL_ROOT.'/compta/bank/releve.php', ['account' => $object->id]);
122 $head[$h][1] = $langs->trans("AccountStatements");
123 if (($nbReceipts) > 0) {
124 $head[$h][1] .= '<span class="badge marginleftonlyshort">'.($nbReceipts).'</span>';
125 }
126 $head[$h][2] = 'statement';
127 $h++;
128 }
129
130 // Attached files
131 require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
132 require_once DOL_DOCUMENT_ROOT.'/core/class/link.class.php';
133 $upload_dir = $conf->bank->dir_output."/".dol_sanitizeFileName($object->ref);
134 $nbFiles = count(dol_dir_list($upload_dir, 'files', 0, '', '(\.meta|_preview.*\.png)$'));
135 $nbLinks = Link::count($db, $object->element, $object->id);
136 $head[$h][0] = dolBuildUrl(DOL_URL_ROOT.'/compta/bank/document.php', ['account' => $object->id]);
137 $head[$h][1] = $langs->trans("Documents");
138 if (($nbFiles + $nbLinks) > 0) {
139 $head[$h][1] .= '<span class="badge marginleftonlyshort">'.($nbFiles + $nbLinks).'</span>';
140 }
141 $head[$h][2] = 'document';
142 $h++;
143
144 $head[$h][0] = dolBuildUrl(DOL_URL_ROOT.'/compta/bank/annuel.php', ['account' => $object->id]);
145 $head[$h][1] = $langs->trans("Reports");
146 $head[$h][2] = 'annual';
147 $h++;
148
149 $head[$h][0] = dolBuildUrl(DOL_URL_ROOT.'/compta/bank/treso.php', ['account' => $object->id]);
150 $head[$h][1] = $langs->trans("PlannedTransactions");
151 $head[$h][2] = 'cash';
152 $h++;
153
154 // Show more tabs from modules
155 // Entries must be declared in modules descriptor with line
156 // $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab
157 // $this->tabs = array('entity:-tabname); to remove a tab
158 complete_head_from_modules($conf, $langs, $object, $head, $h, 'bank');
159
160 /*$head[$h][0] = DOL_URL_ROOT . "/compta/bank/info.php?id=" . $object->id;
161 $head[$h][1] = $langs->trans("Info");
162 $head[$h][2] = 'info';
163 $h++;*/
164
165 complete_head_from_modules($conf, $langs, $object, $head, $h, 'bank', 'remove');
166
167 return $head;
168}
169
177{
178 global $db, $langs, $conf, $user;
179
180 $h = 0;
181 $head = array();
182
183 $head[$h][0] = dolBuildUrl(DOL_URL_ROOT.'/compta/bank/annuel.php', ['account' => $object->id]);
184 $head[$h][1] = $langs->trans("IOMonthlyReporting");
185 $head[$h][2] = 'annual';
186 $h++;
187
188 $head[$h][0] = dolBuildUrl(DOL_URL_ROOT.'/compta/bank/graph.php', ['account' => $object->id]);
189 $head[$h][1] = $langs->trans("Graph");
190 $head[$h][2] = 'graph';
191 $h++;
192
193 return $head;
194}
202{
203 global $langs, $conf, $extrafields;
204
205 $langs->loadLangs(array("compta"));
206
207 $extrafields->fetch_name_optionals_label('bank_account');
208 $extrafields->fetch_name_optionals_label('bank');
209 $extrafields->fetch_name_optionals_label('paiement');
210 $extrafields->fetch_name_optionals_label('payment_various');
211
212 $h = 0;
213 $head = array();
214
215 $head[$h][0] = dolBuildUrl(DOL_URL_ROOT.'/admin/bank.php');
216 $head[$h][1] = $langs->trans("Miscellaneous");
217 $head[$h][2] = 'general';
218 $h++;
219
220 $head[$h][0] = dolBuildUrl(DOL_URL_ROOT.'/admin/chequereceipts.php');
221 $head[$h][1] = $langs->trans("CheckReceiptShort");
222 $head[$h][2] = 'checkreceipts';
223 $h++;
224
225
226 // Show more tabs from modules
227 // Entries must be declared in modules descriptor with line
228 // $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab
229 // $this->tabs = array('entity:-tabname); to remove a tab
230 complete_head_from_modules($conf, $langs, $object, $head, $h, 'bank_admin');
231
232 $head[$h][0] = dolBuildUrl(DOL_URL_ROOT.'/admin/extrafields.php', array('elementtype' => 'bank_account'));
233 $head[$h][1] = $langs->trans("ExtraFields").' ('.$langs->trans("BankAccounts").')';
234 $nbExtrafields = $extrafields->attributes['bank_account']['count'];
235 if ($nbExtrafields > 0) {
236 $head[$h][1] .= '<span class="badge marginleftonlyshort">'.$nbExtrafields.'</span>';
237 }
238 $head[$h][2] = 'attributes';
239 $h++;
240
241 $head[$h][0] = dolBuildUrl(DOL_URL_ROOT.'/admin/extrafields.php', array('elementtype' => 'bank'));
242 $head[$h][1] = $langs->trans("ExtraFields").' ('.$langs->trans("BankTransactions").')';
243 $nbExtrafields = $extrafields->attributes['bank']['count'];
244 if ($nbExtrafields > 0) {
245 $head[$h][1] .= '<span class="badge marginleftonlyshort">'.$nbExtrafields.'</span>';
246 }
247 $head[$h][2] = 'bankline_extrafields';
248 $h++;
249
250 $head[$h][0] = dolBuildUrl(DOL_URL_ROOT.'/admin/extrafields.php', array('elementtype' => 'paiement'));
251 $head[$h][1] = $langs->trans("ExtraFields").' ('.$langs->trans("Payments").')';
252 $nbExtrafields = $extrafields->attributes['paiement']['count'];
253 if ($nbExtrafields > 0) {
254 $head[$h][1] .= '<span class="badge marginleftonlyshort">'.$nbExtrafields.'</span>';
255 }
256 $head[$h][2] = 'bank_payments_extrafields';
257 $h++;
258
259 $head[$h][0] = dolBuildUrl(DOL_URL_ROOT.'/admin/extrafields.php', array('elementtype' => 'payment_various'));
260 $head[$h][1] = $langs->trans("ExtraFields").' ('.$langs->trans("VariousPayments").')';
261 $nbExtrafields = $extrafields->attributes['payment_various']['count'];
262 if ($nbExtrafields > 0) {
263 $head[$h][1] .= '<span class="badge marginleftonlyshort">'.$nbExtrafields.'</span>';
264 }
265 $head[$h][2] = 'bank_various_payment_extrafields';
266 $h++;
267
268 complete_head_from_modules($conf, $langs, $object, $head, $h, 'bank_admin', 'remove');
269
270 return $head;
271}
272
273
282{
283 global $langs, $conf, $db;
284 $h = 0;
285 $head = array();
286
287 $head[$h][0] = dolBuildUrl(DOL_URL_ROOT.'/compta/bank/releve.php', ['account' => $object->id, 'num' => $num]);
288 $head[$h][1] = $langs->trans("AccountStatement");
289 $head[$h][2] = 'statement';
290 $h++;
291
292 // Attached files
293 require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
294 require_once DOL_DOCUMENT_ROOT.'/core/class/link.class.php';
295 $upload_dir = $conf->bank->dir_output."/".$object->id.'/statement/'.dol_sanitizeFileName($num);
296 $nbFiles = count(dol_dir_list($upload_dir, 'files', 0, '', '(\.meta|_preview.*\.png)$'));
297 $nbLinks = Link::count($db, $object->element, $object->id);
298
299 $head[$h][0] = dolBuildUrl(DOL_URL_ROOT.'/compta/bank/account_statement_document.php', ['account' => $object->id, 'num' => $num]);
300 $head[$h][1] = $langs->trans("Documents");
301 if (($nbFiles + $nbLinks) > 0) {
302 $head[$h][1] .= '<span class="badge marginleftonlyshort">'.($nbFiles + $nbLinks).'</span>';
303 }
304 $head[$h][2] = 'document';
305 $h++;
306
307 complete_head_from_modules($conf, $langs, $object, $head, $h, 'account_statement');
308
309 complete_head_from_modules($conf, $langs, $object, $head, $h, 'account_statement', 'remove');
310
311 return $head;
312}
313
314
322{
323 global $db, $langs, $conf;
324
325 $h = 0;
326 $head = array();
327
328 $head[$h][0] = DOL_URL_ROOT.'/compta/bank/various_payment/card.php?id='.$object->id;
329 $head[$h][1] = $langs->trans("VariousPayment");
330 $head[$h][2] = 'card';
331 $h++;
332
333 // Show more tabs from modules
334 // Entries must be declared in modules descriptor with line
335 // $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab
336 // $this->tabs = array('entity:-tabname); to remove a tab
337 complete_head_from_modules($conf, $langs, $object, $head, $h, 'various_payment');
338
339 require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
340 require_once DOL_DOCUMENT_ROOT.'/core/class/link.class.php';
341 $upload_dir = $conf->bank->dir_output."/various_payment/".dol_sanitizeFileName($object->ref);
342 $upload_dirold = $conf->bank->dir_output."/".dol_sanitizeFileName($object->ref);
343 $nbFiles = count(dol_dir_list($upload_dir, 'files', 0, '', '(\.meta|_preview.*\.png)$'));
344 if (!empty($upload_dirold) && dol_is_dir($upload_dirold)) {
345 $nbFiles += count(dol_dir_list($upload_dirold, 'files', 0, '', '(\.meta|_preview.*\.png)$'));
346 }
347 $nbLinks = Link::count($db, $object->element, $object->id);
348 $head[$h][0] = DOL_URL_ROOT.'/compta/bank/various_payment/document.php?id='.$object->id;
349 $head[$h][1] = $langs->trans('Documents');
350 if (($nbFiles + $nbLinks) > 0) {
351 $head[$h][1] .= '<span class="badge marginleftonlyshort">'.($nbFiles + $nbLinks).'</span>';
352 }
353 $head[$h][2] = 'documents';
354 $h++;
355
356 $head[$h][0] = DOL_URL_ROOT.'/compta/bank/various_payment/info.php?id='.$object->id;
357 $head[$h][1] = $langs->trans("Info");
358 $head[$h][2] = 'info';
359 $h++;
360
361 complete_head_from_modules($conf, $langs, $object, $head, $h, 'various_payment', 'remove');
362
363 return $head;
364}
365
373function checkSwiftForAccount($account = null, $swift = null)
374{
375 if ($account == null && $swift == null) {
376 return false;
377 } elseif ($swift == null) {
378 $swift = $account->bic;
379 }
380 if (preg_match("/^([a-zA-Z]){4}([a-zA-Z]){2}([0-9a-zA-Z]){2}([0-9a-zA-Z]{3})?$/", $swift)) {
381 return true;
382 } else {
383 return false;
384 }
385}
386
394function checkIbanForAccount($account = null, $ibantocheck = null)
395{
396 if ($account == null && $ibantocheck == null) {
397 return false;
398 } elseif ($ibantocheck == null) {
399 $ibantocheck = ($account->iban ? $account->iban : $account->iban_prefix); // iban or iban_prefix for backward compatibility
400 }
401 require_once DOL_DOCUMENT_ROOT.'/includes/php-iban/oophp-iban.php';
402
403 $iban = new PHP_IBAN\IBAN($ibantocheck);
404 $check = $iban->Verify();
405
406 if ($check) {
407 return true;
408 } else {
409 return false;
410 }
411}
412
420{
421 if ($account->getCountryCode() == 'FR') {
422 require_once DOL_DOCUMENT_ROOT.'/includes/php-iban/oophp-iban.php';
423 $ibantoprint = preg_replace('/[^a-zA-Z0-9]/', '', empty($account->iban) ? '' : $account->iban);
424 $iban = new PHP_IBAN\IBAN($ibantoprint);
425 return $iban->HumanFormat();
426 }
427
428 return $account->iban;
429}
430
437function checkBanForAccount($account)
438{
439 $country_code = $account->getCountryCode();
440
441 // For compatibility between
442 // account of type CompanyBankAccount class (we use number, cle_rib)
443 // account of type Account class (we use num_compte, cle)
444 if (empty($account->number)) {
445 $account->number = $account->num_compte; // @phan-suppress-current-line PhanUndeclaredProperty
446 }
447 if (empty($account->cle)) {
448 $account->cle = $account->cle_rib;
449 }
450
451 dol_syslog("bank.lib::checkBanForAccount account->code_banque=".$account->code_banque." account->code_guichet=".$account->code_guichet." account->number=".$account->number." account->cle=".$account->cle." account->iban=".$account->iban." country_code=".$country_code, LOG_DEBUG);
452
453 if ($country_code == 'FR') { // France rules
454 $coef = array(62, 34, 3);
455 // Concatenate the code parts
456 $rib = strtolower(trim($account->code_banque).trim($account->code_guichet).trim($account->number).trim($account->cle));
457 // Replace any letters with numbers.
458 //$rib = strtr($rib, "abcdefghijklmnopqrstuvwxyz","12345678912345678912345678"); // don't work
459 $rib = strtr($rib, "abcdefghijklmnopqrstuvwxyz", "12345678912345678923456789");
460 // Separation du rib en 3 groups de 7 + 1 group de 2.
461 // Multiplication of each group by the coefficients in the array.
462
463 $s = 0;
464 for ($i = 0; $i < 3; $i++) {
465 $code = substr($rib, 7 * $i, 7);
466 $s += ((int) $code) * $coef[$i];
467 }
468 // Subtract modulo 97 of $s from 97 to get the key
469 $cle_rib = 97 - ($s % 97);
470 if ($cle_rib == $account->cle) {
471 return true;
472 }
473 return false;
474 }
475
476 /*
477 if ($country_code == 'BE') { // Belgian rules
478 }
479 */
480
481 if ($country_code == 'DZ') { // Algerian rules (Instruction n° 06-2004 Bank of Algeria)
482 $code_banque = trim((string) $account->code_banque);
483 $code_guichet = trim((string) $account->code_guichet);
484 $number = trim((string) $account->number);
485 $cle = trim((string) $account->cle);
486
487 // Backward compatibility if full 20-digit RIB was entered into a single field
488 if (empty($code_banque) && empty($code_guichet) && empty($cle) && preg_match('/^[0-9]{20}$/', $number)) {
489 $code_banque = substr($number, 0, 3);
490 $code_guichet = substr($number, 3, 5);
491 $cle = substr($number, 18, 2);
492 $number = substr($number, 8, 10);
493 }
494
495 // Ensure proper zero-padding
496 if (is_numeric($code_banque) && strlen($code_banque) < 3) {
497 $code_banque = sprintf('%03s', $code_banque);
498 }
499 if (is_numeric($code_guichet) && strlen($code_guichet) < 5) {
500 $code_guichet = sprintf('%05s', $code_guichet);
501 }
502 if (is_numeric($number) && strlen($number) < 10) {
503 $number = sprintf('%010s', $number);
504 }
505 if (is_numeric($cle) && strlen($cle) < 2) {
506 $cle = sprintf('%02s', $cle);
507 }
508
509 $rib18 = $code_banque.$code_guichet.$number;
510
511 if (!preg_match('/^[0-9]{18}$/', $rib18) || !preg_match('/^[0-9]{2}$/', $cle)) {
512 return false;
513 }
514
515 // Calculate modulo 97 of ($rib18 * 100)
516 $remainder = 0;
517 $rib20 = $rib18.'00';
518 $len = strlen($rib20);
519 for ($i = 0; $i < $len; $i++) {
520 $remainder = ($remainder * 10 + (int) $rib20[$i]) % 97;
521 }
522 $calculated_key = sprintf('%02d', 97 - $remainder);
523
524 return ($calculated_key === $cle);
525 }
526
527 if ($country_code == 'ES') { // Spanish rules
528 $CCC = strtolower(trim($account->number));
529 $rib = strtolower(trim($account->code_banque).trim($account->code_guichet));
530 $cle_rib = strtolower(checkES($rib, $CCC));
531 if ($cle_rib == strtolower($account->cle)) {
532 return true;
533 }
534 return false;
535 }
536 if ($country_code == 'AU') { // Australian
537 if (strlen($account->code_banque) > 7) {
538 return false; // Should be 6 but can be 123-456
539 } elseif (strlen($account->code_banque) < 6) {
540 return false; // Should be 6
541 } else {
542 return true;
543 }
544 }
545
546 // No particular rule
547 // If account is CompanyBankAccount class, we use number
548 // If account is Account class, we use num_compte
549 if (empty($account->number)) {
550 return false;
551 }
552
553 return true;
554}
555
556
557
565function checkES($IentOfi, $InumCta)
566{
567 if (empty($IentOfi) || empty($InumCta) || strlen($IentOfi) != 8 || strlen($InumCta) != 10) {
568 $keycontrol = "";
569 return $keycontrol;
570 }
571
572 $ccc = $IentOfi.$InumCta;
573 $numbers = "1234567890";
574
575 $i = 0;
576
577 while ($i <= strlen($ccc) - 1) {
578 if (strpos($numbers, substr($ccc, $i, 1)) === false) {
579 $keycontrol = "";
580 return $keycontrol;
581 }
582 $i++;
583 }
584
585 $values = array(1, 2, 4, 8, 5, 10, 9, 7, 3, 6);
586 $sum = 0;
587
588 for ($i = 2; $i < 10; $i++) {
589 $sum += $values[$i] * (int) substr($IentOfi, $i - 2, 1);
590 }
591
592 $key = 11 - $sum % 11;
593
594 if ($key == 10) {
595 $key = 1;
596 }
597 if ($key == 11) {
598 $key = 0;
599 }
600
601 $keycontrol = $key;
602
603 $sum = 0;
604
605 for ($i = 0; $i < 10; $i++) {
606 $sum += $values[$i] * (int) substr($InumCta, $i, 1); //int to cast result of substr to a number
607 }
608
609 $key = 11 - $sum % 11;
610
611 if ($key == 10) {
612 $key = 1;
613 }
614 if ($key == 11) {
615 $key = 0;
616 }
617
618 $keycontrol .= $key;
619 return $keycontrol;
620}
if(! $sortfield) if(! $sortorder) $object
Definition account.php:100
checkIbanForAccount($account=null, $ibantocheck=null)
Check IBAN number information for a bank account.
Definition bank.lib.php:394
checkES($IentOfi, $InumCta)
Returns the key for Spanish Banks Accounts.
Definition bank.lib.php:565
bank_report_prepare_head(Account $object)
Prepare array with list of tabs for bank report.
Definition bank.lib.php:176
account_statement_prepare_head($object, $num)
Prepare array with list of tabs.
Definition bank.lib.php:281
checkBanForAccount($account)
Check account number information for a bank account.
Definition bank.lib.php:437
getIbanHumanReadable(Account $account)
Returns the iban human readable.
Definition bank.lib.php:419
bank_prepare_head(Account $object)
Prepare array with list of tabs.
Definition bank.lib.php:40
bank_admin_prepare_head($object=null)
Prepare array with list of tabs.
Definition bank.lib.php:201
various_payment_prepare_head($object)
Prepare array with list of tabs.
Definition bank.lib.php:321
checkSwiftForAccount($account=null, $swift=null)
Check SWIFT information for a bank account.
Definition bank.lib.php:373
if(!isModEnabled('ai')||!getDolGlobalString('AI_ASSISTANT_ENABLED')) global $conf
The main.inc.php has been included so the following variable are now defined:
Class to manage bank accounts.
const TYPE_CASH
Cash account.
dol_dir_list($utf8_path, $types="all", $recursive=0, $filter="", $excludefilter=null, $sortcriteria="name", $sortorder=SORT_ASC, $mode=0, $nohook=0, $relativename="", $donotfollowsymlinks=0, $nbsecondsold=0)
Scan a directory and return a list of files/directories.
Definition files.lib.php:66
dol_is_dir($folder)
Test if filename is a directory.
dolBuildUrl($url, $params=[], $addtoken=false, $anchor='')
Return path of url.
dol_sanitizeFileName($str, $newstr='_', $unaccent=1, $includequotes=0, $allowdash=0)
Clean a string to use it as a file name.
getDolGlobalBool($key, $default=false)
Return a Dolibarr global constant boolean value.
complete_head_from_modules($conf, $langs, $object, &$head, &$h, $type, $mode='add', $filterorigmodule='')
Complete or removed entries into a head array (used to build tabs).
getDolGlobalString($key, $default='')
Return a Dolibarr global constant string value.
dol_syslog($message, $level=LOG_INFO, $ident=0, $suffixinfilename='', $restricttologhandler='', $logcontext=null)
Write log message into outputs.