dolibarr 20.0.0
cabyuser.php
Go to the documentation of this file.
1<?php
2/* Copyright (C) 2001-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
3 * Copyright (C) 2004-2016 Laurent Destailleur <eldy@users.sourceforge.net>
4 * Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com>
5 * Copyright (C) 2013 Antoine Iauch <aiauch@gpcsolutions.fr>
6 * Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
7 * Copyright (C) 2022 Alexandre Spangaro <aspangaro@open-dsi.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
28// Load Dolibarr environment
29require '../../main.inc.php';
30require_once DOL_DOCUMENT_ROOT.'/core/lib/report.lib.php';
31require_once DOL_DOCUMENT_ROOT.'/core/lib/tax.lib.php';
32require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
33
34// Load translation files required by the page
35$langs->load("accountancy");
36
37$socid = GETPOSTINT('socid');
38
39// Security check
40if ($user->socid > 0) {
41 $socid = $user->socid;
42}
43if (isModEnabled('comptabilite')) {
44 $result = restrictedArea($user, 'compta', '', '', 'resultat');
45}
46if (isModEnabled('accounting')) {
47 $result = restrictedArea($user, 'accounting', '', '', 'comptarapport');
48}
49$hookmanager->initHooks(['cabyuserreportlist']);
50// Define modecompta ('CREANCES-DETTES' or 'RECETTES-DEPENSES')
51$modecompta = getDolGlobalString('ACCOUNTING_MODE');
52if (GETPOST("modecompta")) {
53 $modecompta = GETPOST("modecompta");
54}
55
56$sortorder = GETPOST("sortorder", 'aZ09comma');
57$sortfield = GETPOST("sortfield", 'aZ09comma');
58if (!$sortorder) {
59 $sortorder = "asc";
60}
61if (!$sortfield) {
62 $sortfield = "name";
63}
64
65// Date range
66$year = GETPOSTINT("year");
67$month = GETPOSTINT("month");
68$date_startyear = GETPOSTINT("date_startyear");
69$date_startmonth = GETPOSTINT("date_startmonth");
70$date_startday = GETPOSTINT("date_startday");
71$date_endyear = GETPOSTINT("date_endyear");
72$date_endmonth = GETPOSTINT("date_endmonth");
73$date_endday = GETPOSTINT("date_endday");
74if (empty($year)) {
75 $year_current = dol_print_date(dol_now(), '%Y');
76 $month_current = dol_print_date(dol_now(), '%m');
77 $year_start = $year_current;
78} else {
79 $year_current = $year;
80 $month_current = dol_print_date(dol_now(), '%m');
81 $year_start = $year;
82}
83$date_start = dol_mktime(0, 0, 0, GETPOST("date_startmonth"), GETPOST("date_startday"), GETPOST("date_startyear"), 'tzserver'); // We use timezone of server so report is same from everywhere
84$date_end = dol_mktime(23, 59, 59, GETPOST("date_endmonth"), GETPOST("date_endday"), GETPOST("date_endyear"), 'tzserver'); // We use timezone of server so report is same from everywhere
85// Quarter
86if (empty($date_start) || empty($date_end)) { // We define date_start and date_end
87 $q = GETPOST("q") ? GETPOST("q") : 0;
88 if ($q == 0) {
89 // We define date_start and date_end
90 $month_start = GETPOST("month") ? GETPOST("month") : getDolGlobalInt('SOCIETE_FISCAL_MONTH_START', 1);
91 $year_end = $year_start;
92 $month_end = $month_start;
93 if (!GETPOST("month")) { // If month not forced
94 if (!GETPOST('year') && $month_start > $month_current) {
95 $year_start--;
96 $year_end--;
97 }
98 $month_end = $month_start - 1;
99 if ($month_end < 1) {
100 $month_end = 12;
101 } else {
102 $year_end++;
103 }
104 }
105 $date_start = dol_get_first_day($year_start, $month_start, false);
106 $date_end = dol_get_last_day($year_end, $month_end, false);
107 }
108 if ($q == 1) {
109 $date_start = dol_get_first_day($year_start, 1, false);
110 $date_end = dol_get_last_day($year_start, 3, false);
111 }
112 if ($q == 2) {
113 $date_start = dol_get_first_day($year_start, 4, false);
114 $date_end = dol_get_last_day($year_start, 6, false);
115 }
116 if ($q == 3) {
117 $date_start = dol_get_first_day($year_start, 7, false);
118 $date_end = dol_get_last_day($year_start, 9, false);
119 }
120 if ($q == 4) {
121 $date_start = dol_get_first_day($year_start, 10, false);
122 $date_end = dol_get_last_day($year_start, 12, false);
123 }
124} else {
125 // TODO We define q
126}
127// $date_start and $date_end are defined. We force $year_start and $nbofyear
128$tmps = dol_getdate($date_start);
129$year_start = $tmps['year'];
130$tmpe = dol_getdate($date_end);
131$year_end = $tmpe['year'];
132$nbofyear = ($year_end - $year_start) + 1;
133
134$commonparams = array();
135$commonparams['modecompta'] = $modecompta;
136$commonparams['sortorder'] = $sortorder;
137$commonparams['sortfield'] = $sortfield;
138
139$headerparams = array();
140if (!empty($date_startyear)) {
141 $headerparams['date_startyear'] = $date_startyear;
142}
143if (!empty($date_startmonth)) {
144 $headerparams['date_startmonth'] = $date_startmonth;
145}
146if (!empty($date_startday)) {
147 $headerparams['date_startday'] = $date_startday;
148}
149if (!empty($date_endyear)) {
150 $headerparams['date_endyear'] = $date_endyear;
151}
152if (!empty($date_endmonth)) {
153 $headerparams['date_endmonth'] = $date_endmonth;
154}
155if (!empty($date_endday)) {
156 $headerparams['date_endday'] = $date_endday;
157}
158if (!empty($q)) {
159 $headerparams['q'] = $q;
160}
161
162$tableparams = array();
163
164// Adding common parameters
165$allparams = array_merge($commonparams, $headerparams, $tableparams);
166$headerparams = array_merge($commonparams, $headerparams);
167$tableparams = array_merge($commonparams, $tableparams);
168
169$paramslink = "";
170foreach ($allparams as $key => $value) {
171 $paramslink .= '&'.$key.'='.$value;
172}
173
174/*
175 * View
176 */
177
178llxHeader();
179
180$form = new Form($db);
181
182// TODO Report from bookkeeping not yet available, so we switch on report on business events
183if ($modecompta == "BOOKKEEPING") {
184 $modecompta = "CREANCES-DETTES";
185}
186if ($modecompta == "BOOKKEEPINGCOLLECTED") {
187 $modecompta = "RECETTES-DEPENSES";
188}
189
190$exportlink = "";
191$namelink = "";
192
193// Show report header
194if ($modecompta == "CREANCES-DETTES") {
195 $name = $langs->trans("Turnover").', '.$langs->trans("ByUserAuthorOfInvoice");
196 $calcmode = $langs->trans("CalcModeDebt");
197 //$calcmode.='<br>('.$langs->trans("SeeReportInInputOutputMode",'<a href="'.$_SERVER["PHP_SELF"].'?year='.$year_start.'&modecompta=RECETTES-DEPENSES">','</a>').')';
198 $description = $langs->trans("RulesCADue");
199 if (getDolGlobalString('FACTURE_DEPOSITS_ARE_JUST_PAYMENTS')) {
200 $description .= $langs->trans("DepositsAreNotIncluded");
201 } else {
202 $description .= $langs->trans("DepositsAreIncluded");
203 }
204 $builddate = dol_now();
205 //$exportlink=$langs->trans("NotYetAvailable");
206} elseif ($modecompta == "RECETTES-DEPENSES") {
207 $name = $langs->trans("TurnoverCollected").', '.$langs->trans("ByUserAuthorOfInvoice");
208 $calcmode = $langs->trans("CalcModePayment");
209 //$calcmode.='<br>('.$langs->trans("SeeReportInDueDebtMode",'<a href="'.$_SERVER["PHP_SELF"].'?year='.$year_start.'&modecompta=CREANCES-DETTES">','</a>').')';
210 $description = $langs->trans("RulesCAIn");
211 $description .= $langs->trans("DepositsAreIncluded");
212 $builddate = dol_now();
213 //$exportlink=$langs->trans("NotYetAvailable");
214} elseif ($modecompta == "BOOKKEEPING") {
215 // TODO
216} elseif ($modecompta == "BOOKKEEPINGCOLLECTED") {
217 // TODO
218}
219$period = $form->selectDate($date_start, 'date_start', 0, 0, 0, '', 1, 0, 0, '', '', '', '', 1, '', '', 'tzserver');
220$period .= ' - ';
221$period .= $form->selectDate($date_end, 'date_end', 0, 0, 0, '', 1, 0, 0, '', '', '', '', 1, '', '', 'tzserver');
222if ($date_end == dol_time_plus_duree($date_start, 1, 'y') - 1) {
223 $periodlink = '<a href="'.$_SERVER["PHP_SELF"].'?year='.($year_start - 1).'&modecompta='.$modecompta.'">'.img_previous().'</a> <a href="'.$_SERVER["PHP_SELF"].'?year='.($year_start + 1).'&modecompta='.$modecompta.'">'.img_next().'</a>';
224} else {
225 $periodlink = '';
226}
227
228$moreparam = array();
229if (!empty($modecompta)) {
230 $moreparam['modecompta'] = $modecompta;
231}
232
233report_header($name, $namelink, $period, $periodlink, $description, $builddate, $exportlink, $moreparam, $calcmode);
234
235if (isModEnabled('accounting') && $modecompta != 'BOOKKEEPING') {
236 print info_admin($langs->trans("WarningReportNotReliable"), 0, 0, 1);
237}
238
239
240$name = array();
241
242// Show array
243print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">';
244print '<input type="hidden" name="token" value="'.newToken().'">'."\n";
245// Extra parameters management
246foreach ($headerparams as $key => $value) {
247 print '<input type="hidden" name="'.$key.'" value="'.$value.'">';
248}
249
250$catotal = 0;
251$catotal_ht = 0;
252
253if ($modecompta == 'CREANCES-DETTES') {
254 $sql = "SELECT u.rowid as rowid, u.lastname as name, u.firstname as firstname, sum(f.total_ht) as amount, sum(f.total_ttc) as amount_ttc";
255 $sql .= " FROM ".MAIN_DB_PREFIX."user as u";
256 $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."facture as f ON f.fk_user_author = u.rowid";
257 $sql .= " WHERE f.fk_statut in (1,2)";
258 if (getDolGlobalString('FACTURE_DEPOSITS_ARE_JUST_PAYMENTS')) {
259 $sql .= " AND f.type IN (0,1,2,5)";
260 } else {
261 $sql .= " AND f.type IN (0,1,2,3,5)";
262 }
263 if ($date_start && $date_end) {
264 $sql .= " AND f.datef >= '".$db->idate($date_start)."' AND f.datef <= '".$db->idate($date_end)."'";
265 }
266} elseif ($modecompta == "RECETTES-DEPENSES") {
267 /*
268 * List of payments (old payments are not seen by this query because on older versions,
269 * they were not linked via the table llx_paiement_facture. They are added later)
270 */
271 $sql = "SELECT u.rowid as rowid, u.lastname as name, u.firstname as firstname, sum(pf.amount) as amount_ttc";
272 $sql .= " FROM ".MAIN_DB_PREFIX."user as u";
273 $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."facture as f ON f.fk_user_author = u.rowid ";
274 $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."paiement_facture as pf ON pf.fk_facture = f.rowid";
275 $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."paiement as p ON p.rowid = pf.fk_paiement";
276 $sql .= " WHERE 1=1";
277 if ($date_start && $date_end) {
278 $sql .= " AND p.datep >= '".$db->idate($date_start)."' AND p.datep <= '".$db->idate($date_end)."'";
279 }
280} elseif ($modecompta == "BOOKKEEPING") {
281} elseif ($modecompta == "BOOKKEEPINGCOLLECTED") {
282}
283$sql .= " AND f.entity IN (".getEntity('invoice').")";
284if ($socid) {
285 $sql .= " AND f.fk_soc = ".((int) $socid);
286}
287$sql .= " GROUP BY u.rowid, u.lastname, u.firstname";
288$sql .= " ORDER BY u.rowid";
289
290$amount = array();
291$amount_ht = array();
292
293dol_syslog("cabyuser", LOG_DEBUG);
294$result = $db->query($sql);
295if ($result) {
296 $num = $db->num_rows($result);
297 $i = 0;
298 while ($i < $num) {
299 $obj = $db->fetch_object($result);
300
301 $amount_ht[$obj->rowid] = (empty($obj->amount) ? 0 : $obj->amount);
302 $amount[$obj->rowid] = $obj->amount_ttc;
303 $name[$obj->rowid] = $obj->name.' '.$obj->firstname;
304
305 $catotal_ht += (empty($obj->amount) ? 0 : $obj->amount);
306 $catotal += $obj->amount_ttc;
307 $i++;
308 }
309} else {
310 dol_print_error($db);
311}
312
313// Adding old-version payments, non-bound by table llx_paiement_facture then without User
314if ($modecompta == 'RECETTES-DEPENSES') {
315 $sql = "SELECT -1 as rowidx, '' as name, '' as firstname, sum(DISTINCT p.amount) as amount_ttc";
316 $sql .= " FROM ".MAIN_DB_PREFIX."bank as b";
317 $sql .= ", ".MAIN_DB_PREFIX."bank_account as ba";
318 $sql .= ", ".MAIN_DB_PREFIX."paiement as p";
319 $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."paiement_facture as pf ON p.rowid = pf.fk_paiement";
320 $sql .= " WHERE pf.rowid IS NULL";
321 $sql .= " AND p.fk_bank = b.rowid";
322 $sql .= " AND b.fk_account = ba.rowid";
323 $sql .= " AND ba.entity IN (".getEntity('bank_account').")";
324 if ($date_start && $date_end) {
325 $sql .= " AND p.datep >= '".$db->idate($date_start)."' AND p.datep <= '".$db->idate($date_end)."'";
326 }
327 $sql .= " GROUP BY rowidx, name, firstname";
328 $sql .= " ORDER BY rowidx";
329
330 $result = $db->query($sql);
331 if ($result) {
332 $num = $db->num_rows($result);
333 $i = 0;
334 while ($i < $num) {
335 $obj = $db->fetch_object($result);
336 $amount[$obj->rowidx] = $obj->amount_ttc;
337 $name[$obj->rowidx] = $obj->name.' '.$obj->firstname;
338 $catotal += $obj->amount_ttc;
339 $i++;
340 }
341 } else {
342 dol_print_error($db);
343 }
344}
345
346$moreforfilter = '';
347
348print '<div class="div-table-responsive">';
349print '<table class="tagtable liste'.($moreforfilter ? " listwithfilterbefore" : "").'">'."\n";
350
351print "<tr class=\"liste_titre\">";
353 $langs->trans("User"),
354 $_SERVER["PHP_SELF"],
355 "name",
356 "",
357 $paramslink,
358 "",
359 $sortfield,
360 $sortorder
361);
362if ($modecompta == 'CREANCES-DETTES') {
364 $langs->trans('AmountHT'),
365 $_SERVER["PHP_SELF"],
366 "amount_ht",
367 "",
368 $paramslink,
369 'class="right"',
370 $sortfield,
371 $sortorder
372 );
373} else {
375}
377 $langs->trans("AmountTTC"),
378 $_SERVER["PHP_SELF"],
379 "amount_ttc",
380 "",
381 $paramslink,
382 'class="right"',
383 $sortfield,
384 $sortorder
385);
387 $langs->trans("Percentage"),
388 $_SERVER["PHP_SELF"],
389 "amount_ttc",
390 "",
391 $paramslink,
392 'class="right"',
393 $sortfield,
394 $sortorder
395);
397 $langs->trans("OtherStatistics"),
398 $_SERVER["PHP_SELF"],
399 "",
400 "",
401 "",
402 'align="center" width="20%"'
403);
404print "</tr>\n";
405
406if (count($amount)) {
407 $arrayforsort = $name;
408
409 // We define arrayforsort
410 if ($sortfield == 'name' && $sortorder == 'asc') {
411 asort($name);
412 $arrayforsort = $name;
413 }
414 if ($sortfield == 'name' && $sortorder == 'desc') {
415 arsort($name);
416 $arrayforsort = $name;
417 }
418 if ($sortfield == 'amount_ht' && $sortorder == 'asc') {
419 asort($amount_ht);
420 $arrayforsort = $amount_ht;
421 }
422 if ($sortfield == 'amount_ht' && $sortorder == 'desc') {
423 arsort($amount_ht);
424 $arrayforsort = $amount_ht;
425 }
426 if ($sortfield == 'amount_ttc' && $sortorder == 'asc') {
427 asort($amount);
428 $arrayforsort = $amount;
429 }
430 if ($sortfield == 'amount_ttc' && $sortorder == 'desc') {
431 arsort($amount);
432 $arrayforsort = $amount;
433 }
434
435 $i = 0;
436
437 foreach ($arrayforsort as $key => $value) {
438 print '<tr class="oddeven">';
439
440 // Third party
441 $fullname = $name[$key];
442 if ($key >= 0) {
443 $linkname = '<a href="'.DOL_URL_ROOT.'/user/card.php?id='.$key.'">'.img_object($langs->trans("ShowUser"), 'user').' '.$fullname.'</a>';
444 } else {
445 $linkname = $langs->trans("PaymentsNotLinkedToUser");
446 }
447 print "<td>".$linkname."</td>\n";
448
449 // Amount w/o VAT
450 print '<td class="right">';
451 if ($modecompta == 'RECETTES-DEPENSES') {
452 if ($key > 0) {
453 //print '<a href="'.DOL_URL_ROOT.'/compta/paiement/list.php?userid='.$key.'">';
454 } else {
455 //print '<a href="'.DOL_URL_ROOT.'/compta/paiement/list.php?userid=-1">';
456 }
457 } elseif ($modecompta == 'CREANCES-DETTES') {
458 if ($key > 0) {
459 print '<a href="'.DOL_URL_ROOT.'/compta/facture/list.php?userid='.$key.'">';
460 } else {
461 //print '<a href="#">';
462 }
463 print price($amount_ht[$key]);
464 if ($key > 0) {
465 print '</a>';
466 }
467 }
468 print '</td>';
469
470 // Amount with VAT
471 print '<td class="right">';
472 if ($modecompta == 'RECETTES-DEPENSES') {
473 if ($key > 0) {
474 //print '<a href="'.DOL_URL_ROOT.'/compta/paiement/list.php?userid='.$key.'">';
475 } else {
476 //print '<a href="'.DOL_URL_ROOT.'/compta/paiement/list.php?userid=-1">';
477 }
478 } elseif ($modecompta == 'CREANCES-DETTES') {
479 if ($key > 0) {
480 print '<a href="'.DOL_URL_ROOT.'/compta/facture/list.php?userid='.$key.'">';
481 } else {
482 //print '<a href="#">';
483 }
484 }
485 print price($amount[$key]);
486 if ($modecompta == 'RECETTES-DEPENSES') {
487 if ($key > 0) {
488 //print '</a>';
489 } else {
490 //print '</a>';
491 }
492 } elseif ($modecompta == 'CREANCES-DETTES') {
493 if ($key > 0) {
494 print '</a>';
495 }
496 }
497 print '</td>';
498
499 // Percent
500 print '<td class="right">'.($catotal > 0 ? round(100 * $amount[$key] / $catotal, 2).'%' : '&nbsp;').'</td>';
501
502 // Other stats
503 print '<td class="center">';
504 if (isModEnabled("propal") && $key > 0) {
505 print '&nbsp;<a href="'.DOL_URL_ROOT.'/comm/propal/stats/index.php?userid='.$key.'">'.img_picto($langs->trans("ProposalStats"), "stats").'</a>&nbsp;';
506 }
507 if (isModEnabled('order') && $key > 0) {
508 print '&nbsp;<a href="'.DOL_URL_ROOT.'/commande/stats/index.php?userid='.$key.'">'.img_picto($langs->trans("OrderStats"), "stats").'</a>&nbsp;';
509 }
510 if (isModEnabled('invoice') && $key > 0) {
511 print '&nbsp;<a href="'.DOL_URL_ROOT.'/compta/facture/stats/index.php?userid='.$key.'">'.img_picto($langs->trans("InvoiceStats"), "stats").'</a>&nbsp;';
512 }
513 print '</td>';
514 print "</tr>\n";
515 $i++;
516 }
517
518 // Total
519 print '<tr class="liste_total">';
520 print '<td>'.$langs->trans("Total").'</td>';
521 if ($modecompta != 'CREANCES-DETTES') {
522 print '<td></td>';
523 } else {
524 print '<td class="right">'.price($catotal_ht).'</td>';
525 }
526 print '<td class="right">'.price($catotal).'</td>';
527 print '<td>&nbsp;</td>';
528 print '<td>&nbsp;</td>';
529 print '</tr>';
530
531 $db->free($result);
532}
533
534print "</table>";
535print '</div>';
536print '</form>';
537
538// End of page
539llxFooter();
540$db->close();
if(!defined('NOREQUIRESOC')) if(!defined( 'NOREQUIRETRAN')) if(!defined('NOTOKENRENEWAL')) if(!defined( 'NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined( 'NOREQUIREAJAX')) llxHeader()
Empty header.
Definition wrapper.php:55
llxFooter()
Empty footer.
Definition wrapper.php:69
Class to manage generation of HTML components Only common components must be here.
dol_get_first_day($year, $month=1, $gm=false)
Return GMT time for first day of a month or year.
Definition date.lib.php:594
dol_time_plus_duree($time, $duration_value, $duration_unit, $ruleforendofmonth=0)
Add a delay to a date.
Definition date.lib.php:124
dol_get_last_day($year, $month=12, $gm=false)
Return GMT time for last day of a month or year.
Definition date.lib.php:613
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...
img_object($titlealt, $picto, $moreatt='', $pictoisfullpath=0, $srconly=0, $notitle=0)
Show a picto called object_picto (generic function)
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.
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).
print_liste_field_titre($name, $file="", $field="", $begin="", $moreparam="", $moreattrib="", $sortfield="", $sortorder="", $prefix="", $tooltip="", $forcenowrapcolumntitle=0)
Show title line of an array.
img_previous($titlealt='default', $moreatt='')
Show previous logo.
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...
img_next($titlealt='default', $moreatt='')
Show next logo.
getDolGlobalString($key, $default='')
Return dolibarr global constant string value.
info_admin($text, $infoonimgalt=0, $nodiv=0, $admin='1', $morecss='hideonsmartphone', $textfordropdown='', $picto='')
Show information in HTML for admin users or standard users.
dol_syslog($message, $level=LOG_INFO, $ident=0, $suffixinfilename='', $restricttologhandler='', $logcontext=null)
Write log message into outputs.
dol_getdate($timestamp, $fast=false, $forcetimezone='')
Return an array with locale date info.
report_header($reportname, $notused, $period, $periodlink, $description, $builddate, $exportlink='', $moreparam=array(), $calcmode='', $varlink='')
Show header of a report.
restrictedArea(User $user, $features, $object=0, $tableandshare='', $feature2='', $dbt_keyfield='fk_soc', $dbt_select='rowid', $isdraft=0, $mode=0)
Check permissions of a user to show a page and an object.