27require
'../../main.inc.php';
28require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formadmin.class.php';
29require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formcompany.class.php';
30require_once DOL_DOCUMENT_ROOT.
'/core/lib/admin.lib.php';
31require_once DOL_DOCUMENT_ROOT.
'/core/lib/functions2.lib.php';
32require_once DOL_DOCUMENT_ROOT.
'/core/class/doleditor.class.php';
33require_once DOL_DOCUMENT_ROOT.
'/core/lib/accounting.lib.php';
34require_once DOL_DOCUMENT_ROOT.
'/accountancy/class/accountancyreport.class.php';
45$langs->loadLangs(array(
"errors",
"admin",
"companies"));
47$action =
GETPOST(
'action',
'aZ09') ?
GETPOST(
'action',
'aZ09') :
'view';
48$confirm =
GETPOST(
'confirm',
'alpha');
50$rowid =
GETPOST(
'rowid',
'alpha');
51$code =
GETPOST(
'code',
'alpha');
54if (!$user->hasRight(
'accounting',
'chartofaccount')) {
62$actl[0] =
img_picto($langs->trans(
"Disabled"),
'switch_off',
'class="size15x"');
63$actl[1] =
img_picto($langs->trans(
"Activated"),
'switch_on',
'class="size15x"');
65$listoffset =
GETPOST(
'listoffset',
'alpha');
68$sortfield =
GETPOST(
"sortfield",
'aZ09comma');
69$sortorder =
GETPOST(
"sortorder",
'aZ09comma');
71if (empty($page) || $page < 0 ||
GETPOST(
'button_search',
'alpha') ||
GETPOST(
'button_removefilter',
'alpha')) {
75$offset = $listlimit * $page;
79$search_country_id =
GETPOST(
'search_country_id',
'int');
82$hookmanager->initHooks(array(
'admin'));
92$tabname[45] = MAIN_DB_PREFIX.
"c_accounting_report";
96$tablib[45] =
"DictionaryAccountancyReport";
100$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";
103$tabsqlsort = array();
104$tabsqlsort[45] =
"code ASC";
108$tabfield[45] =
"code,label,country";
111$tabfieldvalue = array();
112$tabfieldvalue[45] =
"code,label,country_id";
115$tabfieldinsert = array();
116$tabfieldinsert[45] =
"code,label,fk_country";
130$tabhelp[45] = array(
'code' => $langs->trans(
"EnterAnyCode"));
133$tabfieldcheck = array();
134$tabfieldcheck[45] = array();
137complete_dictionary_with_modules($taborder, $tabname, $tablib, $tabsql, $tabsqlsort, $tabfield, $tabfieldvalue, $tabfieldinsert, $tabrowid, $tabcond, $tabhelp, $tabfieldcheck);
146if (
GETPOST(
'button_removefilter',
'alpha') ||
GETPOST(
'button_removefilter.x',
'alpha') ||
GETPOST(
'button_removefilter_x',
'alpha')) {
147 $search_country_id =
'';
151if (
GETPOST(
'actionadd',
'alpha') ||
GETPOST(
'actionmodify',
'alpha')) {
152 $listfield = explode(
',', str_replace(
' ',
'', $tabfield[$id]));
153 $listfieldinsert = explode(
',', $tabfieldinsert[$id]);
154 $listfieldmodify = explode(
',', $tabfieldinsert[$id]);
155 $listfieldvalue = explode(
',', $tabfieldvalue[$id]);
159 foreach ($listfield as $f => $value) {
160 if (($value ==
'country' || $value ==
'country_id') &&
GETPOST(
'country_id')) {
163 if (!GETPOSTISSET($value) ||
GETPOST($value) ==
'') {
165 $fieldnamekey = $listfield[$f];
167 if ($fieldnamekey ==
'libelle' || ($fieldnamekey ==
'label')) {
168 $fieldnamekey =
'Label';
170 if ($fieldnamekey ==
'code') {
171 $fieldnamekey =
'Code';
173 if ($fieldnamekey ==
'country') {
174 $fieldnamekey =
'Country';
177 setEventMessages($langs->transnoentities(
"ErrorFieldRequired", $langs->transnoentities($fieldnamekey)),
null,
'errors');
180 if (GETPOSTISSET(
"code")) {
183 setEventMessages($langs->transnoentities(
'ErrorCodeCantContainZero'),
null,
'errors');
188 if ($ok &&
GETPOST(
'actionadd',
'alpha')) {
191 if ($tabrowid[$id]) {
193 $sql =
"SELECT MAX(".$db->sanitize($tabrowid[$id]).
") newid FROM ".
$db->sanitize($tabname[$id]);
194 $result =
$db->query($sql);
196 $obj =
$db->fetch_object($result);
197 $newid = ($obj->newid + 1);
204 $sql =
"INSERT INTO ".$db->sanitize($tabname[$id]).
" (";
206 if ($tabrowid[$id] && !in_array($tabrowid[$id], $listfieldinsert)) {
207 $sql .=
$db->sanitize($tabrowid[$id]).
",";
209 $sql .=
$db->sanitize($tabfieldinsert[$id]);
214 if ($tabrowid[$id] && !in_array($tabrowid[$id], $listfieldinsert)) {
218 foreach ($listfieldinsert as $f => $value) {
219 if ($value ==
'entity') {
220 $_POST[$listfieldvalue[$i]] =
$conf->entity;
225 if (
GETPOST($listfieldvalue[$i]) ==
'' && !$listfieldvalue[$i] ==
'formula') {
228 $sql .=
"'".$db->escape(
GETPOST($listfieldvalue[$i])).
"'";
235 $result =
$db->query($sql);
238 $_POST = array(
'id' => $id);
240 if (
$db->errno() ==
'DB_ERROR_RECORD_ALREADY_EXISTS') {
241 setEventMessages($langs->transnoentities(
"ErrorRecordAlreadyExists"),
null,
'errors');
249 if ($ok &&
GETPOST(
'actionmodify',
'alpha')) {
250 if ($tabrowid[$id]) {
251 $rowidcol = $tabrowid[
$id];
257 $sql =
"UPDATE ".$db->sanitize($tabname[$id]).
" SET ";
259 if ($tabrowid[$id] && !in_array($tabrowid[$id], $listfieldmodify)) {
260 $sql .=
$db->sanitize($tabrowid[$id]).
" = ";
261 $sql .=
"'".$db->escape($rowid).
"', ";
264 foreach ($listfieldmodify as $field) {
265 if ($field ==
'fk_country' &&
GETPOST(
'country') > 0) {
266 $_POST[$listfieldvalue[$i]] =
GETPOST(
'country');
267 } elseif ($field ==
'entity') {
268 $_POST[$listfieldvalue[$i]] =
$conf->entity;
274 if (
GETPOST($listfieldvalue[$i]) ==
'' && !$listfieldvalue[$i] ==
'range_account') {
277 $sql .=
"'".$db->escape(
GETPOST($listfieldvalue[$i])).
"'";
281 $sql .=
" WHERE ".$db->sanitize($rowidcol).
" = ".((int) $rowid);
285 $resql =
$db->query($sql);
292if ($action ==
'confirm_delete' && $confirm ==
'yes') {
295 $sql =
"DELETE from ".$db->sanitize($tabname[$id]).
" WHERE ".
$db->sanitize($rowidcol).
" = ".((int) $rowid);
298 $result =
$db->query($sql);
300 if (
$db->errno() ==
'DB_ERROR_CHILD_EXISTS') {
301 setEventMessages($langs->transnoentities(
"ErrorRecordIsUsedByChild"),
null,
'errors');
309if ($action == $acts[0]) {
314 $sql =
"UPDATE ".$db->sanitize($tabname[$id]).
" SET active = 1 WHERE ".
$db->sanitize($rowidcol).
" = ".((int) $rowid);
316 $sql =
"UPDATE ".$db->sanitize($tabname[$id]).
" SET active = 1 WHERE code = '".
$db->escape($code).
"'";
320 $result =
$db->query($sql);
328if ($action == $acts[1]) {
333 $sql =
"UPDATE ".$db->sanitize($tabname[$id]).
" SET active = 0 WHERE ".
$db->sanitize($rowidcol).
" = ".((int) $rowid);
335 $sql =
"UPDATE ".$db->sanitize($tabname[$id]).
" SET active = 0 WHERE code = '".
$db->escape($code).
"'";
339 $result =
$db->query($sql);
353$help_url =
'EN:Module_Double_Entry_Accounting#Setup|FR:Module_Comptabilité_en_Partie_Double#Configuration';
355llxHeader(
'', $langs->trans(
'DictionaryAccountancyCategory'), $help_url,
'', 0, 0,
'',
'',
'',
'mod-accountancy page-admin_categories_list');
357$titre = $langs->trans($tablib[$id]);
359$titlepicto =
'setup';
363print
'<span class="opacitymedium">'.$langs->trans(
"AccountingAccountReportsDesc", $langs->transnoentitiesnoconv(
"ByPersonalizedAccountGroups")).
'</span><br><br>';
366if ($action ==
'delete') {
367 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);
373if ($search_country_id > 0) {
374 if (preg_match(
'/ WHERE /', $sql)) {
379 $sql .=
" (r.fk_country = ".((int) $search_country_id).
" OR r.fk_country = 0)";
383if ($sortfield ==
'country') {
384 $sortfield =
'country_code';
387$sql .=
$db->order($sortfield, $sortorder);
388$sql .=
$db->plimit($listlimit + 1, $offset);
391$fieldlist = explode(
',', $tabfield[$id]);
394if ($search_country_id > 0) {
395 $param .=
'&search_country_id='.urlencode((
string) ($search_country_id));
397$paramwithsearch = $param;
399 $paramwithsearch .=
'&sortorder='.urlencode($sortorder);
402 $paramwithsearch .=
'&sortfield='.urlencode($sortfield);
405 $paramwithsearch .=
'&from='.urlencode(
GETPOST(
'from',
'alpha'));
408 $paramwithsearch .=
'&listlimit='.urlencode((
string) (
GETPOSTINT(
'listlimit')));
410print
'<form action="'.$_SERVER[
'PHP_SELF'].
'?id='.
$id.
'" method="POST">';
411print
'<input type="hidden" name="token" value="'.newToken().
'">';
412print
'<input type="hidden" name="from" value="'.dol_escape_htmltag(
GETPOST(
'from',
'alpha')).
'">';
413print
'<input type="hidden" name="sortfield" value="'.dol_escape_htmltag($sortfield).
'">';
414print
'<input type="hidden" name="sortorder" value="'.dol_escape_htmltag($sortorder).
'">';
417print
'<div class="div-table-responsive-no-min">';
418print
'<table class="noborder centpercent">';
422 $fieldlist = explode(
',', $tabfield[$id]);
425 print
'<tr class="liste_titre">';
427 if (
$conf->main_checkbox_left_column) {
430 foreach ($fieldlist as $field => $value) {
433 $valuetoshow = ucfirst($fieldlist[$field]);
434 $valuetoshow = $langs->trans($valuetoshow);
436 if ($fieldlist[$field] ==
'code') {
437 $valuetoshow = $langs->trans(
"Code");
440 if ($fieldlist[$field] ==
'libelle' || $fieldlist[$field] ==
'label') {
441 $valuetoshow = $langs->trans(
"Label");
443 if ($fieldlist[$field] ==
'country') {
444 $valuetoshow = $langs->trans(
"Country");
447 if ($valuetoshow !=
'') {
448 print
'<td class="'.$class.
'">';
449 if (!empty($tabhelp[$id][$value]) && preg_match(
'/^http(s*):/i', $tabhelp[$id][$value])) {
450 print
'<a href="'.$tabhelp[
$id][$value].
'">'.$valuetoshow.
' '.
img_help(1, $valuetoshow).
'</a>';
451 } elseif (!empty($tabhelp[$id][$value])) {
452 print $form->textwithpicto($valuetoshow, $tabhelp[$id][$value]);
461 print
'<input type="hidden" name="id" value="'.$id.
'">';
465 if (!
$conf->main_checkbox_left_column) {
471 print
'<tr class="oddeven nodrag nodrop nohover">';
474 if (
$conf->main_checkbox_left_column) {
480 if (
GETPOST(
'actionadd',
'alpha')) {
481 foreach ($fieldlist as $key => $val) {
488 $tmpaction =
'create';
489 $parameters = array(
'fieldlist' => $fieldlist,
'tabname' => $tabname[$id]);
490 $reshook = $hookmanager->executeHooks(
'createDictionaryFieldlist', $parameters, $obj, $tmpaction);
491 $error = $hookmanager->error;
492 $errors = $hookmanager->errors;
494 if (empty($reshook)) {
498 print
'<td colspan="2" class="right">';
499 print
'<input type="submit" class="button button-add" name="actionadd" value="'.$langs->trans(
"Add").
'">';
503 if (!
$conf->main_checkbox_left_column) {
509 $colspan = count($fieldlist) + 3;
518print
'<div class="div-table-responsive">';
519print
'<table class="noborder centpercent">';
522dol_syslog(
"htdocs/accountancy/admin/categories_list.php", LOG_DEBUG);
524$resql =
$db->query($sql);
526 $num =
$db->num_rows($resql);
530 if ($num > $listlimit) {
531 print
'<tr class="none"><td class="right" colspan="'.(2 + count($fieldlist)).
'">';
532 print_fleche_navigation($page, $_SERVER[
"PHP_SELF"], $paramwithsearch, ($num > $listlimit ? 1 : 0),
'<li class="pagination"><span>'.$langs->trans(
"Page").
' '.($page + 1).
'</span></li>');
537 foreach ($fieldlist as $field => $value) {
539 if ($fieldlist[$field] ==
'region_id' || $fieldlist[$field] ==
'country_id') {
543 if ($value ==
'country') {
550 print
'<tr class="liste_titre liste_titre_filter">';
553 if (
$conf->main_checkbox_left_column) {
554 print
'<td class="liste_titre center">';
556 $searchpicto = $form->showFilterAndCheckAddButtons(0);
563 foreach ($fieldlist as $field => $value) {
566 if ($fieldlist[$field] ==
'region_id' || $fieldlist[$field] ==
'country_id') {
571 if ($value ==
'country') {
572 print
'<td class="liste_titre">';
573 print $form->select_country($search_country_id,
'search_country_id',
'', 28,
'maxwidth150 maxwidthonsmartphone');
577 print
'<td class="liste_titre"></td>';
581 print
'<td class="liste_titre"></td>';
583 if (!
$conf->main_checkbox_left_column) {
584 print
'<td class="liste_titre center">';
586 $searchpicto = $form->showFilterAndCheckAddButtons(0);
594 print
'<tr class="liste_titre">';
596 if (
$conf->main_checkbox_left_column) {
599 foreach ($fieldlist as $field => $value) {
607 $valuetoshow = ucfirst($fieldlist[$field]);
608 $valuetoshow = $langs->trans($valuetoshow);
609 if ($fieldlist[$field] ==
'code') {
610 $valuetoshow = $langs->trans(
"Code");
612 if ($fieldlist[$field] ==
'libelle' || $fieldlist[$field] ==
'label') {
613 $valuetoshow = $langs->trans(
"Label");
615 if ($fieldlist[$field] ==
'country') {
616 $valuetoshow = $langs->trans(
"Country");
618 if ($fieldlist[$field] ==
'region_id' || $fieldlist[$field] ==
'country_id') {
623 print
getTitleFieldOfList($valuetoshow, 0, $_SERVER[
"PHP_SELF"], ($sortable ? $fieldlist[$field] :
''), ($page ?
'page='.$page.
'&' :
''), $param,
"", $sortfield, $sortorder, $class.
' ');
626 print
getTitleFieldOfList($langs->trans(
"Status"), 0, $_SERVER[
"PHP_SELF"],
"active", ($page ?
'page='.$page.
'&' :
''), $param,
'', $sortfield, $sortorder,
'center ');
628 if (!
$conf->main_checkbox_left_column) {
635 $imaxinloop = ($listlimit ? min($num, $listlimit) : $num);
638 while ($i < $imaxinloop) {
639 $obj =
$db->fetch_object($resql);
642 print
'<tr class="oddeven" id="rowid-'.$obj->rowid.
'">';
643 if ($action ==
'edit' && ($rowid == (!empty($obj->rowid) ? $obj->rowid : $obj->code))) {
645 $parameters = array(
'fieldlist' => $fieldlist,
'tabname' => $tabname[$id]);
646 $reshook = $hookmanager->executeHooks(
'editDictionaryFieldlist', $parameters, $obj, $tmpaction);
647 $error = $hookmanager->error;
648 $errors = $hookmanager->errors;
651 if (
$conf->main_checkbox_left_column) {
656 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").
'">';
668 if (!
$conf->main_checkbox_left_column) {
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) :
'');
686 $canbemodified = $iserasable;
689 $parameters = array(
'fieldlist' => $fieldlist,
'tabname' => $tabname[$id]);
690 $reshook = $hookmanager->executeHooks(
'viewDictionaryFieldlist', $parameters, $obj, $tmpaction);
692 $error = $hookmanager->error;
693 $errors = $hookmanager->errors;
696 if (
$conf->main_checkbox_left_column) {
697 print
'<td class="center">';
698 if ($canbemodified) {
699 print
'<a class="reposition editfielda marginleftonly marginrightonly" href="'.$url.
'action=edit&token='.newToken().
'">'.
img_edit().
'</a>';
703 print
'<a class="marginleftonly marginrightonly" href="'.$url.
'action=delete&token='.newToken().
'">'.
img_delete().
'</a>';
709 if (empty($reshook)) {
710 foreach ($fieldlist as $field => $value) {
715 $tmpvar = $fieldlist[$field];
716 $valuetoshow = $obj->$tmpvar;
717 if ($valuetoshow ==
'all') {
718 $valuetoshow = $langs->trans(
'All');
719 } elseif ($fieldlist[$field] ==
'country') {
720 if (empty($obj->country_code)) {
723 $key = $langs->trans(
"Country".strtoupper($obj->country_code));
724 $valuetoshow = ($key !=
"Country".strtoupper($obj->country_code) ? $obj->country_code.
" - ".$key : $obj->country);
726 } elseif (in_array($fieldlist[$field], array(
'label'))) {
727 $class =
"tdoverflowmax250";
728 $title = $valuetoshow;
729 } elseif ($fieldlist[$field] ==
'region_id' || $fieldlist[$field] ==
'country_id') {
735 print
'<!-- '.$fieldlist[$field].
' --><td class="'.$class.
'"'.($title ?
' title="'.dol_escape_htmltag($title).
'"' :
'').
'>'.
dol_escape_htmltag($valuetoshow).
'</td>';
741 print
'<td class="center" class="nowrap">';
742 if ($canbedisabled) {
743 print
'<a class="reposition" href="'.$url.
'action='.$acts[$obj->active].
'&token='.newToken().
'">'.$actl[$obj->active].
'</a>';
745 print $langs->trans(
"AlwaysActive");
750 if (!
$conf->main_checkbox_left_column) {
751 print
'<td class="center">';
752 if ($canbemodified) {
753 print
'<a class="reposition editfielda paddingleft marginleftonly marginrightonly paddingright" href="'.$url.
'action=edit&token='.newToken().
'">'.
img_edit().
'</a>';
757 print
'<a class="paddingleft marginleftonly marginrightonly paddingright" href="'.$url.
'action=delete&token='.newToken().
'">'.
img_delete().
'</a>';
768 print
'<tr><td colspan="'.$colspan.
'"><span class="opacitymedium">'.$langs->trans(
"None").
'</td></tr>';
799 foreach ($fieldlist as $field => $value) {
800 if ($fieldlist[$field] ==
'country') {
802 $fieldname =
'country';
804 $fieldname =
'country_id';
805 $preselectcountrycode = GETPOSTISSET(
'country_id') ?
GETPOSTINT(
'country_id') :
$mysoc->country_code;
806 print $form->select_country($preselectcountrycode, $fieldname,
'', 28,
'maxwidth150 maxwidthonsmartphone');
808 $preselectcountrycode = (empty($obj->country_code) ? (empty($obj->country) ?
$mysoc->country_code : $obj->country) : $obj->country_code);
809 print $form->select_country($preselectcountrycode, $fieldname,
'', 28,
'maxwidth150 maxwidthonsmartphone');
812 } elseif ($fieldlist[$field] ==
'country_id') {
813 if (!in_array(
'country', $fieldlist)) {
814 $country_id = (!empty($obj->{$fieldlist[$field]}) ? $obj->{$fieldlist[$field]} : 0);
816 print
'<input type="hidden" name="'.$fieldlist[$field].
'" value="'.$country_id.
'">';
819 } elseif ($fieldlist[$field] ==
'code' && isset($obj->{$fieldlist[$field]})) {
820 print
'<td><input type="text" class="flat minwidth100" value="'.(!empty($obj->{$fieldlist[$field]}) ? $obj->{$fieldlist[$field]} :
'').
'" name="'.$fieldlist[$field].
'"></td>';
824 if (in_array($fieldlist[$field], array(
'label'))) {
825 $class =
'maxwidth150';
827 print
'<input type="text" class="flat'.($class ?
' '.$class :
'').
'" value="'.(isset($obj->{$fieldlist[$field]}) ? $obj->{$fieldlist[$field]} :
'').
'" name="'.$fieldlist[$field].
'">';
$id
Support class for third parties, contacts, members, users or resources.
llxFooter($comment='', $zone='private', $disabledoutputofmessages=0)
Empty footer.
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.
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_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)
img_delete($titlealt='default', $other='class="pictodelete"', $morecss='')
Show delete logo.
GETPOSTINT($paramname, $method=0)
Return the value of a $_GET or $_POST supervariable, converted into integer.
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...
load_fiche_titre($title, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='', $morecssonpicto='widthpictotitle')
Load a title with picto.
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.
isModEnabled($module)
Is Dolibarr module enabled.
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...
$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.