32require
'../../main.inc.php';
33require_once DOL_DOCUMENT_ROOT.
'/core/lib/date.lib.php';
34require_once DOL_DOCUMENT_ROOT.
'/compta/bank/class/account.class.php';
35require_once DOL_DOCUMENT_ROOT.
'/compta/cashcontrol/class/cashcontrol.class.php';
37$langs->loadLangs(array(
"install",
"cashdesk",
"admin",
"banks"));
41$action =
GETPOST(
'action',
'aZ09');
51$sortfield =
GETPOST(
'sortfield',
'aZ09comma');
52$sortorder =
GETPOST(
'sortorder',
'aZ09comma');
54if (empty($page) || $page == -1) {
57$offset = $limit * $page;
66$contextpage =
GETPOST(
'contextpage',
'aZ') ?
GETPOST(
'contextpage',
'aZ') :
'thirdpartylist';
68if ($contextpage ==
'takepos') {
72$arrayofpaymentmode = array(
'cash' =>
'Cash',
'cheque' =>
'Cheque',
'card' =>
'CreditCard');
74$arrayofposavailable = array();
75if (isModEnabled(
'cashdesk')) {
76 $arrayofposavailable[
'cashdesk'] = $langs->trans(
'CashDesk').
' (cashdesk)';
78if (isModEnabled(
'takepos')) {
79 $arrayofposavailable[
'takepos'] = $langs->trans(
'TakePOS').
' (takepos)';
87$extrafields->fetch_name_optionals_label(
$object->table_element);
90$hookmanager->initHooks(array(
'cashcontrolcard',
'globalcard'));
93include DOL_DOCUMENT_ROOT.
'/core/actions_fetchobject.inc.php';
96if ($user->socid > 0) {
100if (!$user->hasRight(
"cashdesk",
"run") && !$user->hasRight(
"takepos",
"run")) {
109$permissiontoadd = ($user->hasRight(
"cashdesk",
"run") || $user->hasRight(
"takepos",
"run"));
110$permissiontodelete = ($user->hasRight(
"cashdesk",
"run") || $user->hasRight(
"takepos",
"run")) || ($permissiontoadd &&
$object->status == 0);
111if (empty($backtopage)) {
112 $backtopage = DOL_URL_ROOT.
'/compta/cashcontrol/cashcontrol_card.php?id='.(!empty($id) && $id > 0 ? $id :
'__ID__');
114$backurlforlist = DOL_URL_ROOT.
'/compta/cashcontrol/cashcontrol_list.php';
115$triggermodname =
'CACHCONTROL_MODIFY';
118 setEventMessages($langs->trans(
"CashDesk").
" - ".$langs->trans(
"NotConfigured"),
null,
'errors');
122if (
GETPOST(
'cancel',
'alpha')) {
123 if ($action ==
'valid') {
130if ($action ==
"reopen") {
131 $result =
$object->setStatut($object::STATUS_DRAFT,
null,
'',
'CASHFENCE_REOPEN');
139if ($action ==
"start") {
141 if (!
GETPOST(
'posmodule',
'alpha') ||
GETPOST(
'posmodule',
'alpha') ==
'-1') {
142 setEventMessages($langs->trans(
"ErrorFieldRequired", $langs->transnoentitiesnoconv(
"Module")),
null,
'errors');
146 if (
GETPOST(
'posnumber',
'alpha') ==
'') {
147 setEventMessages($langs->trans(
"ErrorFieldRequired", $langs->transnoentitiesnoconv(
"CashDesk")),
null,
'errors');
151 if (!
GETPOST(
'closeyear',
'alpha') ||
GETPOST(
'closeyear',
'alpha') ==
'-1') {
152 setEventMessages($langs->trans(
"ErrorFieldRequired", $langs->transnoentitiesnoconv(
"Year")),
null,
'errors');
156} elseif ($action ==
"add") {
157 if (
GETPOST(
'opening',
'alpha') ==
'') {
158 setEventMessages($langs->trans(
"ErrorFieldRequired", $langs->transnoentitiesnoconv(
"InitialBankBalance")),
null,
'errors');
163 foreach ($arrayofpaymentmode as $key => $val) {
188 if ($contextpage ==
'takepos') {
191 parent.location.href='../../takepos/index.php?place='+parent.place;
197if ($action ==
"valid") {
212 $result =
$object->update($user);
214 $result =
$object->valid($user);
224 if ($contextpage ==
'takepos') {
227 parent.location.href='../../takepos/index.php?place='+parent.place;
235if ($action ==
'confirm_delete' && !empty($permissiontodelete)) {
239 dol_print_error(
null,
'Error, object must be fetched before being deleted');
243 $result =
$object->delete($user);
248 header(
"Location: ".$backurlforlist);
264$form =
new Form($db);
266$initialbalanceforterminal = array();
267$theoricalamountforterminal = array();
268$theoricalnbofinvoiceforterminal = array();
271llxHeader(
'', $langs->trans(
"CashControl"));
274if ($action ==
"create" || $action ==
"start" || $action ==
'close') {
275 if ($action ==
'close') {
276 $posmodule =
$object->posmodule;
277 $terminalid =
$object->posnumber;
278 $terminaltouse = $terminalid;
281 $smonth =
$object->month_close;
283 } elseif (
GETPOST(
'posnumber',
'alpha') !=
'' &&
GETPOST(
'posnumber',
'alpha') !=
'' &&
GETPOST(
'posnumber',
'alpha') !=
'-1') {
284 $posmodule =
GETPOST(
'posmodule',
'alpha');
285 $terminalid =
GETPOST(
'posnumber',
'alpha');
286 $terminaltouse = $terminalid;
288 if ($terminaltouse ==
'1' && $posmodule ==
'cashdesk') {
292 if ($posmodule ==
'cashdesk' && $terminaltouse !=
'' && $terminaltouse !=
'1') {
294 setEventMessages($langs->trans(
"OnlyTerminal1IsAvailableForCashDeskModule"),
null,
'errors');
299 if (isset($terminalid) && $terminalid !=
'') {
301 foreach ($arrayofpaymentmode as $key => $val) {
302 if ($key !=
'cash') {
303 $initialbalanceforterminal[$terminalid][$key] = 0;
308 $vartouse =
'CASHDESK_ID_BANKACCOUNT_CASH'.$terminaltouse;
312 $sql =
"SELECT SUM(amount) as total FROM ".MAIN_DB_PREFIX.
"bank";
313 $sql .=
" WHERE fk_account = ".((int) $bankid);
314 if ($syear && !$smonth) {
316 } elseif ($syear && $smonth && !$sday) {
318 } elseif ($syear && $smonth && $sday) {
319 $sql .=
" AND dateo < '".$db->idate(
dol_mktime(0, 0, 0, $smonth, $sday, $syear)).
"'";
324 $resql = $db->query($sql);
326 $obj = $db->fetch_object($resql);
328 $initialbalanceforterminal[$terminalid][$key] = $obj->total;
334 setEventMessages($langs->trans(
"SetupOfTerminalNotComplete", $terminaltouse),
null,
'errors');
340 foreach ($arrayofpaymentmode as $key => $val) {
341 $sql =
"SELECT SUM(pf.amount) as total, COUNT(*) as nb";
342 $sql .=
" FROM ".MAIN_DB_PREFIX.
"paiement_facture as pf, ".MAIN_DB_PREFIX.
"facture as f, ".MAIN_DB_PREFIX.
"paiement as p, ".MAIN_DB_PREFIX.
"c_paiement as cp";
343 $sql .=
" WHERE pf.fk_facture = f.rowid AND p.rowid = pf.fk_paiement AND cp.id = p.fk_paiement";
344 $sql .=
" AND f.module_source = '".$db->escape($posmodule).
"'";
345 $sql .=
" AND f.pos_source = '".$db->escape($terminalid).
"'";
346 $sql .=
" AND f.paye = 1";
347 $sql .=
" AND p.entity IN (".getEntity(
'facture').
")";
348 if ($key ==
'cash') {
349 $sql .=
" AND cp.code = 'LIQ'";
350 } elseif ($key ==
'cheque') {
351 $sql .=
" AND cp.code = 'CHQ'";
352 } elseif ($key ==
'card') {
353 $sql .=
" AND cp.code = 'CB'";
358 if ($syear && !$smonth) {
360 } elseif ($syear && $smonth && !$sday) {
362 } elseif ($syear && $smonth && $sday) {
363 $sql .=
" AND datef BETWEEN '".$db->idate(
dol_mktime(0, 0, 0, $smonth, $sday, $syear)).
"' AND '".$db->idate(
dol_mktime(23, 59, 59, $smonth, $sday, $syear)).
"'";
368 $resql = $db->query($sql);
370 $theoricalamountforterminal[$terminalid][$key] = $initialbalanceforterminal[$terminalid][$key];
372 $obj = $db->fetch_object($resql);
374 $theoricalamountforterminal[$terminalid][$key] =
price2num($theoricalamountforterminal[$terminalid][$key] + $obj->total);
375 $theoricalnbofinvoiceforterminal[$terminalid][$key] = $obj->nb;
384 if ($action !=
'close') {
385 print
load_fiche_titre($langs->trans(
"CashControl").
" - ".$langs->trans(
"New"),
'',
'cash-register');
387 print
'<form method="POST" action="'.$_SERVER[
"PHP_SELF"].
'">';
388 print
'<input type="hidden" name="token" value="'.newToken().
'">';
389 if ($contextpage ==
'takepos') {
390 print
'<input type="hidden" name="contextpage" value="takepos">';
393 print
'<input type="hidden" name="action" value="add">';
394 } elseif ($action ==
'close') {
395 print
'<input type="hidden" name="action" value="valid">';
396 print
'<input type="hidden" name="id" value="'.$id.
'">';
398 print
'<input type="hidden" name="action" value="start">';
401 print
'<div class="div-table-responsive-no-min">';
402 print
'<table class="noborder centpercent">';
403 print
'<tr class="liste_titre">';
404 print
'<td>'.$langs->trans(
"Module").
'</td>';
405 print
'<td>'.$langs->trans(
"Terminal").
'</td>';
406 print
'<td>'.$langs->trans(
"Year").
'</td>';
407 print
'<td>'.$langs->trans(
"Month").
'</td>';
408 print
'<td>'.$langs->trans(
"Day").
'</td>';
415 print
'<tr class="oddeven">';
416 print
'<td>'.$form->selectarray(
'posmodule', $arrayofposavailable,
GETPOST(
'posmodule',
'alpha'), (count($arrayofposavailable) > 1 ? 1 : 0)).
'</td>';
419 $arrayofpos = array();
421 for ($i = 1; $i <= $numterminals; $i++) {
423 $arrayofpos[$i] = array(
'id' => $i,
'label' => (($nameofterminal !=
"TAKEPOS_TERMINAL_NAME_".$i) ?
'#'.$i.
' '.$nameofterminal : $i),
'data-html' => (($nameofterminal !=
"TAKEPOS_TERMINAL_NAME_".$i) ?
'#'.$i.
' - '.$nameofterminal : $i));
425 $selectedposnumber = 0;
428 $selectedposnumber = 1;
431 print $form->selectarray(
'posnumber', $arrayofpos, GETPOSTISSET(
'posnumber') ?
GETPOSTINT(
'posnumber') : $selectedposnumber, $showempty);
436 $retstring =
'<select'.($disabled ?
' disabled' :
'').
' class="flat valignmiddle maxwidth75imp" id="'.$prefix.
'year" name="'.$prefix.
'year">';
437 for ($year = $syear - 10; $year < $syear + 10; $year++) {
438 $retstring .=
'<option value="'.$year.
'"'.($year == $syear ?
' selected' :
'').
'>'.$year.
'</option>';
440 $retstring .=
"</select>\n";
445 $retstring =
'<select'.($disabled ?
' disabled' :
'').
' class="flat valignmiddle maxwidth75imp" id="'.$prefix.
'month" name="'.$prefix.
'month">';
446 $retstring .=
'<option value="0"></option>';
447 for ($month = 1; $month <= 12; $month++) {
448 $retstring .=
'<option value="'.$month.
'"'.($month == $smonth ?
' selected' :
'').
'>';
449 $retstring .=
dol_print_date(mktime(12, 0, 0, $month, 1, 2000),
"%b");
450 $retstring .=
"</option>";
452 $retstring .=
"</select>";
457 $retstring =
'<select'.($disabled ?
' disabled' :
'').
' class="flat valignmiddle maxwidth50imp" id="'.$prefix.
'day" name="'.$prefix.
'day">';
458 $retstring .=
'<option value="0" selected> </option>';
459 for ($day = 1; $day <= 31; $day++) {
460 $retstring .=
'<option value="'.$day.
'"'.($day == $sday ?
' selected' :
'').
'>'.$day.
'</option>';
462 $retstring .=
"</select>";
467 if ($action ==
'start' &&
GETPOST(
'posnumber') !=
'' &&
GETPOST(
'posnumber') !=
'' &&
GETPOST(
'posnumber') !=
'-1') {
470 print
'<input type="submit" name="add" class="button" value="'.$langs->trans(
"Start").
'">';
477 if (($action ==
'start' &&
GETPOST(
'posnumber') !=
'' &&
GETPOST(
'posnumber') !=
'' &&
GETPOST(
'posnumber') !=
'-1') || $action ==
'close') {
478 $posmodule =
GETPOST(
'posmodule',
'alpha');
479 $terminalid =
GETPOST(
'posnumber',
'alpha');
483 print
'<div class="div-table-responsive-no-min">';
484 print
'<table class="noborder centpercent">';
486 print
'<tr class="liste_titre">';
488 print
'<td class="center">'.$langs->trans(
"InitialBankBalance");
500 print
'<tr class="liste_titre">';
502 print
'<td class="center">'.$langs->trans(
"Cash");
538 print
'<td>'.$langs->trans(
"TheoricalAmount").
'</td>';
539 print
'<td class="center">';
540 print
price($initialbalanceforterminal[$terminalid][
'cash']).
'<br>';
556 print
'<td>'.$langs->trans(
"RealAmount").
'</td>';
558 print
'<td class="center">';
560 if ($action ==
'close') {
563 print
'name="opening" type="text" class="maxwidth100 center" value="';
564 if ($action ==
'close') {
568 print(GETPOSTISSET(
'opening') ?
price2num(
GETPOST(
'opening',
'alpha')) :
price($initialbalanceforterminal[$terminalid][
'cash']));
584 print
'<td class="center">';
585 print
'<input type="submit" name="cancel" class="button button-cancel" value="'.$langs->trans(
"Cancel").
'">';
586 if ($action ==
'start') {
587 print
'<input type="submit" name="add" class="button button-save" value="'.$langs->trans(
"Save").
'">';
588 } elseif ($action ==
'close') {
589 print
'<input type="submit" name="valid" class="button" value="'.$langs->trans(
"Validate").
'">';
602if (empty($action) || $action ==
"view" || $action ==
"close") {
606 print $langs->trans(
"ErrorRecordNotFound");
609 $head[0][0] = DOL_URL_ROOT.
'/compta/cashcontrol/cashcontrol_card.php?id='.
$object->id;
610 $head[0][1] = $langs->trans(
"CashControl");
611 $head[0][2] =
'cashcontrol';
613 print
dol_get_fiche_head($head,
'cashcontrol', $langs->trans(
"CashControl"), -1,
'account');
615 $linkback =
'<a href="'.DOL_URL_ROOT.
'/compta/cashcontrol/cashcontrol_list.php?restore_lastsearch_values=1">'.$langs->trans(
"BackToList").
'</a>';
617 $morehtmlref =
'<div class="refidno">';
618 $morehtmlref .=
'</div>';
621 dol_banner_tab($object,
'id', $linkback, 1,
'rowid',
'rowid', $morehtmlref);
623 print
'<div class="fichecenter">';
624 print
'<div class="fichehalfleft">';
625 print
'<div class="underbanner clearboth"></div>';
626 print
'<table class="border tableforfield" width="100%">';
628 print
'<tr><td class="titlefield nowrap">';
629 print $langs->trans(
"Ref");
634 print
'<tr><td valign="middle">'.$langs->trans(
"Module").
'</td><td>';
638 print
'<tr><td valign="middle">'.$langs->trans(
"Terminal").
'</td><td>';
642 print
'<tr><td class="nowrap">';
643 print $langs->trans(
"Period");
653 print
'<div class="fichehalfright">';
654 print
'<div class="underbanner clearboth"></div>';
656 print
'<table class="border tableforfield centpercent">';
658 print
'<tr><td class="titlefield nowrap">';
659 print $langs->trans(
"DateCreationShort");
664 print
'<tr><td valign="middle">'.$langs->trans(
"InitialBankBalance").
' - '.$langs->trans(
"Cash").
'</td><td>';
665 print
'<span class="amount">'.price(
$object->opening, 0, $langs, 1, -1, -1, $conf->currency).
'</span>';
667 foreach ($arrayofpaymentmode as $key => $val) {
668 print
'<tr><td valign="middle">'.$langs->trans($val).
'</td><td>';
669 print
'<span class="amount">'.price(
$object->$key, 0, $langs, 1, -1, -1, $conf->currency).
'</span>';
675 print
'</div></div>';
676 print
'<div class="clearboth"></div>';
680 if ($action !=
'close') {
681 print
'<div class="tabsAction">';
684 print
'<div class="inline-block divButAction"><a target="_blank" rel="noopener noreferrer" class="butAction" href="report.php?id='.((int) $id).
'">'.$langs->trans(
'PrintReport').
'</a></div>';
687 print
'<div class="inline-block divButAction"><a target="_blank" rel="noopener noreferrer" class="butAction" href="report.php?id='.((int) $id).
'&summaryonly=1">'.$langs->trans(
'PrintReportNoDetail').
'</a></div>';
689 if (
$object->status == CashControl::STATUS_DRAFT) {
690 print
'<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER[
"PHP_SELF"].
'?id='.((int) $id).
'&action=close&token='.
newToken().
'&contextpage='.$contextpage.
'">'.$langs->trans(
'Close').
'</a></div>';
692 print
'<div class="inline-block divButAction"><a class="butActionDelete" href="'.$_SERVER[
"PHP_SELF"].
'?id='.((int) $id).
'&action=confirm_delete&token='.
newToken().
'">'.$langs->trans(
'Delete').
'</a></div>';
694 print
'<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER[
"PHP_SELF"].
'?id='.((int) $id).
'&action=reopen&token='.
newToken().
'">'.$langs->trans(
'ReOpen').
'</a></div>';
699 if ($contextpage !=
'takepos') {
700 print
'<center><iframe src="report.php?id='.$id.
'" width="60%" height="800"></iframe></center>';
703 print
'<form method="POST" action="'.$_SERVER[
"PHP_SELF"].
'" name="formclose">';
704 print
'<input type="hidden" name="token" value="'.newToken().
'">';
705 if ($contextpage ==
'takepos') {
706 print
'<input type="hidden" name="contextpage" value="takepos">';
709 print
'<input type="hidden" name="action" value="add">';
710 } elseif ($action ==
'close') {
711 print
'<input type="hidden" name="action" value="valid">';
712 print
'<input type="hidden" name="id" value="'.$id.
'">';
714 print
'<input type="hidden" name="action" value="start">';
769 if (($action ==
'start' &&
GETPOST(
'posnumber') !=
'' &&
GETPOST(
'posnumber') !=
'' &&
GETPOST(
'posnumber') !=
'-1') || $action ==
'close') {
770 $posmodule =
$object->posmodule;
771 $terminalid =
$object->posnumber;
775 print
'<div class="div-table-responsive-no-min">';
776 print
'<table class="noborder centpercent">';
778 print
'<tr class="liste_titre">';
780 print
'<td class="center">'.$langs->trans(
"InitialBankBalance");
784 print
'<td align="center" class="hide0" colspan="'.count($arrayofpaymentmode).
'">';
785 print $langs->trans(
"AmountAtEndOfPeriod");
790 print
'<tr class="liste_titre">';
792 print
'<td class="center">'.$langs->trans(
"Cash");
796 foreach ($arrayofpaymentmode as $key => $val) {
797 print
'<td align="center"'.($i == 0 ?
' class="hide0"' :
'').
'>'.$langs->trans($val);
807 print
'<td>'.$langs->trans(
"NbOfInvoices").
'</td>';
808 print
'<td class="center">';
812 foreach ($arrayofpaymentmode as $key => $val) {
813 print
'<td align="center"'.($i == 0 ?
' class="hide0"' :
'').
'>';
814 print $theoricalnbofinvoiceforterminal[$terminalid][$key];
819 print
'<td align="center"></td>';
824 print
'<td>'.$langs->trans(
"TheoricalAmount").
'</td>';
825 print
'<td class="center">';
826 print
price($initialbalanceforterminal[$terminalid][
'cash']).
'<br>';
830 foreach ($arrayofpaymentmode as $key => $val) {
831 print
'<td align="center"'.($i == 0 ?
' class="hide0"' :
'').
'>';
832 if ($key ==
'cash') {
833 $deltaforcash = (
$object->opening - $initialbalanceforterminal[$terminalid][
'cash']);
834 print
price($theoricalamountforterminal[$terminalid][$key] + $deltaforcash).
'<br>';
836 print
price($theoricalamountforterminal[$terminalid][$key]).
'<br>';
842 print
'<td align="center"></td>';
846 print
'<td>'.$langs->trans(
"RealAmount").
'</td>';
848 print
'<td class="center">';
850 if ($action ==
'close') {
853 print
'name="opening" type="text" class="maxwidth100 center" value="';
854 if ($action ==
'close') {
858 print(GETPOSTISSET(
'opening') ?
price2num(
GETPOST(
'opening',
'alpha')) :
price($initialbalanceforterminal[$terminalid][
'cash']));
864 foreach ($arrayofpaymentmode as $key => $val) {
865 print
'<td align="center"'.($i == 0 ?
' class="hide0"' :
'').
'>';
867 if ($action ==
'start') {
870 print
'name="'.$key.
'_amount" type="text"'.($key ==
'cash' ?
' autofocus' :
'').
' class="maxwidth100 center" value="'.
GETPOST($key.
'_amount',
'alpha').
'">';
875 print
'<td class="center">';
876 print
'<input type="submit" name="cancel" class="button button-cancel" value="'.$langs->trans(
"Cancel").
'">';
877 if ($action ==
'start') {
878 print
'<input type="submit" name="add" class="button button-save" value="'.$langs->trans(
"Save").
'">';
879 } elseif ($action ==
'close') {
880 print
'<input type="submit" name="valid" class="button" value="'.$langs->trans(
"Close").
'">';
if( $user->socid > 0) if(! $user->hasRight('accounting', 'chartofaccount')) $object
if(!defined('NOREQUIRESOC')) if(!defined( 'NOREQUIRETRAN')) if(!defined('NOTOKENRENEWAL')) if(!defined( 'NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined( 'NOREQUIREAJAX')) llxHeader()
Empty header.
Class to manage cash fence.
dol_get_first_day($year, $month=1, $gm=false)
Return GMT time for first day of a month or year.
dol_get_last_day($year, $month=12, $gm=false)
Return GMT time for last day of a month or year.
dol_mktime($hour, $minute, $second, $month, $day, $year, $gm='auto', $check=1)
Return a timestamp date built from detailed information (by default a local PHP server timestamp) Rep...
load_fiche_titre($title, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='')
Load a title with picto.
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.
price2num($amount, $rounding='', $option=0)
Function that return a number with universal decimal format (decimal separator is '.
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.
dol_now($mode='auto')
Return date for now.
getDolGlobalInt($key, $default=0)
Return a Dolibarr global constant int value.
dol_print_date($time, $format='', $tzoutput='auto', $outputlangs=null, $encodetooutput=false)
Output date in a string format according to outputlangs (or langs if not defined).
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.
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='', $noduplicate=0)
Set event messages in dol_events session object.
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 dolibarr global constant string value.
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.