dolibarr 18.0.6
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 = GETPOST('socid', 'int');
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 = $conf->global->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 = GETPOST("year", 'int');
67$month = GETPOST("month", 'int');
68$date_startyear = GETPOST("date_startyear", 'int');
69$date_startmonth = GETPOST("date_startmonth", 'int');
70$date_startday = GETPOST("date_startday", 'int');
71$date_endyear = GETPOST("date_endyear", 'int');
72$date_endmonth = GETPOST("date_endmonth", 'int');
73$date_endday = GETPOST("date_endday", 'int');
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") : ($conf->global->SOCIETE_FISCAL_MONTH_START ? ($conf->global->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 (!empty($conf->global->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("CalcModeEngagement");
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 (!empty($conf->global->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
292dol_syslog("cabyuser", LOG_DEBUG);
293$result = $db->query($sql);
294if ($result) {
295 $num = $db->num_rows($result);
296 $i = 0;
297 while ($i < $num) {
298 $obj = $db->fetch_object($result);
299
300 $amount_ht[$obj->rowid] = (empty($obj->amount) ? 0 : $obj->amount);
301 $amount[$obj->rowid] = $obj->amount_ttc;
302 $name[$obj->rowid] = $obj->name.' '.$obj->firstname;
303
304 $catotal_ht += (empty($obj->amount) ? 0 : $obj->amount);
305 $catotal += $obj->amount_ttc;
306 $i++;
307 }
308} else {
309 dol_print_error($db);
310}
311
312// Adding old-version payments, non-bound by table llx_paiement_facture then without User
313if ($modecompta == 'RECETTES-DEPENSES') {
314 $sql = "SELECT -1 as rowidx, '' as name, '' as firstname, sum(DISTINCT p.amount) as amount_ttc";
315 $sql .= " FROM ".MAIN_DB_PREFIX."bank as b";
316 $sql .= ", ".MAIN_DB_PREFIX."bank_account as ba";
317 $sql .= ", ".MAIN_DB_PREFIX."paiement as p";
318 $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."paiement_facture as pf ON p.rowid = pf.fk_paiement";
319 $sql .= " WHERE pf.rowid IS NULL";
320 $sql .= " AND p.fk_bank = b.rowid";
321 $sql .= " AND b.fk_account = ba.rowid";
322 $sql .= " AND ba.entity IN (".getEntity('bank_account').")";
323 if ($date_start && $date_end) {
324 $sql .= " AND p.datep >= '".$db->idate($date_start)."' AND p.datep <= '".$db->idate($date_end)."'";
325 }
326 $sql .= " GROUP BY rowidx, name, firstname";
327 $sql .= " ORDER BY rowidx";
328
329 $result = $db->query($sql);
330 if ($result) {
331 $num = $db->num_rows($result);
332 $i = 0;
333 while ($i < $num) {
334 $obj = $db->fetch_object($result);
335 $amount[$obj->rowidx] = $obj->amount_ttc;
336 $name[$obj->rowidx] = $obj->name.' '.$obj->firstname;
337 $catotal += $obj->amount_ttc;
338 $i++;
339 }
340 } else {
341 dol_print_error($db);
342 }
343}
344
345$moreforfilter = '';
346
347print '<div class="div-table-responsive">';
348print '<table class="tagtable liste'.($moreforfilter ? " listwithfilterbefore" : "").'">'."\n";
349
350print "<tr class=\"liste_titre\">";
352 $langs->trans("User"),
353 $_SERVER["PHP_SELF"],
354 "name",
355 "",
356 $paramslink,
357 "",
358 $sortfield,
359 $sortorder
360);
361if ($modecompta == 'CREANCES-DETTES') {
363 $langs->trans('AmountHT'),
364 $_SERVER["PHP_SELF"],
365 "amount_ht",
366 "",
367 $paramslink,
368 'class="right"',
369 $sortfield,
370 $sortorder
371 );
372} else {
374}
376 $langs->trans("AmountTTC"),
377 $_SERVER["PHP_SELF"],
378 "amount_ttc",
379 "",
380 $paramslink,
381 'class="right"',
382 $sortfield,
383 $sortorder
384);
386 $langs->trans("Percentage"),
387 $_SERVER["PHP_SELF"],
388 "amount_ttc",
389 "",
390 $paramslink,
391 'class="right"',
392 $sortfield,
393 $sortorder
394);
396 $langs->trans("OtherStatistics"),
397 $_SERVER["PHP_SELF"],
398 "",
399 "",
400 "",
401 'align="center" width="20%"'
402);
403print "</tr>\n";
404
405if (count($amount)) {
406 $arrayforsort = $name;
407
408 // We define arrayforsort
409 if ($sortfield == 'name' && $sortorder == 'asc') {
410 asort($name);
411 $arrayforsort = $name;
412 }
413 if ($sortfield == 'name' && $sortorder == 'desc') {
414 arsort($name);
415 $arrayforsort = $name;
416 }
417 if ($sortfield == 'amount_ht' && $sortorder == 'asc') {
418 asort($amount_ht);
419 $arrayforsort = $amount_ht;
420 }
421 if ($sortfield == 'amount_ht' && $sortorder == 'desc') {
422 arsort($amount_ht);
423 $arrayforsort = $amount_ht;
424 }
425 if ($sortfield == 'amount_ttc' && $sortorder == 'asc') {
426 asort($amount);
427 $arrayforsort = $amount;
428 }
429 if ($sortfield == 'amount_ttc' && $sortorder == 'desc') {
430 arsort($amount);
431 $arrayforsort = $amount;
432 }
433
434 $i = 0;
435
436 foreach ($arrayforsort as $key => $value) {
437 print '<tr class="oddeven">';
438
439 // Third party
440 $fullname = $name[$key];
441 if ($key >= 0) {
442 $linkname = '<a href="'.DOL_URL_ROOT.'/user/card.php?id='.$key.'">'.img_object($langs->trans("ShowUser"), 'user').' '.$fullname.'</a>';
443 } else {
444 $linkname = $langs->trans("PaymentsNotLinkedToUser");
445 }
446 print "<td>".$linkname."</td>\n";
447
448 // Amount w/o VAT
449 print '<td class="right">';
450 if ($modecompta == 'RECETTES-DEPENSES') {
451 if ($key > 0) {
452 //print '<a href="'.DOL_URL_ROOT.'/compta/paiement/list.php?userid='.$key.'">';
453 } else {
454 //print '<a href="'.DOL_URL_ROOT.'/compta/paiement/list.php?userid=-1">';
455 }
456 } elseif ($modecompta == 'CREANCES-DETTES') {
457 if ($key > 0) {
458 print '<a href="'.DOL_URL_ROOT.'/compta/facture/list.php?userid='.$key.'">';
459 } else {
460 //print '<a href="#">';
461 }
462 print price($amount_ht[$key]);
463 if ($key > 0) {
464 print '</a>';
465 }
466 }
467 print '</td>';
468
469 // Amount with VAT
470 print '<td class="right">';
471 if ($modecompta == 'RECETTES-DEPENSES') {
472 if ($key > 0) {
473 //print '<a href="'.DOL_URL_ROOT.'/compta/paiement/list.php?userid='.$key.'">';
474 } else {
475 //print '<a href="'.DOL_URL_ROOT.'/compta/paiement/list.php?userid=-1">';
476 }
477 } elseif ($modecompta == 'CREANCES-DETTES') {
478 if ($key > 0) {
479 print '<a href="'.DOL_URL_ROOT.'/compta/facture/list.php?userid='.$key.'">';
480 } else {
481 //print '<a href="#">';
482 }
483 }
484 print price($amount[$key]);
485 if ($modecompta == 'RECETTES-DEPENSES') {
486 if ($key > 0) {
487 //print '</a>';
488 } else {
489 //print '</a>';
490 }
491 } elseif ($modecompta == 'CREANCES-DETTES') {
492 if ($key > 0) {
493 print '</a>';
494 }
495 }
496 print '</td>';
497
498 // Percent
499 print '<td class="right">'.($catotal > 0 ? round(100 * $amount[$key] / $catotal, 2).'%' : '&nbsp;').'</td>';
500
501 // Other stats
502 print '<td class="center">';
503 if (isModEnabled("propal") && $key > 0) {
504 print '&nbsp;<a href="'.DOL_URL_ROOT.'/comm/propal/stats/index.php?userid='.$key.'">'.img_picto($langs->trans("ProposalStats"), "stats").'</a>&nbsp;';
505 }
506 if (isModEnabled('commande') && $key > 0) {
507 print '&nbsp;<a href="'.DOL_URL_ROOT.'/commande/stats/index.php?userid='.$key.'">'.img_picto($langs->trans("OrderStats"), "stats").'</a>&nbsp;';
508 }
509 if (isModEnabled('facture') && $key > 0) {
510 print '&nbsp;<a href="'.DOL_URL_ROOT.'/compta/facture/stats/index.php?userid='.$key.'">'.img_picto($langs->trans("InvoiceStats"), "stats").'</a>&nbsp;';
511 }
512 print '</td>';
513 print "</tr>\n";
514 $i++;
515 }
516
517 // Total
518 print '<tr class="liste_total">';
519 print '<td>'.$langs->trans("Total").'</td>';
520 if ($modecompta != 'CREANCES-DETTES') {
521 print '<td></td>';
522 } else {
523 print '<td class="right">'.price($catotal_ht).'</td>';
524 }
525 print '<td class="right">'.price($catotal).'</td>';
526 print '<td>&nbsp;</td>';
527 print '<td>&nbsp;</td>';
528 print '</tr>';
529
530 $db->free($result);
531}
532
533print "</table>";
534print '</div>';
535print '</form>';
536
537// End of page
538llxFooter();
539$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:56
llxFooter()
Empty footer.
Definition wrapper.php:70
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:577
dol_time_plus_duree($time, $duration_value, $duration_unit, $ruleforendofmonth=0)
Add a delay to a date.
Definition date.lib.php:122
dol_get_last_day($year, $month=12, $gm=false)
Return GMT time for last day of a month or year.
Definition date.lib.php:596
dol_mktime($hour, $minute, $second, $month, $day, $year, $gm='auto', $check=1)
Return a timestamp date built from detailed informations (by default a local PHP server timestamp) Re...
dol_print_error($db='', $error='', $errors=null)
Displays error message system with all the information to facilitate the diagnosis and the escalation...
img_object($titlealt, $picto, $moreatt='', $pictoisfullpath=false, $srconly=0, $notitle=0)
Show a picto called object_picto (generic function)
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_print_date($time, $format='', $tzoutput='auto', $outputlangs='', $encodetooutput=false)
Output date in a string format according to outputlangs (or langs if not defined).
dol_now($mode='auto')
Return date for now.
img_picto($titlealt, $picto, $moreatt='', $pictoisfullpath=false, $srconly=0, $notitle=0, $alt='', $morecss='', $marginleftonlyshort=2)
Show picto whatever it's its name (generic function)
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.
info_admin($text, $infoonimgalt=0, $nodiv=0, $admin='1', $morecss='hideonsmartphone', $textfordropdown='')
Show information for admin users or standard users.
img_next($titlealt='default', $moreatt='')
Show next logo.
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.