dolibarr 21.0.0-beta
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
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 return;
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 ($conf->global->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="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans("BackToModuleList").'</a>';
228print load_fiche_titre($langs->trans("BankSetupModule"), $linkback, 'title_setup');
229
230print '<form name="bankmovementcolorconfig" action="'.$_SERVER["PHP_SELF"].'" method="post">';
231print '<input type="hidden" name="token" value="'.newToken().'">';
232print '<input type="hidden" name="action" value="save">';
233
234$head = bank_admin_prepare_head(null);
235print dol_get_fiche_head($head, 'general', $langs->trans("BankSetupModule"), -1, 'account');
236
237//Show bank account order
238print load_fiche_titre($langs->trans("BankOrderShow"), '', '');
239
240print '<div class="div-table-responsive-no-min">';
241print '<table class="noborder centpercent">';
242print '<tr class="liste_titre">';
243print '<td>'.$langs->trans("Name").'</td>';
244print '<td class="minwidth100">'.$langs->trans("Description").'</td>';
245print '<td>'.$langs->trans("Example").'</td>';
246print '<td class="center">'.$langs->trans("Status").'</td>';
247print "</tr>\n";
248
249$bankorder = array();
250$bankorder[0][0] = $langs->trans("BankOrderGlobal");
251$bankorder[0][1] = $langs->trans("BankOrderGlobalDesc");
252$bankorder[0][2] = 'BankCode DeskCode BankAccountNumber BankAccountNumberKey';
253$bankorder[1][0] = $langs->trans("BankOrderES");
254$bankorder[1][1] = $langs->trans("BankOrderESDesc");
255$bankorder[1][2] = 'BankCode DeskCode BankAccountNumberKey BankAccountNumber';
256
257$i = 0;
258
259$nbofbank = count($bankorder);
260while ($i < $nbofbank) {
261 print '<tr class="oddeven">';
262 print '<td>'.$bankorder[$i][0]."</td><td>\n";
263 print $bankorder[$i][1];
264 print '</td>';
265 print '<td class="nowrap">';
266 $tmparray = explode(' ', $bankorder[$i][2]);
267 foreach ($tmparray as $key => $val) {
268 if ($key > 0) {
269 print ', ';
270 }
271 print $langs->trans($val);
272 }
273 print "</td>\n";
274
275 if (getDolGlobalInt('BANK_SHOW_ORDER_OPTION') == $i) {
276 print '<td class="center">';
277 print img_picto($langs->trans("Activated"), 'on');
278 print '</td>';
279 } else {
280 print '<td class="center"><a href="'.$_SERVER['PHP_SELF'].'?action=setbankorder&token='.newToken().'&value='.((int) $i).'">';
281 print img_picto($langs->trans("Disabled"), 'off');
282 print '</a></td>';
283 }
284 print '</tr>'."\n";
285 $i++;
286}
287
288print '</table>'."\n";
289print "</div>";
290
291print '<br><br>';
292
293
294/*
295 * Document templates generators
296 */
297
298print load_fiche_titre($langs->trans("BankAccountModelModule"), '', '');
299
300// Load array def with activated templates
301$def = array();
302$sql = "SELECT nom";
303$sql .= " FROM ".MAIN_DB_PREFIX."document_model";
304$sql .= " WHERE type = '".$db->escape($type)."'";
305$sql .= " AND entity = ".$conf->entity;
306$resql = $db->query($sql);
307if ($resql) {
308 $i = 0;
309 $num_rows = $db->num_rows($resql);
310 while ($i < $num_rows) {
311 $array = $db->fetch_array($resql);
312 if (is_array($array)) {
313 array_push($def, $array[0]);
314 }
315 $i++;
316 }
317} else {
318 dol_print_error($db);
319}
320
321print '<div class="div-table-responsive-no-min">';
322print '<table class="noborder centpercent">'."\n";
323print '<tr class="liste_titre">'."\n";
324print '<td>'.$langs->trans("Name").'</td>';
325print '<td class="minwidth100">'.$langs->trans("Description").'</td>';
326print '<td class="center" width="60">'.$langs->trans("Status")."</td>\n";
327print '<td class="center" width="60">'.$langs->trans("Default")."</td>\n";
328print '<td class="center" width="38">'.$langs->trans("ShortInfo").'</td>';
329print '<td class="center" width="38">'.$langs->trans("Preview").'</td>';
330print '</tr>'."\n";
331
332clearstatcache();
333
334foreach ($dirmodels as $reldir) {
335 foreach (array('', '/doc') as $valdir) {
336 $dir = dol_buildpath($reldir."core/modules/bank".$valdir);
337
338 if (is_dir($dir)) {
339 $handle = opendir($dir);
340 if (is_resource($handle)) {
341 $filelist = array();
342 while (($file = readdir($handle)) !== false) {
343 $filelist[] = $file;
344 }
345 closedir($handle);
346 arsort($filelist);
347
348 foreach ($filelist as $file) {
349 if (preg_match('/\.modules\.php$/i', $file) && preg_match('/^(pdf_|doc_)/', $file)) {
350 if (file_exists($dir.'/'.$file)) {
351 $name = substr($file, 4, dol_strlen($file) - 16);
352 $classname = substr($file, 0, dol_strlen($file) - 12);
353
354 require_once $dir.'/'.$file;
355 $module = new $classname($db);
356
357 '@phan-var-force ModeleBankAccountDoc $module';
358
359 $modulequalified = 1;
360 if ($module->version == 'development' && getDolGlobalInt('MAIN_FEATURES_LEVEL') < 2) {
361 $modulequalified = 0;
362 }
363 if ($module->version == 'experimental' && getDolGlobalInt('MAIN_FEATURES_LEVEL') < 1) {
364 $modulequalified = 0;
365 }
366
367 if ($modulequalified) {
368 print '<tr class="oddeven"><td width="100">';
369 print(empty($module->name) ? $name : $module->name);
370 print "</td><td>\n";
371 if (method_exists($module, 'info')) {
372 print $module->info($langs); // @phan-suppress-current-line PhanUndeclaredMethod
373 } else {
374 print $module->description;
375 }
376 print '</td>';
377
378 // Active
379 if (in_array($name, $def)) {
380 print '<td class="center">'."\n";
381 print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=del&token='.newToken().'&value='.$name.'">';
382 print img_picto($langs->trans("Enabled"), 'switch_on');
383 print '</a>';
384 print '</td>';
385 } else {
386 print '<td class="center">'."\n";
387 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>';
388 print "</td>";
389 }
390
391 // Default
392 print '<td class="center">';
393 if (getDolGlobalString('BANKADDON_PDF') == $name) {
394 print img_picto($langs->trans("Default"), 'on');
395 } else {
396 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>';
397 }
398 print '</td>';
399
400 // Info
401 $htmltooltip = ''.$langs->trans("Name").': '.$module->name;
402 $htmltooltip .= '<br>'.$langs->trans("Type").': '.($module->type ? $module->type : $langs->trans("Unknown"));
403 if ($module->type == 'pdf') {
404 $htmltooltip .= '<br>'.$langs->trans("Width").'/'.$langs->trans("Height").': '.$module->page_largeur.'/'.$module->page_hauteur;
405 }
406 $htmltooltip .= '<br><br><u>'.$langs->trans("FeaturesSupported").':</u>';
407 $htmltooltip .= '<br>'.$langs->trans("Logo").': '.yn($module->option_logo, 1, 1);
408 //$htmltooltip .= '<br>' . $langs->trans("PaymentMode") . ': ' . yn($module->option_modereg, 1, 1);
409 //$htmltooltip .= '<br>' . $langs->trans("PaymentConditions") . ': ' . yn($module->option_condreg, 1, 1);
410 $htmltooltip .= '<br>'.$langs->trans("MultiLanguage").': '.yn($module->option_multilang, 1, 1);
411 // $htmltooltip.='<br>'.$langs->trans("Discounts").': '.yn($module->option_escompte,1,1);
412 // $htmltooltip.='<br>'.$langs->trans("CreditNote").': '.yn($module->option_credit_note,1,1);
413 //$htmltooltip .= '<br>' . $langs->trans("WatermarkOnDraftOrders") . ': ' . yn($module->option_draft_watermark, 1, 1);
414
415 print '<td class="center">';
416 print $form->textwithpicto('', $htmltooltip, 1, 0);
417 print '</td>';
418
419 // Preview
420 print '<td class="center">';
421 if ($module->type == 'pdf') {
422 print '<a href="'.$_SERVER["PHP_SELF"].'?action=specimen&module='.$name.'">'.img_object($langs->trans("Preview"), 'pdf').'</a>';
423 } else {
424 print img_object($langs->trans("PreviewNotAvailable"), 'generic');
425 }
426 print '</td>';
427
428 print "</tr>\n";
429 }
430 }
431 }
432 }
433 }
434 }
435 }
436}
437print '</table>';
438print '</div>';
439
440print '<br><br>';
441
442print load_fiche_titre($langs->trans("BankColorizeMovement"), '', '');
443
444print '<div class="div-table-responsive-no-min">';
445print '<table class="noborder centpercent">'."\n";
446print '<tr class="liste_titre">'."\n";
447print '<td colspan="4">'.$langs->trans("Name").'</td>';
448print '<td align="center" width="75">'.$langs->trans("Value").'</td>'."\n";
449print "</tr>\n";
450
451print '<tr class="oddeven"><td colspan="4">';
452print $langs->trans('BankColorizeMovementDesc');
453print "</td>";
454// Active
455if (getDolGlobalInt('BANK_COLORIZE_MOVEMENT')) {
456 print '<td class="center">'."\n";
457 print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=unsetbankcolorizemovement&token='.newToken().'">';
458 print img_picto($langs->trans("Enabled"), 'switch_on');
459 print '</a>';
460 print '</td>';
461} else {
462 print '<td class="center">'."\n";
463 print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setbankcolorizemovement&token='.newToken().'">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';
464 print "</td>";
465}
466
467print "</tr>\n";
468
469if (getDolGlobalInt('BANK_COLORIZE_MOVEMENT')) {
470 $i = 1;
471 while ($i <= 2) {
472 $key = $i;
473 $color = 'BANK_COLORIZE_MOVEMENT_COLOR'.$key;
474
475 print '<tr class="oddeven">';
476
477 // Label
478 print '<td colspan="4" width="180" class="nowrap">'.$langs->trans("BankColorizeMovementName".$key)."</td>";
479 // Color
480 print '<td class="nowrap right">';
481 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');
482 print '</td>';
483 print "</tr>";
484 $i++;
485 }
486}
487print '</table>';
488print '</div>';
489
490print '<br><br>';
491
492
493/*
494 * Document templates generators
495 */
496
497print load_fiche_titre($langs->trans("Other"), '', '');
498
499print '<div class="div-table-responsive-no-min">';
500print '<table class="noborder centpercent">'."\n";
501print '<tr class="liste_titre">'."\n";
502print '<td>'.$langs->trans("Parameter").'</td>';
503print "<td></td>\n";
504print "</tr>\n";
505
506// Disable direct input
507print '<tr class="oddeven">';
508print '<td>'.$langs->trans("BANK_DISABLE_DIRECT_INPUT").'</td>';
509if (getDolGlobalString('BANK_DISABLE_DIRECT_INPUT')) {
510 print '<td class="center"><a class="reposition" href="'.$_SERVER['PHP_SELF'].'?token='.newToken().'&action=setBANK_DISABLE_DIRECT_INPUT&value=0">';
511 print img_picto($langs->trans("Activated"), 'switch_on');
512 print '</a></td>';
513} else {
514 print '<td class="center"><a class="reposition" href="'.$_SERVER['PHP_SELF'].'?token='.newToken().'&action=setBANK_DISABLE_DIRECT_INPUT&value=1">';
515 print img_picto($langs->trans("Disabled"), 'switch_off');
516 print '</a></td>';
517}
518print '</tr>';
519
520// Autofill bank statement
521print '<tr class="oddeven"><td>'."\n";
522print $langs->trans('AutoReportLastAccountStatement');
523print '</td>';
524// Active
525if (getDolGlobalString('BANK_REPORT_LAST_NUM_RELEVE')) {
526 print '<td class="center">'."\n";
527 print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=unsetreportlastnumreleve&token='.newToken().'">';
528 print img_picto($langs->trans("Enabled"), 'switch_on');
529 print '</a>';
530 print '</td>';
531} else {
532 print '<td class="center">'."\n";
533 print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setreportlastnumreleve&token='.newToken().'">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';
534 print "</td>";
535}
536print "</tr>\n";
537
538// Allow SEPA Mandate OnLine Sign
539if (!getDolGlobalInt('SOCIETE_DISABLE_BANKACCOUNT')) {
540 print '<tr class="oddeven">';
541 print '<td>'.$form->textwithpicto($langs->trans("AllowOnLineSign"), $langs->trans("AllowOnLineSignDesc")).'</td>';
542 print '<td class="center">';
543 print ajax_constantonoff('SOCIETE_RIB_ALLOW_ONLINESIGN', array(), null, 0, 0, 0, 2, 0, 1, '', '', 'inline-block', 0, $langs->trans("WarningOnlineSignature"));
544 print '</td></tr>';
545}
546
547print '</table>';
548print '</div>';
549
550print dol_get_fiche_end();
551
552print $form->buttonsSaveCancel("Save", '');
553
554print "</form>\n";
555
556// End of page
557llxFooter();
558$db->close();
if( $user->socid > 0) if(! $user->hasRight('accounting', 'chartofaccount')) $object
Definition card.php:66
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:71
bank_admin_prepare_head($object)
Prepare array with list of tabs.
Definition bank.lib.php:171
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.
global $conf
The following vars must be defined: $type2label $form $conf, $lang, The following vars may also be de...
Definition member.php:79
$conf db name
Only used if Module[ID]Name translation string is not found.
Definition repair.php:152
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.