dolibarr 23.0.3
bank.php
Go to the documentation of this file.
1<?php
2/* Copyright (C) 2009 Laurent Destailleur <eldy@users.sourceforge.net>
3 * Copyright (C) 2010-2016 Juanjo Menent <jmenent@2byte.es>
4 * Copyright (C) 2013-2018 Philippe Grand <philippe.grand@atoo-net.com>
5 * Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
6 * Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
7 * Copyright (C) 2024-2025 Frédéric France <frederic.france@free.fr>
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 3 of the License, or
12 * (at your option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License
20 * along with this program. If not, see <https://www.gnu.org/licenses/>.
21 */
22
23
30require '../main.inc.php';
31require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
32require_once DOL_DOCUMENT_ROOT.'/core/lib/bank.lib.php';
33require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
34require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
35require_once DOL_DOCUMENT_ROOT.'/societe/class/companybankaccount.class.php';
36
45// Load translation files required by the page
46$langs->loadLangs(array("admin", "companies", "bills", "other", "banks"));
47
48$action = GETPOST('action', 'aZ09');
49$actionsave = GETPOST('save', 'alpha');
50$value = GETPOST('value', 'alpha');
51$label = GETPOST('label', 'alpha');
52$scandir = GETPOST('scan_dir', 'alpha');
53$type = 'bankaccount';
54
55if (!$user->admin) {
57}
58
59$error = 0;
60
61
62/*
63 * Actions
64 */
65
66if (in_array($action, array('setBANK_DISABLE_DIRECT_INPUT'))) {
67 $constname = preg_replace('/^set/', '', $action);
68 $constvalue = GETPOSTINT('value');
69 $res = dolibarr_set_const($db, $constname, $constvalue, 'yesno', 0, '', $conf->entity);
70 if (!($res > 0)) {
71 $error++;
72 }
73
74 if (!$error) {
75 setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
76 } else {
77 setEventMessages($langs->trans("Error"), null, 'mesgs');
78 }
79}
80
81// Order display of bank account
82if ($action == 'setbankorder') {
83 if (dolibarr_set_const($db, "BANK_SHOW_ORDER_OPTION", GETPOST('value', 'alpha'), 'chaine', 0, '', $conf->entity) > 0) {
84 } else {
85 dol_print_error($db);
86 }
87}
88
89// Auto report last num releve on conciliate
90if ($action == 'setreportlastnumreleve') {
91 if (dolibarr_set_const($db, "BANK_REPORT_LAST_NUM_RELEVE", 1, 'chaine', 0, '', $conf->entity) > 0) {
92 } else {
93 dol_print_error($db);
94 }
95} elseif ($action == 'unsetreportlastnumreleve') {
96 if (dolibarr_set_const($db, "BANK_REPORT_LAST_NUM_RELEVE", 0, 'chaine', 0, '', $conf->entity) > 0) {
97 } else {
98 dol_print_error($db);
99 }
100}
101
102// Colorize movements
103if ($action == 'setbankcolorizemovement') {
104 if (dolibarr_set_const($db, "BANK_COLORIZE_MOVEMENT", 1, 'chaine', 0, '', $conf->entity) > 0) {
105 } else {
106 dol_print_error($db);
107 }
108} elseif ($action == 'unsetbankcolorizemovement') {
109 if (dolibarr_set_const($db, "BANK_COLORIZE_MOVEMENT", 0, 'chaine', 0, '', $conf->entity) > 0) {
110 } else {
111 dol_print_error($db);
112 }
113}
114
115if ($actionsave) {
116 $db->begin();
117
118 $i = 1;
119 $errorsaved = 0;
120 $error = 0;
121
122 // Save colors
123 while ($i <= 2) {
124 $color = GETPOST('BANK_COLORIZE_MOVEMENT_COLOR'.$i, 'alpha');
125 if ($color == '-1') {
126 $color = '';
127 }
128
129 $res = dolibarr_set_const($db, 'BANK_COLORIZE_MOVEMENT_COLOR'.$i, $color, 'chaine', 0, '', $conf->entity);
130 if (!($res > 0)) {
131 $error++;
132 }
133 $i++;
134 }
135
136 if (!$error) {
137 $db->commit();
138 setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
139 } else {
140 $db->rollback();
141 if (empty($errorsaved)) {
142 setEventMessages($langs->trans("Error"), null, 'errors');
143 }
144 }
145}
146
147
148if ($action == 'specimen') {
149 $modele = GETPOST('module', 'alpha');
150
151 if ($modele == 'sepamandate') {
152 $object = new CompanyBankAccount($db);
153 } else {
154 $object = new Account($db);
155 }
156 $object->initAsSpecimen();
157
158 // Search template files
159 $file = '';
160 $classname = '';
161 $dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']);
162 foreach ($dirmodels as $reldir) {
163 $file = dol_buildpath($reldir."core/modules/bank/doc/pdf_".$modele.".modules.php", 0);
164 if (file_exists($file)) {
165 $classname = "pdf_".$modele;
166 break;
167 }
168 }
169
170 if ($classname !== '') {
171 require_once $file;
172
173 $module = new $classname($db);
174 '@phan-var-force ModeleBankAccountDoc $module';
175
176 if ($module->write_file($object, $langs) > 0) {
177 header("Location: ".DOL_URL_ROOT."/document.php?modulepart=bank&file=SPECIMEN.pdf");
178 exit();
179 } else {
180 setEventMessages($module->error, null, 'errors');
181 dol_syslog($module->error, LOG_ERR);
182 }
183 } else {
184 setEventMessages($langs->trans("ErrorModuleNotFound"), null, 'errors');
185 dol_syslog($langs->trans("ErrorModuleNotFound"), LOG_ERR);
186 }
187}
188
189// Activate a model
190if ($action == 'set') {
191 $ret = addDocumentModel($value, $type, $label, $scandir);
192} elseif ($action == 'del') {
193 $ret = delDocumentModel($value, $type);
194 if ($ret > 0) {
195 if (getDolGlobalString('BANKADDON_PDF') == "$value") {
196 dolibarr_del_const($db, 'BANKADDON_PDF', $conf->entity);
197 }
198 }
199} elseif ($action == 'setdoc') {
200 // Set default model
201 if (dolibarr_set_const($db, "BANKADDON_PDF", $value, 'chaine', 0, '', $conf->entity)) {
202 // The constant that was read before the new set
203 // We therefore requires a variable to have a coherent view
204 $conf->global->BANKADDON_PDF = $value;
205 }
206
207 // On active le modele
208 $ret = delDocumentModel($value, $type);
209 if ($ret > 0) {
210 $ret = addDocumentModel($value, $type, $label, $scandir);
211 }
212}
213
214
215
216/*
217 * View
218 */
219
220$form = new Form($db);
221$formother = new FormOther($db);
222
223$dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']);
224
225llxHeader("", $langs->trans("BankSetupModule"), '', '', 0, 0, '', '', '', 'mod-admin page-bank');
226
227$linkback = '<a href="'.dolBuildUrl(DOL_URL_ROOT.'/admin/modules.php', ['restore_lastsearch_values' => 1]).'">'.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').'<span class="hideonsmartphone">'.$langs->trans("BackToModuleList").'</span></a>';
228
229print load_fiche_titre($langs->trans("BankSetupModule"), $linkback, 'title_setup');
230
231print '<form name="bankmovementcolorconfig" action="'.$_SERVER["PHP_SELF"].'" method="post">';
232print '<input type="hidden" name="token" value="'.newToken().'">';
233print '<input type="hidden" name="action" value="save">';
234
235$head = bank_admin_prepare_head(null);
236print dol_get_fiche_head($head, 'general', $langs->trans("BankSetupModule"), -1, 'account');
237
238//Show bank account order
239print load_fiche_titre($langs->trans("BankOrderShow"), '', '');
240
241print '<div class="div-table-responsive-no-min">';
242print '<table class="noborder centpercent">';
243print '<tr class="liste_titre">';
244print '<td>'.$langs->trans("Name").'</td>';
245print '<td class="minwidth100">'.$langs->trans("Description").'</td>';
246print '<td>'.$langs->trans("Example").'</td>';
247print '<td class="center">'.$langs->trans("Status").'</td>';
248print "</tr>\n";
249
250$bankorder = array();
251$bankorder[0][0] = $langs->trans("BankOrderGlobal");
252$bankorder[0][1] = $langs->trans("BankOrderGlobalDesc");
253$bankorder[0][2] = 'BankCode DeskCode BankAccountNumber BankAccountNumberKey';
254$bankorder[1][0] = $langs->trans("BankOrderES");
255$bankorder[1][1] = $langs->trans("BankOrderESDesc");
256$bankorder[1][2] = 'BankCode DeskCode BankAccountNumberKey BankAccountNumber';
257
258$i = 0;
259
260$nbofbank = count($bankorder);
261while ($i < $nbofbank) {
262 print '<tr class="oddeven">';
263 print '<td>'.$bankorder[$i][0]."</td><td>\n";
264 print $bankorder[$i][1];
265 print '</td>';
266 print '<td class="nowrap">';
267 $tmparray = explode(' ', $bankorder[$i][2]);
268 foreach ($tmparray as $key => $val) {
269 if ($key > 0) {
270 print ', ';
271 }
272 print $langs->trans($val);
273 }
274 print "</td>\n";
275
276 if (getDolGlobalInt('BANK_SHOW_ORDER_OPTION') == $i) {
277 print '<td class="center">';
278 print img_picto($langs->trans("Activated"), 'on');
279 print '</td>';
280 } else {
281 print '<td class="center"><a href="'.$_SERVER['PHP_SELF'].'?action=setbankorder&token='.newToken().'&value='.((int) $i).'">';
282 print img_picto($langs->trans("Disabled"), 'off');
283 print '</a></td>';
284 }
285 print '</tr>'."\n";
286 $i++;
287}
288
289print '</table>'."\n";
290print "</div>";
291
292print '<br><br>';
293
294
295/*
296 * Document templates generators
297 */
298
299print load_fiche_titre($langs->trans("BankAccountModelModule"), '', '');
300
301// Load array def with activated templates
302$def = array();
303$sql = "SELECT nom";
304$sql .= " FROM ".MAIN_DB_PREFIX."document_model";
305$sql .= " WHERE type = '".$db->escape($type)."'";
306$sql .= " AND entity = ".((int) $conf->entity);
307$resql = $db->query($sql);
308if ($resql) {
309 $i = 0;
310 $num_rows = $db->num_rows($resql);
311 while ($i < $num_rows) {
312 $array = $db->fetch_array($resql);
313 if (is_array($array)) {
314 array_push($def, $array[0]);
315 }
316 $i++;
317 }
318} else {
319 dol_print_error($db);
320}
321
322print '<div class="div-table-responsive-no-min">';
323print '<table class="noborder centpercent">'."\n";
324print '<tr class="liste_titre">'."\n";
325print '<td>'.$langs->trans("Name").'</td>';
326print '<td class="minwidth100">'.$langs->trans("Description").'</td>';
327print '<td class="center" width="60">'.$langs->trans("Status")."</td>\n";
328print '<td class="center" width="60">'.$langs->trans("Default")."</td>\n";
329print '<td class="center" width="38">'.$langs->trans("ShortInfo").'</td>';
330print '<td class="center" width="38">'.$langs->trans("Preview").'</td>';
331print '</tr>'."\n";
332
333clearstatcache();
334
335foreach ($dirmodels as $reldir) {
336 foreach (array('', '/doc') as $valdir) {
337 $dir = dol_buildpath($reldir."core/modules/bank".$valdir);
338
339 if (is_dir($dir)) {
340 $handle = opendir($dir);
341 if (is_resource($handle)) {
342 $filelist = array();
343 while (($file = readdir($handle)) !== false) {
344 $filelist[] = $file;
345 }
346 closedir($handle);
347 arsort($filelist);
348
349 foreach ($filelist as $file) {
350 if (preg_match('/\.modules\.php$/i', $file) && preg_match('/^(pdf_|doc_)/', $file)) {
351 if (file_exists($dir.'/'.$file)) {
352 $name = substr($file, 4, dol_strlen($file) - 16);
353 $classname = substr($file, 0, dol_strlen($file) - 12);
354
355 require_once $dir.'/'.$file;
356 $module = new $classname($db);
357
358 '@phan-var-force ModeleBankAccountDoc $module';
359
360 $modulequalified = 1;
361 if ($module->version == 'development' && getDolGlobalInt('MAIN_FEATURES_LEVEL') < 2) {
362 $modulequalified = 0;
363 }
364 if ($module->version == 'experimental' && getDolGlobalInt('MAIN_FEATURES_LEVEL') < 1) {
365 $modulequalified = 0;
366 }
367
368 if ($modulequalified) {
369 print '<tr class="oddeven"><td width="100">';
370 print(empty($module->name) ? $name : $module->name);
371 print "</td><td>\n";
372 if (method_exists($module, 'info')) {
373 print $module->info($langs); // @phan-suppress-current-line PhanUndeclaredMethod
374 } else {
375 print $module->description;
376 }
377 print '</td>';
378
379 // Active
380 if (in_array($name, $def)) {
381 print '<td class="center">'."\n";
382 print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=del&token='.newToken().'&value='.$name.'">';
383 print img_picto($langs->trans("Enabled"), 'switch_on');
384 print '</a>';
385 print '</td>';
386 } else {
387 print '<td class="center">'."\n";
388 print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=set&value='.$name.'&token='.newToken().'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';
389 print "</td>";
390 }
391
392 // Default
393 print '<td class="center">';
394 if (getDolGlobalString('BANKADDON_PDF') == $name) {
395 print img_picto($langs->trans("Default"), 'on');
396 } else {
397 print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setdoc&token='.newToken().'&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'off').'</a>';
398 }
399 print '</td>';
400
401 // Info
402 $htmltooltip = ''.$langs->trans("Name").': '.$module->name;
403 $htmltooltip .= '<br>'.$langs->trans("Type").': '.($module->type ? $module->type : $langs->trans("Unknown"));
404 if ($module->type == 'pdf') {
405 $htmltooltip .= '<br>'.$langs->trans("Width").'/'.$langs->trans("Height").': '.$module->page_largeur.'/'.$module->page_hauteur;
406 }
407 $htmltooltip .= '<br><br><u>'.$langs->trans("FeaturesSupported").':</u>';
408 $htmltooltip .= '<br>'.$langs->trans("Logo").': '.yn($module->option_logo, 1, 1);
409 //$htmltooltip .= '<br>' . $langs->trans("PaymentMode") . ': ' . yn($module->option_modereg, 1, 1);
410 //$htmltooltip .= '<br>' . $langs->trans("PaymentConditions") . ': ' . yn($module->option_condreg, 1, 1);
411 $htmltooltip .= '<br>'.$langs->trans("MultiLanguage").': '.yn($module->option_multilang, 1, 1);
412 // $htmltooltip.='<br>'.$langs->trans("Discounts").': '.yn($module->option_escompte,1,1);
413 // $htmltooltip.='<br>'.$langs->trans("CreditNote").': '.yn($module->option_credit_note,1,1);
414 //$htmltooltip .= '<br>' . $langs->trans("WatermarkOnDraftOrders") . ': ' . yn($module->option_draft_watermark, 1, 1);
415
416 print '<td class="center">';
417 print $form->textwithpicto('', $htmltooltip, 1, 'info');
418 print '</td>';
419
420 // Preview
421 print '<td class="center">';
422 if ($module->type == 'pdf') {
423 print '<a href="'.$_SERVER["PHP_SELF"].'?action=specimen&module='.$name.'">'.img_object($langs->trans("Preview"), 'pdf').'</a>';
424 } else {
425 print img_object($langs->transnoentitiesnoconv("PreviewNotAvailable"), 'generic');
426 }
427 print '</td>';
428
429 print "</tr>\n";
430 }
431 }
432 }
433 }
434 }
435 }
436 }
437}
438print '</table>';
439print '</div>';
440
441print '<br><br>';
442
443print load_fiche_titre($langs->trans("BankColorizeMovement"), '', '');
444
445print '<div class="div-table-responsive-no-min">';
446print '<table class="noborder centpercent">'."\n";
447print '<tr class="liste_titre">'."\n";
448print '<td colspan="4">'.$langs->trans("Parameter").'</td>';
449print '<td align="center" width="75"></td>'."\n";
450print "</tr>\n";
451
452print '<tr class="oddeven"><td colspan="4">';
453print $langs->trans('BankColorizeMovementDesc');
454print "</td>";
455// Active
456if (getDolGlobalInt('BANK_COLORIZE_MOVEMENT')) {
457 print '<td class="center">'."\n";
458 print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=unsetbankcolorizemovement&token='.newToken().'">';
459 print img_picto($langs->trans("Enabled"), 'switch_on');
460 print '</a>';
461 print '</td>';
462} else {
463 print '<td class="center">'."\n";
464 print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setbankcolorizemovement&token='.newToken().'">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';
465 print "</td>";
466}
467
468print "</tr>\n";
469
470if (getDolGlobalInt('BANK_COLORIZE_MOVEMENT')) {
471 $i = 1;
472 while ($i <= 2) {
473 $key = $i;
474 $color = 'BANK_COLORIZE_MOVEMENT_COLOR'.$key;
475
476 print '<tr class="oddeven">';
477
478 // Label
479 print '<td colspan="4" width="180" class="nowrap">'.$langs->trans("BankColorizeMovementName".$key)."</td>";
480 // Color
481 print '<td class="nowrap right">';
482 print $formother->selectColor((GETPOST("BANK_COLORIZE_MOVEMENT_COLOR".$key) ? GETPOST("BANK_COLORIZE_MOVEMENT_COLOR".$key) : getDolGlobalString($color)), "BANK_COLORIZE_MOVEMENT_COLOR".$key, '', 1, array(), 'right hideifnotset');
483 print '</td>';
484 print "</tr>";
485 $i++;
486 }
487}
488print '</table>';
489print '</div>';
490
491print '<br><br>';
492
493
494/*
495 * Document templates generators
496 */
497
498print load_fiche_titre($langs->trans("Other"), '', '');
499
500print '<div class="div-table-responsive-no-min">';
501print '<table class="noborder centpercent">'."\n";
502print '<tr class="liste_titre">'."\n";
503print '<td>'.$langs->trans("Parameter").'</td>';
504print "<td></td>\n";
505print "</tr>\n";
506
507// Disable direct input
508print '<tr class="oddeven">';
509print '<td>'.$langs->trans("BANK_DISABLE_DIRECT_INPUT").'</td>';
510if (getDolGlobalString('BANK_DISABLE_DIRECT_INPUT')) {
511 print '<td class="center"><a class="reposition" href="'.$_SERVER['PHP_SELF'].'?token='.newToken().'&action=setBANK_DISABLE_DIRECT_INPUT&value=0">';
512 print img_picto($langs->trans("Activated"), 'switch_on');
513 print '</a></td>';
514} else {
515 print '<td class="center"><a class="reposition" href="'.$_SERVER['PHP_SELF'].'?token='.newToken().'&action=setBANK_DISABLE_DIRECT_INPUT&value=1">';
516 print img_picto($langs->trans("Disabled"), 'switch_off');
517 print '</a></td>';
518}
519print '</tr>';
520
521// Autofill bank statement
522print '<tr class="oddeven"><td>'."\n";
523print $langs->trans('AutoReportLastAccountStatement');
524print '</td>';
525// Active
526if (getDolGlobalString('BANK_REPORT_LAST_NUM_RELEVE')) {
527 print '<td class="center">'."\n";
528 print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=unsetreportlastnumreleve&token='.newToken().'">';
529 print img_picto($langs->trans("Enabled"), 'switch_on');
530 print '</a>';
531 print '</td>';
532} else {
533 print '<td class="center">'."\n";
534 print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setreportlastnumreleve&token='.newToken().'">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';
535 print "</td>";
536}
537print "</tr>\n";
538
539// Allow SEPA Mandate OnLine Sign
540if (!getDolGlobalInt('SOCIETE_DISABLE_BANKACCOUNT')) {
541 print '<tr class="oddeven">';
542 print '<td>'.$form->textwithpicto($langs->trans("AllowOnLineSign"), $langs->trans("AllowOnLineSignDesc")).'</td>';
543 print '<td class="center">';
544 print ajax_constantonoff('SOCIETE_RIB_ALLOW_ONLINESIGN', array(), null, 0, 0, 0, 2, 0, 1, '', '', 'inline-block', 0, $langs->transnoentitiesnoconv("WarningOnlineSignature", "https://www.dolistore.com"));
545 print '</td></tr>';
546}
547
548print '</table>';
549print '</div>';
550
551print dol_get_fiche_end();
552
553print $form->buttonsSaveCancel("Save", '');
554
555print "</form>\n";
556
557// End of page
558llxFooter();
559$db->close();
if(! $sortfield) if(! $sortorder) $object
Definition account.php:100
addDocumentModel($name, $type, $label='', $description='')
Add document model used by doc generator.
dolibarr_set_const($db, $name, $value, $type='chaine', $visible=0, $note='', $entity=1)
Insert a parameter (key,value) into database (delete old key then insert it again).
dolibarr_del_const($db, $name, $entity=1)
Delete a constant.
delDocumentModel($name, $type)
Delete document model used by doc generator.
llxFooter($comment='', $zone='private', $disabledoutputofmessages=0)
Empty footer.
Definition wrapper.php:91
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.
Definition wrapper.php:73
bank_admin_prepare_head($object)
Prepare array with list of tabs.
Definition bank.lib.php:200
Class to manage bank accounts.
Class to manage bank accounts description of third parties.
Class to manage generation of HTML components Only common components must be here.
Class permettant la generation de composants html autre Only common components are here.
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='', $noduplicate=0, $attop=0)
Set event messages in dol_events session object.
img_picto($titlealt, $picto, $moreatt='', $pictoisfullpath=0, $srconly=0, $notitle=0, $alt='', $morecss='', $marginleftonlyshort=2, $allowothertags=array())
Show picto whatever it's its name (generic function)
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, $morecssdiv='')
Show tabs of a record.
dol_get_fiche_end($notab=0)
Return tab footer of a card.
img_object($titlealt, $picto, $moreatt='', $pictoisfullpath=0, $srconly=0, $notitle=0, $allowothertags=array())
Show a picto called object_picto (generic function)
dol_strlen($string, $stringencoding='UTF-8')
Make a strlen call.
getDolGlobalInt($key, $default=0)
Return a Dolibarr global constant int value.
newToken()
Return the value of token currently saved into session with name 'newtoken'.
yn($yesno, $format=1, $color=0)
Return yes or no in current language.
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
dol_buildpath($path, $type=0, $returnemptyifnotfound=0)
Return path of url or filesystem.
dol_print_error($db=null, $error='', $errors=null)
Displays error message system with all the information to facilitate the diagnosis and the escalation...
load_fiche_titre($title, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='', $morecssonpicto='widthpictotitle')
Load a title with picto.
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.
$conf db name
Only used if Module[ID]Name translation string is not found.
Definition repair.php:128
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.