dolibarr 21.0.0-alpha
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 MDW <mdeweerd@users.noreply.github.com>
7 * Copyright (C) 2024 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
37// Load translation files required by the page
38$langs->loadLangs(array("admin", "companies", "bills", "other", "banks"));
39
40$action = GETPOST('action', 'aZ09');
41$actionsave = GETPOST('save', 'alpha');
42$value = GETPOST('value', 'alpha');
43$label = GETPOST('label', 'alpha');
44$scandir = GETPOST('scan_dir', 'alpha');
45$type = 'bankaccount';
46
47if (!$user->admin) {
49}
50
51$error = 0;
52
53
54/*
55 * Actions
56 */
57
58if (in_array($action, array('setBANK_DISABLE_DIRECT_INPUT'))) {
59 $constname = preg_replace('/^set/', '', $action);
60 $constvalue = GETPOSTINT('value');
61 $res = dolibarr_set_const($db, $constname, $constvalue, 'yesno', 0, '', $conf->entity);
62 if (!($res > 0)) {
63 $error++;
64 }
65
66 if (!$error) {
67 setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
68 } else {
69 setEventMessages($langs->trans("Error"), null, 'mesgs');
70 }
71}
72
73// Order display of bank account
74if ($action == 'setbankorder') {
75 if (dolibarr_set_const($db, "BANK_SHOW_ORDER_OPTION", GETPOST('value', 'alpha'), 'chaine', 0, '', $conf->entity) > 0) {
76 } else {
77 dol_print_error($db);
78 }
79}
80
81// Auto report last num releve on conciliate
82if ($action == 'setreportlastnumreleve') {
83 if (dolibarr_set_const($db, "BANK_REPORT_LAST_NUM_RELEVE", 1, 'chaine', 0, '', $conf->entity) > 0) {
84 } else {
85 dol_print_error($db);
86 }
87} elseif ($action == 'unsetreportlastnumreleve') {
88 if (dolibarr_set_const($db, "BANK_REPORT_LAST_NUM_RELEVE", 0, 'chaine', 0, '', $conf->entity) > 0) {
89 } else {
90 dol_print_error($db);
91 }
92}
93
94// Colorize movements
95if ($action == 'setbankcolorizemovement') {
96 if (dolibarr_set_const($db, "BANK_COLORIZE_MOVEMENT", 1, 'chaine', 0, '', $conf->entity) > 0) {
97 } else {
98 dol_print_error($db);
99 }
100} elseif ($action == 'unsetbankcolorizemovement') {
101 if (dolibarr_set_const($db, "BANK_COLORIZE_MOVEMENT", 0, 'chaine', 0, '', $conf->entity) > 0) {
102 } else {
103 dol_print_error($db);
104 }
105}
106
107if ($actionsave) {
108 $db->begin();
109
110 $i = 1;
111 $errorsaved = 0;
112 $error = 0;
113
114 // Save colors
115 while ($i <= 2) {
116 $color = GETPOST('BANK_COLORIZE_MOVEMENT_COLOR'.$i, 'alpha');
117 if ($color == '-1') {
118 $color = '';
119 }
120
121 $res = dolibarr_set_const($db, 'BANK_COLORIZE_MOVEMENT_COLOR'.$i, $color, 'chaine', 0, '', $conf->entity);
122 if (!($res > 0)) {
123 $error++;
124 }
125 $i++;
126 }
127
128 if (!$error) {
129 $db->commit();
130 setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
131 } else {
132 $db->rollback();
133 if (empty($errorsaved)) {
134 setEventMessages($langs->trans("Error"), null, 'errors');
135 }
136 }
137}
138
139
140if ($action == 'specimen') {
141 $modele = GETPOST('module', 'alpha');
142
143 if ($modele == 'sepamandate') {
144 $object = new CompanyBankAccount($db);
145 } else {
146 $object = new Account($db);
147 }
148 $object->initAsSpecimen();
149
150 // Search template files
151 $file = '';
152 $classname = '';
153 $dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']);
154 foreach ($dirmodels as $reldir) {
155 $file = dol_buildpath($reldir."core/modules/bank/doc/pdf_".$modele.".modules.php", 0);
156 if (file_exists($file)) {
157 $classname = "pdf_".$modele;
158 break;
159 }
160 }
161
162 if ($classname !== '') {
163 require_once $file;
164
165 $module = new $classname($db);
166 '@phan-var-force ModeleBankAccountDoc $module';
167
168 if ($module->write_file($object, $langs) > 0) {
169 header("Location: ".DOL_URL_ROOT."/document.php?modulepart=bank&file=SPECIMEN.pdf");
170 return;
171 } else {
172 setEventMessages($module->error, null, 'errors');
173 dol_syslog($module->error, LOG_ERR);
174 }
175 } else {
176 setEventMessages($langs->trans("ErrorModuleNotFound"), null, 'errors');
177 dol_syslog($langs->trans("ErrorModuleNotFound"), LOG_ERR);
178 }
179}
180
181// Activate a model
182if ($action == 'set') {
183 $ret = addDocumentModel($value, $type, $label, $scandir);
184} elseif ($action == 'del') {
185 $ret = delDocumentModel($value, $type);
186 if ($ret > 0) {
187 if ($conf->global->BANKADDON_PDF == "$value") {
188 dolibarr_del_const($db, 'BANKADDON_PDF', $conf->entity);
189 }
190 }
191} elseif ($action == 'setdoc') {
192 // Set default model
193 if (dolibarr_set_const($db, "BANKADDON_PDF", $value, 'chaine', 0, '', $conf->entity)) {
194 // The constant that was read before the new set
195 // We therefore requires a variable to have a coherent view
196 $conf->global->BANKADDON_PDF = $value;
197 }
198
199 // On active le modele
200 $ret = delDocumentModel($value, $type);
201 if ($ret > 0) {
202 $ret = addDocumentModel($value, $type, $label, $scandir);
203 }
204}
205
206
207
208/*
209 * View
210 */
211
212$form = new Form($db);
213$formother = new FormOther($db);
214
215$dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']);
216
217llxHeader("", $langs->trans("BankSetupModule"), '', '', 0, 0, '', '', '', 'mod-admin page-bank');
218
219$linkback = '<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans("BackToModuleList").'</a>';
220print load_fiche_titre($langs->trans("BankSetupModule"), $linkback, 'title_setup');
221
222print '<form name="bankmovementcolorconfig" action="'.$_SERVER["PHP_SELF"].'" method="post">';
223print '<input type="hidden" name="token" value="'.newToken().'">';
224print '<input type="hidden" name="action" value="save">';
225
226$head = bank_admin_prepare_head(null);
227print dol_get_fiche_head($head, 'general', $langs->trans("BankSetupModule"), -1, 'account');
228
229//Show bank account order
230print load_fiche_titre($langs->trans("BankOrderShow"), '', '');
231
232print '<div class="div-table-responsive-no-min">';
233print '<table class="noborder centpercent">';
234print '<tr class="liste_titre">';
235print '<td>'.$langs->trans("Name").'</td>';
236print '<td class="minwidth100">'.$langs->trans("Description").'</td>';
237print '<td>'.$langs->trans("Example").'</td>';
238print '<td class="center">'.$langs->trans("Status").'</td>';
239print "</tr>\n";
240
241$bankorder = array();
242$bankorder[0][0] = $langs->trans("BankOrderGlobal");
243$bankorder[0][1] = $langs->trans("BankOrderGlobalDesc");
244$bankorder[0][2] = 'BankCode DeskCode BankAccountNumber BankAccountNumberKey';
245$bankorder[1][0] = $langs->trans("BankOrderES");
246$bankorder[1][1] = $langs->trans("BankOrderESDesc");
247$bankorder[1][2] = 'BankCode DeskCode BankAccountNumberKey BankAccountNumber';
248
249$i = 0;
250
251$nbofbank = count($bankorder);
252while ($i < $nbofbank) {
253 print '<tr class="oddeven">';
254 print '<td>'.$bankorder[$i][0]."</td><td>\n";
255 print $bankorder[$i][1];
256 print '</td>';
257 print '<td class="nowrap">';
258 $tmparray = explode(' ', $bankorder[$i][2]);
259 foreach ($tmparray as $key => $val) {
260 if ($key > 0) {
261 print ', ';
262 }
263 print $langs->trans($val);
264 }
265 print "</td>\n";
266
267 if (getDolGlobalInt('BANK_SHOW_ORDER_OPTION') == $i) {
268 print '<td class="center">';
269 print img_picto($langs->trans("Activated"), 'on');
270 print '</td>';
271 } else {
272 print '<td class="center"><a href="'.$_SERVER['PHP_SELF'].'?action=setbankorder&token='.newToken().'&value='.((int) $i).'">';
273 print img_picto($langs->trans("Disabled"), 'off');
274 print '</a></td>';
275 }
276 print '</tr>'."\n";
277 $i++;
278}
279
280print '</table>'."\n";
281print "</div>";
282
283print '<br><br>';
284
285
286/*
287 * Document templates generators
288 */
289
290print load_fiche_titre($langs->trans("BankAccountModelModule"), '', '');
291
292// Load array def with activated templates
293$def = array();
294$sql = "SELECT nom";
295$sql .= " FROM ".MAIN_DB_PREFIX."document_model";
296$sql .= " WHERE type = '".$db->escape($type)."'";
297$sql .= " AND entity = ".$conf->entity;
298$resql = $db->query($sql);
299if ($resql) {
300 $i = 0;
301 $num_rows = $db->num_rows($resql);
302 while ($i < $num_rows) {
303 $array = $db->fetch_array($resql);
304 if (is_array($array)) {
305 array_push($def, $array[0]);
306 }
307 $i++;
308 }
309} else {
310 dol_print_error($db);
311}
312
313print '<div class="div-table-responsive-no-min">';
314print '<table class="noborder centpercent">'."\n";
315print '<tr class="liste_titre">'."\n";
316print '<td>'.$langs->trans("Name").'</td>';
317print '<td class="minwidth100">'.$langs->trans("Description").'</td>';
318print '<td class="center" width="60">'.$langs->trans("Status")."</td>\n";
319print '<td class="center" width="60">'.$langs->trans("Default")."</td>\n";
320print '<td class="center" width="38">'.$langs->trans("ShortInfo").'</td>';
321print '<td class="center" width="38">'.$langs->trans("Preview").'</td>';
322print '</tr>'."\n";
323
324clearstatcache();
325
326foreach ($dirmodels as $reldir) {
327 foreach (array('', '/doc') as $valdir) {
328 $dir = dol_buildpath($reldir."core/modules/bank".$valdir);
329
330 if (is_dir($dir)) {
331 $handle = opendir($dir);
332 if (is_resource($handle)) {
333 $filelist = array();
334 while (($file = readdir($handle)) !== false) {
335 $filelist[] = $file;
336 }
337 closedir($handle);
338 arsort($filelist);
339
340 foreach ($filelist as $file) {
341 if (preg_match('/\.modules\.php$/i', $file) && preg_match('/^(pdf_|doc_)/', $file)) {
342 if (file_exists($dir.'/'.$file)) {
343 $name = substr($file, 4, dol_strlen($file) - 16);
344 $classname = substr($file, 0, dol_strlen($file) - 12);
345
346 require_once $dir.'/'.$file;
347 $module = new $classname($db);
348
349 '@phan-var-force ModeleBankAccountDoc $module';
350
351 $modulequalified = 1;
352 if ($module->version == 'development' && getDolGlobalInt('MAIN_FEATURES_LEVEL') < 2) {
353 $modulequalified = 0;
354 }
355 if ($module->version == 'experimental' && getDolGlobalInt('MAIN_FEATURES_LEVEL') < 1) {
356 $modulequalified = 0;
357 }
358
359 if ($modulequalified) {
360 print '<tr class="oddeven"><td width="100">';
361 print(empty($module->name) ? $name : $module->name);
362 print "</td><td>\n";
363 if (method_exists($module, 'info')) {
364 print $module->info($langs); // @phan-suppress-current-line PhanUndeclaredMethod
365 } else {
366 print $module->description;
367 }
368 print '</td>';
369
370 // Active
371 if (in_array($name, $def)) {
372 print '<td class="center">'."\n";
373 print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=del&token='.newToken().'&value='.$name.'">';
374 print img_picto($langs->trans("Enabled"), 'switch_on');
375 print '</a>';
376 print '</td>';
377 } else {
378 print '<td class="center">'."\n";
379 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>';
380 print "</td>";
381 }
382
383 // Default
384 print '<td class="center">';
385 if ($conf->global->BANKADDON_PDF == $name) {
386 print img_picto($langs->trans("Default"), 'on');
387 } else {
388 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>';
389 }
390 print '</td>';
391
392 // Info
393 $htmltooltip = ''.$langs->trans("Name").': '.$module->name;
394 $htmltooltip .= '<br>'.$langs->trans("Type").': '.($module->type ? $module->type : $langs->trans("Unknown"));
395 if ($module->type == 'pdf') {
396 $htmltooltip .= '<br>'.$langs->trans("Width").'/'.$langs->trans("Height").': '.$module->page_largeur.'/'.$module->page_hauteur;
397 }
398 $htmltooltip .= '<br><br><u>'.$langs->trans("FeaturesSupported").':</u>';
399 $htmltooltip .= '<br>'.$langs->trans("Logo").': '.yn($module->option_logo, 1, 1);
400 //$htmltooltip .= '<br>' . $langs->trans("PaymentMode") . ': ' . yn($module->option_modereg, 1, 1);
401 //$htmltooltip .= '<br>' . $langs->trans("PaymentConditions") . ': ' . yn($module->option_condreg, 1, 1);
402 $htmltooltip .= '<br>'.$langs->trans("MultiLanguage").': '.yn($module->option_multilang, 1, 1);
403 // $htmltooltip.='<br>'.$langs->trans("Discounts").': '.yn($module->option_escompte,1,1);
404 // $htmltooltip.='<br>'.$langs->trans("CreditNote").': '.yn($module->option_credit_note,1,1);
405 //$htmltooltip .= '<br>' . $langs->trans("WatermarkOnDraftOrders") . ': ' . yn($module->option_draft_watermark, 1, 1);
406
407 print '<td class="center">';
408 print $form->textwithpicto('', $htmltooltip, 1, 0);
409 print '</td>';
410
411 // Preview
412 print '<td class="center">';
413 if ($module->type == 'pdf') {
414 print '<a href="'.$_SERVER["PHP_SELF"].'?action=specimen&module='.$name.'">'.img_object($langs->trans("Preview"), 'pdf').'</a>';
415 } else {
416 print img_object($langs->trans("PreviewNotAvailable"), 'generic');
417 }
418 print '</td>';
419
420 print "</tr>\n";
421 }
422 }
423 }
424 }
425 }
426 }
427 }
428}
429print '</table>';
430print '</div>';
431
432print '<br><br>';
433
434print load_fiche_titre($langs->trans("BankColorizeMovement"), '', '');
435
436print '<div class="div-table-responsive-no-min">';
437print '<table class="noborder centpercent">'."\n";
438print '<tr class="liste_titre">'."\n";
439print '<td colspan="4">'.$langs->trans("Name").'</td>';
440print '<td align="center" width="75">'.$langs->trans("Value").'</td>'."\n";
441print "</tr>\n";
442
443print '<tr class="oddeven"><td colspan="4">';
444print $langs->trans('BankColorizeMovementDesc');
445print "</td>";
446// Active
447if (getDolGlobalInt('BANK_COLORIZE_MOVEMENT')) {
448 print '<td class="center">'."\n";
449 print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=unsetbankcolorizemovement&token='.newToken().'">';
450 print img_picto($langs->trans("Enabled"), 'switch_on');
451 print '</a>';
452 print '</td>';
453} else {
454 print '<td class="center">'."\n";
455 print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setbankcolorizemovement&token='.newToken().'">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';
456 print "</td>";
457}
458
459print "</tr>\n";
460
461if (getDolGlobalInt('BANK_COLORIZE_MOVEMENT')) {
462 $i = 1;
463 while ($i <= 2) {
464 $key = $i;
465 $color = 'BANK_COLORIZE_MOVEMENT_COLOR'.$key;
466
467 print '<tr class="oddeven">';
468
469 // Label
470 print '<td colspan="4" width="180" class="nowrap">'.$langs->trans("BankColorizeMovementName".$key)."</td>";
471 // Color
472 print '<td class="nowrap right">';
473 print $formother->selectColor((GETPOST("BANK_COLORIZE_MOVEMENT_COLOR".$key) ? GETPOST("BANK_COLORIZE_MOVEMENT_COLOR".$key) : getDolGlobalString($color)), "BANK_COLORIZE_MOVEMENT_COLOR".$key, 'bankmovementcolorconfig', 1, array(), 'right hideifnotset');
474 print '</td>';
475 print "</tr>";
476 $i++;
477 }
478}
479print '</table>';
480print '</div>';
481
482print '<br><br>';
483
484
485/*
486 * Document templates generators
487 */
488
489print load_fiche_titre($langs->trans("Other"), '', '');
490
491print '<div class="div-table-responsive-no-min">';
492print '<table class="noborder centpercent">'."\n";
493print '<tr class="liste_titre">'."\n";
494print '<td>'.$langs->trans("Name").'</td>';
495print '<td>'.$langs->trans("Description").'</td>';
496print '<td class="center width75">'.$langs->trans("Status")."</td>\n";
497print "</tr>\n";
498
499print '<tr class="oddeven">';
500print '<td>'.$langs->trans("BANK_DISABLE_DIRECT_INPUT").'</td><td></td>';
501if (getDolGlobalString('BANK_DISABLE_DIRECT_INPUT')) {
502 print '<td class="center"><a class="reposition" href="'.$_SERVER['PHP_SELF'].'?token='.newToken().'&action=setBANK_DISABLE_DIRECT_INPUT&value=0">';
503 print img_picto($langs->trans("Activated"), 'switch_on');
504 print '</a></td>';
505} else {
506 print '<td class="center"><a class="reposition" href="'.$_SERVER['PHP_SELF'].'?token='.newToken().'&action=setBANK_DISABLE_DIRECT_INPUT&value=1">';
507 print img_picto($langs->trans("Disabled"), 'switch_off');
508 print '</a></td>';
509}
510print '</tr>';
511
512print '<tr class="oddeven"><td>';
513print $langs->trans('AccountStatement');
514print "</td><td>\n";
515print $langs->trans('AutoReportLastAccountStatement');
516print '</td>';
517// Active
518if (getDolGlobalString('BANK_REPORT_LAST_NUM_RELEVE')) {
519 print '<td class="center">'."\n";
520 print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=unsetreportlastnumreleve&token='.newToken().'">';
521 print img_picto($langs->trans("Enabled"), 'switch_on');
522 print '</a>';
523 print '</td>';
524} else {
525 print '<td class="center">'."\n";
526 print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setreportlastnumreleve&token='.newToken().'">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';
527 print "</td>";
528}
529print "</tr>\n";
530
531// Allow SEPA Mandate OnLine Sign
532if (!getDolGlobalInt('SOCIETE_DISABLE_BANKACCOUNT')) {
533 print '<tr class="oddeven">';
534 print '<td>'.$langs->trans("AllowOnLineSign").'</td>';
535 print '<td>'.$langs->trans("AllowOnLineSignDesc").'</td>';
536 print '<td class="center">';
537 print ajax_constantonoff('SOCIETE_RIB_ALLOW_ONLINESIGN', array(), null, 0, 0, 0, 2, 0, 1);
538 print '</td></tr>';
539}
540
541print '</table>';
542print '</div>';
543
544print dol_get_fiche_end();
545
546print $form->buttonsSaveCancel("Save", '');
547
548print "</form>\n";
549
550// End of page
551llxFooter();
552$db->close();
if( $user->socid > 0) if(! $user->hasRight('accounting', 'chartofaccount')) $object
Definition card.php:58
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.
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:70
bank_admin_prepare_head($object)
Prepare array with list of tabs.
Definition bank.lib.php:134
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.
llxFooter()
Footer empty.
Definition document.php:107
load_fiche_titre($title, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='')
Load a title with picto.
img_object($titlealt, $picto, $moreatt='', $pictoisfullpath=0, $srconly=0, $notitle=0)
Show a picto called object_picto (generic function)
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='', $noduplicate=0, $attop=0)
Set event messages in dol_events session object.
img_picto($titlealt, $picto, $moreatt='', $pictoisfullpath=0, $srconly=0, $notitle=0, $alt='', $morecss='', $marginleftonlyshort=2)
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)
Show tabs of a record.
dol_get_fiche_end($notab=0)
Return tab footer of a card.
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...
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:140
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.