26require
'../../main.inc.php';
27require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formadmin.class.php';
28require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formcompany.class.php';
29require_once DOL_DOCUMENT_ROOT.
'/core/lib/admin.lib.php';
30require_once DOL_DOCUMENT_ROOT.
'/core/lib/functions2.lib.php';
31require_once DOL_DOCUMENT_ROOT.
'/core/class/doleditor.class.php';
32require_once DOL_DOCUMENT_ROOT.
'/core/lib/accounting.lib.php';
33require_once DOL_DOCUMENT_ROOT.
'/accountancy/class/accountancyreport.class.php';
44$langs->loadLangs(array(
"errors",
"admin",
"companies"));
46$action =
GETPOST(
'action',
'aZ09') ?
GETPOST(
'action',
'aZ09') :
'view';
47$confirm =
GETPOST(
'confirm',
'alpha');
49$rowid =
GETPOST(
'rowid',
'alpha');
50$code =
GETPOST(
'code',
'alpha');
53if (!$user->hasRight(
'accounting',
'chartofaccount')) {
61$actl[0] =
img_picto($langs->trans(
"Disabled"),
'switch_off',
'class="size15x"');
62$actl[1] =
img_picto($langs->trans(
"Activated"),
'switch_on',
'class="size15x"');
64$listoffset =
GETPOST(
'listoffset',
'alpha');
67$sortfield =
GETPOST(
"sortfield",
'aZ09comma');
68$sortorder =
GETPOST(
"sortorder",
'aZ09comma');
70if (empty($page) || $page < 0 ||
GETPOST(
'button_search',
'alpha') ||
GETPOST(
'button_removefilter',
'alpha')) {
74$offset = $listlimit * $page;
78$search_country_id =
GETPOST(
'search_country_id',
'int');
81$hookmanager->initHooks(array(
'admin'));
91$tabname[45] = MAIN_DB_PREFIX.
"c_accounting_report";
95$tablib[45] =
"DictionaryAccountancyReport";
99$tabsql[45] =
"SELECT r.rowid as rowid, r.code as code, r.label, r.fk_country as country_id, c.code as country_code, c.label as country, r.active FROM ".MAIN_DB_PREFIX.
"c_accounting_report as r, ".MAIN_DB_PREFIX.
"c_country as c WHERE r.fk_country = c.rowid and c.active=1";
102$tabsqlsort = array();
103$tabsqlsort[45] =
"code ASC";
107$tabfield[45] =
"code,label,country";
110$tabfieldvalue = array();
111$tabfieldvalue[45] =
"code,label,country_id";
114$tabfieldinsert = array();
115$tabfieldinsert[45] =
"code,label,fk_country";
125$tabcond[45] = isModEnabled(
'accounting');
129$tabhelp[45] = array(
'code' => $langs->trans(
"EnterAnyCode"));
132$tabfieldcheck = array();
133$tabfieldcheck[45] = array();
136complete_dictionary_with_modules($taborder, $tabname, $tablib, $tabsql, $tabsqlsort, $tabfield, $tabfieldvalue, $tabfieldinsert, $tabrowid, $tabcond, $tabhelp, $tabfieldcheck);
145if (
GETPOST(
'button_removefilter',
'alpha') ||
GETPOST(
'button_removefilter.x',
'alpha') ||
GETPOST(
'button_removefilter_x',
'alpha')) {
146 $search_country_id =
'';
150if (
GETPOST(
'actionadd',
'alpha') ||
GETPOST(
'actionmodify',
'alpha')) {
151 $listfield = explode(
',', str_replace(
' ',
'', $tabfield[$id]));
152 $listfieldinsert = explode(
',', $tabfieldinsert[$id]);
153 $listfieldmodify = explode(
',', $tabfieldinsert[$id]);
154 $listfieldvalue = explode(
',', $tabfieldvalue[$id]);
158 foreach ($listfield as $f => $value) {
159 if (($value ==
'country' || $value ==
'country_id') &&
GETPOST(
'country_id')) {
162 if (!GETPOSTISSET($value) ||
GETPOST($value) ==
'') {
164 $fieldnamekey = $listfield[$f];
166 if ($fieldnamekey ==
'libelle' || ($fieldnamekey ==
'label')) {
167 $fieldnamekey =
'Label';
169 if ($fieldnamekey ==
'code') {
170 $fieldnamekey =
'Code';
172 if ($fieldnamekey ==
'country') {
173 $fieldnamekey =
'Country';
176 setEventMessages($langs->transnoentities(
"ErrorFieldRequired", $langs->transnoentities($fieldnamekey)),
null,
'errors');
179 if (GETPOSTISSET(
"code")) {
182 setEventMessages($langs->transnoentities(
'ErrorCodeCantContainZero'),
null,
'errors');
187 if ($ok &&
GETPOST(
'actionadd',
'alpha')) {
190 if ($tabrowid[$id]) {
192 $sql =
"SELECT MAX(".$db->sanitize($tabrowid[$id]).
") newid FROM ".$db->sanitize($tabname[$id]);
193 $result = $db->query($sql);
195 $obj = $db->fetch_object($result);
196 $newid = ($obj->newid + 1);
203 $sql =
"INSERT INTO ".$db->sanitize($tabname[$id]).
" (";
205 if ($tabrowid[$id] && !in_array($tabrowid[$id], $listfieldinsert)) {
206 $sql .= $db->sanitize($tabrowid[$id]).
",";
208 $sql .= $db->sanitize($tabfieldinsert[$id]);
213 if ($tabrowid[$id] && !in_array($tabrowid[$id], $listfieldinsert)) {
217 foreach ($listfieldinsert as $f => $value) {
218 if ($value ==
'entity') {
219 $_POST[$listfieldvalue[$i]] =
$conf->entity;
224 if (
GETPOST($listfieldvalue[$i]) ==
'' && !$listfieldvalue[$i] ==
'formula') {
227 $sql .=
"'".$db->escape(
GETPOST($listfieldvalue[$i])).
"'";
234 $result = $db->query($sql);
237 $_POST = array(
'id' => $id);
239 if ($db->errno() ==
'DB_ERROR_RECORD_ALREADY_EXISTS') {
240 setEventMessages($langs->transnoentities(
"ErrorRecordAlreadyExists"),
null,
'errors');
248 if ($ok &&
GETPOST(
'actionmodify',
'alpha')) {
249 if ($tabrowid[$id]) {
250 $rowidcol = $tabrowid[
$id];
256 $sql =
"UPDATE ".$db->sanitize($tabname[$id]).
" SET ";
258 if ($tabrowid[$id] && !in_array($tabrowid[$id], $listfieldmodify)) {
259 $sql .= $db->sanitize($tabrowid[$id]).
" = ";
260 $sql .=
"'".$db->escape($rowid).
"', ";
263 foreach ($listfieldmodify as $field) {
264 if ($field ==
'fk_country' &&
GETPOST(
'country') > 0) {
265 $_POST[$listfieldvalue[$i]] =
GETPOST(
'country');
266 } elseif ($field ==
'entity') {
267 $_POST[$listfieldvalue[$i]] =
$conf->entity;
273 if (
GETPOST($listfieldvalue[$i]) ==
'' && !$listfieldvalue[$i] ==
'range_account') {
276 $sql .=
"'".$db->escape(
GETPOST($listfieldvalue[$i])).
"'";
280 $sql .=
" WHERE ".$rowidcol.
" = ".((int) $rowid);
284 $resql = $db->query($sql);
291if ($action ==
'confirm_delete' && $confirm ==
'yes') {
294 $sql =
"DELETE from ".$db->sanitize($tabname[$id]).
" WHERE ".$db->sanitize($rowidcol).
" = ".((int) $rowid);
297 $result = $db->query($sql);
299 if ($db->errno() ==
'DB_ERROR_CHILD_EXISTS') {
300 setEventMessages($langs->transnoentities(
"ErrorRecordIsUsedByChild"),
null,
'errors');
308if ($action == $acts[0]) {
313 $sql =
"UPDATE ".$db->sanitize($tabname[$id]).
" SET active = 1 WHERE ".$db->sanitize($rowidcol).
" = ".((int) $rowid);
315 $sql =
"UPDATE ".$db->sanitize($tabname[$id]).
" SET active = 1 WHERE code = '".$db->escape($code).
"'";
319 $result = $db->query($sql);
327if ($action == $acts[1]) {
332 $sql =
"UPDATE ".$db->sanitize($tabname[$id]).
" SET active = 0 WHERE ".$db->sanitize($rowidcol).
" = ".((int) $rowid);
334 $sql =
"UPDATE ".$db->sanitize($tabname[$id]).
" SET active = 0 WHERE code = '".$db->escape($code).
"'";
338 $result = $db->query($sql);
349$form =
new Form($db);
352$help_url =
'EN:Module_Double_Entry_Accounting#Setup|FR:Module_Comptabilité_en_Partie_Double#Configuration';
354llxHeader(
'', $langs->trans(
'DictionaryAccountancyCategory'), $help_url,
'', 0, 0,
'',
'',
'',
'mod-accountancy page-admin_categories_list');
356$titre = $langs->trans($tablib[$id]);
358$titlepicto =
'setup';
362print
'<span class="opacitymedium">'.$langs->trans(
"AccountingAccountReportsDesc", $langs->transnoentitiesnoconv(
"ByPersonalizedAccountGroups")).
'</span><br><br>';
365if ($action ==
'delete') {
366 print $form->formconfirm($_SERVER[
"PHP_SELF"].
'?'.($page ?
'page='.$page.
'&' :
'').
'sortfield='.$sortfield.
'&sortorder='.$sortorder.
'&rowid='.$rowid.
'&code='.$code.
'&id='.
$id.($search_country_id > 0 ?
'&search_country_id='.$search_country_id :
''), $langs->trans(
'DeleteLine'), $langs->trans(
'ConfirmDeleteLine'),
'confirm_delete',
'', 0, 1);
372if ($search_country_id > 0) {
373 if (preg_match(
'/ WHERE /', $sql)) {
378 $sql .=
" (r.fk_country = ".((int) $search_country_id).
" OR r.fk_country = 0)";
382if ($sortfield ==
'country') {
383 $sortfield =
'country_code';
386$sql .= $db->order($sortfield, $sortorder);
387$sql .= $db->plimit($listlimit + 1, $offset);
390$fieldlist = explode(
',', $tabfield[$id]);
393if ($search_country_id > 0) {
394 $param .=
'&search_country_id='.urlencode((
string) ($search_country_id));
396$paramwithsearch = $param;
398 $paramwithsearch .=
'&sortorder='.urlencode($sortorder);
401 $paramwithsearch .=
'&sortfield='.urlencode($sortfield);
404 $paramwithsearch .=
'&from='.urlencode(
GETPOST(
'from',
'alpha'));
407 $paramwithsearch .=
'&listlimit='.urlencode((
string) (
GETPOSTINT(
'listlimit')));
409print
'<form action="'.$_SERVER[
'PHP_SELF'].
'?id='.
$id.
'" method="POST">';
410print
'<input type="hidden" name="token" value="'.newToken().
'">';
411print
'<input type="hidden" name="from" value="'.dol_escape_htmltag(
GETPOST(
'from',
'alpha')).
'">';
412print
'<input type="hidden" name="sortfield" value="'.dol_escape_htmltag($sortfield).
'">';
413print
'<input type="hidden" name="sortorder" value="'.dol_escape_htmltag($sortorder).
'">';
416print
'<div class="div-table-responsive-no-min">';
417print
'<table class="noborder centpercent">';
421 $fieldlist = explode(
',', $tabfield[$id]);
424 print
'<tr class="liste_titre">';
429 foreach ($fieldlist as $field => $value) {
432 $valuetoshow = ucfirst($fieldlist[$field]);
433 $valuetoshow = $langs->trans($valuetoshow);
435 if ($fieldlist[$field] ==
'code') {
436 $valuetoshow = $langs->trans(
"Code");
439 if ($fieldlist[$field] ==
'libelle' || $fieldlist[$field] ==
'label') {
440 $valuetoshow = $langs->trans(
"Label");
442 if ($fieldlist[$field] ==
'country') {
443 $valuetoshow = $langs->trans(
"Country");
446 if ($valuetoshow !=
'') {
447 print
'<td class="'.$class.
'">';
448 if (!empty($tabhelp[$id][$value]) && preg_match(
'/^http(s*):/i', $tabhelp[$id][$value])) {
449 print
'<a href="'.$tabhelp[
$id][$value].
'">'.$valuetoshow.
' '.
img_help(1, $valuetoshow).
'</a>';
450 } elseif (!empty($tabhelp[$id][$value])) {
451 print $form->textwithpicto($valuetoshow, $tabhelp[$id][$value]);
460 print
'<input type="hidden" name="id" value="'.$id.
'">';
470 print
'<tr class="oddeven nodrag nodrop nohover">';
479 if (
GETPOST(
'actionadd',
'alpha')) {
480 foreach ($fieldlist as $key => $val) {
487 $tmpaction =
'create';
488 $parameters = array(
'fieldlist' => $fieldlist,
'tabname' => $tabname[$id]);
489 $reshook = $hookmanager->executeHooks(
'createDictionaryFieldlist', $parameters, $obj, $tmpaction);
490 $error = $hookmanager->error;
491 $errors = $hookmanager->errors;
493 if (empty($reshook)) {
497 print
'<td colspan="2" class="right">';
498 print
'<input type="submit" class="button button-add" name="actionadd" value="'.$langs->trans(
"Add").
'">';
508 $colspan = count($fieldlist) + 3;
517print
'<div class="div-table-responsive">';
518print
'<table class="noborder centpercent">';
521dol_syslog(
"htdocs/accountancy/admin/categories_list.php", LOG_DEBUG);
523$resql = $db->query($sql);
525 $num = $db->num_rows($resql);
529 if ($num > $listlimit) {
530 print
'<tr class="none"><td class="right" colspan="'.(2 + count($fieldlist)).
'">';
531 print_fleche_navigation($page, $_SERVER[
"PHP_SELF"], $paramwithsearch, ($num > $listlimit ? 1 : 0),
'<li class="pagination"><span>'.$langs->trans(
"Page").
' '.($page + 1).
'</span></li>');
536 foreach ($fieldlist as $field => $value) {
538 if ($fieldlist[$field] ==
'region_id' || $fieldlist[$field] ==
'country_id') {
542 if ($value ==
'country') {
549 print
'<tr class="liste_titre liste_titre_filter">';
553 print
'<td class="liste_titre center">';
555 $searchpicto = $form->showFilterAndCheckAddButtons(0);
562 foreach ($fieldlist as $field => $value) {
565 if ($fieldlist[$field] ==
'region_id' || $fieldlist[$field] ==
'country_id') {
570 if ($value ==
'country') {
571 print
'<td class="liste_titre">';
572 print $form->select_country($search_country_id,
'search_country_id',
'', 28,
'maxwidth150 maxwidthonsmartphone');
576 print
'<td class="liste_titre"></td>';
580 print
'<td class="liste_titre"></td>';
583 print
'<td class="liste_titre center">';
585 $searchpicto = $form->showFilterAndCheckAddButtons(0);
593 print
'<tr class="liste_titre">';
598 foreach ($fieldlist as $field => $value) {
606 $valuetoshow = ucfirst($fieldlist[$field]);
607 $valuetoshow = $langs->trans($valuetoshow);
608 if ($fieldlist[$field] ==
'code') {
609 $valuetoshow = $langs->trans(
"Code");
611 if ($fieldlist[$field] ==
'libelle' || $fieldlist[$field] ==
'label') {
612 $valuetoshow = $langs->trans(
"Label");
614 if ($fieldlist[$field] ==
'country') {
615 $valuetoshow = $langs->trans(
"Country");
617 if ($fieldlist[$field] ==
'region_id' || $fieldlist[$field] ==
'country_id') {
622 print
getTitleFieldOfList($valuetoshow, 0, $_SERVER[
"PHP_SELF"], ($sortable ? $fieldlist[$field] :
''), ($page ?
'page='.$page.
'&' :
''), $param,
"", $sortfield, $sortorder, $class.
' ');
625 print
getTitleFieldOfList($langs->trans(
"Status"), 0, $_SERVER[
"PHP_SELF"],
"active", ($page ?
'page='.$page.
'&' :
''), $param,
'', $sortfield, $sortorder,
'center ');
634 $imaxinloop = ($listlimit ? min($num, $listlimit) : $num);
637 while ($i < $imaxinloop) {
638 $obj = $db->fetch_object($resql);
641 print
'<tr class="oddeven" id="rowid-'.$obj->rowid.
'">';
642 if ($action ==
'edit' && ($rowid == (!empty($obj->rowid) ? $obj->rowid : $obj->code))) {
644 $parameters = array(
'fieldlist' => $fieldlist,
'tabname' => $tabname[$id]);
645 $reshook = $hookmanager->executeHooks(
'editDictionaryFieldlist', $parameters, $obj, $tmpaction);
646 $error = $hookmanager->error;
647 $errors = $hookmanager->errors;
655 if (empty($reshook)) {
660 print
'<td class="center">';
661 print
'<div name="'.(!empty($obj->rowid) ? $obj->rowid : $obj->code).
'"></div>';
662 print
'<input type="hidden" name="page" value="'.$page.
'">';
663 print
'<input type="hidden" name="rowid" value="'.$rowid.
'">';
664 print
'<input type="submit" class="button button-edit smallpaddingimp" name="actionmodify" value="'.$langs->trans(
"Modify").
'">';
665 print
'<input type="submit" class="button button-cancel smallpaddingimp" name="actioncancel" value="'.$langs->trans(
"Cancel").
'">';
676 if (isset($obj->code)) {
677 if (($obj->code ==
'0' || $obj->code ==
'' || preg_match(
'/unknown/i', $obj->code))) {
682 $url = $_SERVER[
"PHP_SELF"].
'?'.($page ?
'page='.$page.
'&' :
'').
'sortfield='.$sortfield.
'&sortorder='.$sortorder.
'&rowid='.(!empty($obj->rowid) ? $obj->rowid : (!empty($obj->code) ? $obj->code :
'')).
'&code='.(!empty($obj->code) ? urlencode($obj->code) :
'');
688 $canbemodified = $iserasable;
691 $parameters = array(
'fieldlist' => $fieldlist,
'tabname' => $tabname[$id]);
692 $reshook = $hookmanager->executeHooks(
'viewDictionaryFieldlist', $parameters, $obj, $tmpaction);
694 $error = $hookmanager->error;
695 $errors = $hookmanager->errors;
699 print
'<td class="center">';
700 if ($canbemodified) {
701 print
'<a class="reposition editfielda marginleftonly marginrightonly" href="'.$url.
'action=edit&token='.
newToken().
'">'.
img_edit().
'</a>';
705 print
'<a class="marginleftonly marginrightonly" href="'.$url.
'action=delete&token='.
newToken().
'">'.
img_delete().
'</a>';
711 if (empty($reshook)) {
712 foreach ($fieldlist as $field => $value) {
717 $tmpvar = $fieldlist[$field];
718 $valuetoshow = $obj->$tmpvar;
719 if ($valuetoshow ==
'all') {
720 $valuetoshow = $langs->trans(
'All');
721 } elseif ($fieldlist[$field] ==
'country') {
722 if (empty($obj->country_code)) {
725 $key = $langs->trans(
"Country".strtoupper($obj->country_code));
726 $valuetoshow = ($key !=
"Country".strtoupper($obj->country_code) ? $obj->country_code.
" - ".$key : $obj->country);
728 } elseif (in_array($fieldlist[$field], array(
'label'))) {
729 $class =
"tdoverflowmax250";
730 $title = $valuetoshow;
731 } elseif ($fieldlist[$field] ==
'region_id' || $fieldlist[$field] ==
'country_id') {
737 print
'<!-- '.$fieldlist[$field].
' --><td class="'.$class.
'"'.($title ?
' title="'.dol_escape_htmltag($title).
'"' :
'').
'>'.
dol_escape_htmltag($valuetoshow).
'</td>';
743 print
'<td class="center" class="nowrap">';
744 if ($canbedisabled) {
745 print
'<a class="reposition" href="'.$url.
'action='.$acts[$obj->active].
'&token='.
newToken().
'">'.$actl[$obj->active].
'</a>';
747 print $langs->trans(
"AlwaysActive");
753 print
'<td class="center">';
754 if ($canbemodified) {
755 print
'<a class="reposition editfielda paddingleft marginleftonly marginrightonly paddingright" href="'.$url.
'action=edit&token='.
newToken().
'">'.
img_edit().
'</a>';
759 print
'<a class="paddingleft marginleftonly marginrightonly paddingright" href="'.$url.
'action=delete&token='.
newToken().
'">'.
img_delete().
'</a>';
770 print
'<tr><td colspan="'.$colspan.
'"><span class="opacitymedium">'.$langs->trans(
"None").
'</td></tr>';
799 global $form, $mysoc;
801 foreach ($fieldlist as $field => $value) {
802 if ($fieldlist[$field] ==
'country') {
804 $fieldname =
'country';
806 $fieldname =
'country_id';
807 $preselectcountrycode = GETPOSTISSET(
'country_id') ?
GETPOSTINT(
'country_id') : $mysoc->country_code;
808 print $form->select_country($preselectcountrycode, $fieldname,
'', 28,
'maxwidth150 maxwidthonsmartphone');
810 $preselectcountrycode = (empty($obj->country_code) ? (empty($obj->country) ? $mysoc->country_code : $obj->country) : $obj->country_code);
811 print $form->select_country($preselectcountrycode, $fieldname,
'', 28,
'maxwidth150 maxwidthonsmartphone');
814 } elseif ($fieldlist[$field] ==
'country_id') {
815 if (!in_array(
'country', $fieldlist)) {
816 $country_id = (!empty($obj->{$fieldlist[$field]}) ? $obj->{$fieldlist[$field]} : 0);
818 print
'<input type="hidden" name="'.$fieldlist[$field].
'" value="'.$country_id.
'">';
821 } elseif ($fieldlist[$field] ==
'code' && isset($obj->{$fieldlist[$field]})) {
822 print
'<td><input type="text" class="flat minwidth100" value="'.(!empty($obj->{$fieldlist[$field]}) ? $obj->{$fieldlist[$field]} :
'').
'" name="'.$fieldlist[$field].
'"></td>';
826 if (in_array($fieldlist[$field], array(
'label'))) {
827 $class =
'maxwidth150';
829 print
'<input type="text" class="flat'.($class ?
' '.$class :
'').
'" value="'.(isset($obj->{$fieldlist[$field]}) ? $obj->{$fieldlist[$field]} :
'').
'" name="'.$fieldlist[$field].
'">';
complete_dictionary_with_modules(&$taborder, &$tabname, &$tablib, &$tabsql, &$tabsqlsort, &$tabfield, &$tabfieldvalue, &$tabfieldinsert, &$tabrowid, &$tabcond, &$tabhelp, &$tabcomplete)
Add external modules to list of dictionaries.
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.
Class to manage reports for accounting categories.
load_fiche_titre($title, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='')
Load a title with picto.
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='', $noduplicate=0, $attop=0)
Set event messages in dol_events session object.
img_help($usehelpcursor=1, $usealttitle=1)
Show help logo with cursor "?".
img_delete($titlealt='default', $other='class="pictodelete"', $morecss='')
Show delete logo.
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.
newToken()
Return the value of token currently saved into session with name 'newtoken'.
getTitleFieldOfList($name, $thead=0, $file="", $field="", $begin="", $moreparam="", $moreattrib="", $sortfield="", $sortorder="", $prefix="", $disablesortlink=0, $tooltip='', $forcenowrapcolumntitle=0)
Get title line of an array.
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
dol_print_error($db=null, $error='', $errors=null)
Displays error message system with all the information to facilitate the diagnosis and the escalation...
print_fleche_navigation($page, $file, $options='', $nextpage=0, $betweenarrows='', $afterarrows='', $limit=-1, $totalnboflines=0, $selectlimitsuffix='', $beforearrows='', $hidenavigation=0)
Function to show navigation arrows into lists.
getDolGlobalString($key, $default='')
Return a Dolibarr global constant string value.
img_edit($titlealt='default', $float=0, $other='')
Show logo edit/modify fiche.
dol_syslog($message, $level=LOG_INFO, $ident=0, $suffixinfilename='', $restricttologhandler='', $logcontext=null)
Write log message into outputs.
dol_escape_htmltag($stringtoescape, $keepb=0, $keepn=0, $noescapetags='', $escapeonlyhtmltags=0, $cleanalsojavascript=0)
Returns text escaped for inclusion in HTML alt or title or value tags, or into values of HTML input f...
global $conf
The following vars must be defined: $type2label $form $conf, $lang, The following vars may also be de...
$context
@method int call_trigger(string $triggerName, User $user)
fieldListAccountingReport($fieldlist, $obj=null, $tabname='', $context='')
Show fields in insert/edit mode.
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.