32require
'../../main.inc.php';
41require_once DOL_DOCUMENT_ROOT.
'/core/lib/report.lib.php';
42require_once DOL_DOCUMENT_ROOT.
'/core/lib/company.lib.php';
43require_once DOL_DOCUMENT_ROOT.
'/core/lib/tax.lib.php';
44require_once DOL_DOCUMENT_ROOT.
'/core/lib/date.lib.php';
45require_once DOL_DOCUMENT_ROOT.
'/core/class/html.form.class.php';
46require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formother.class.php';
47require_once DOL_DOCUMENT_ROOT.
'/categories/class/categorie.class.php';
50$langs->loadLangs(array(
'companies',
'categories',
'bills',
'compta'));
55 $modecompta =
GETPOST(
"modecompta");
58$sortorder =
GETPOST(
"sortorder",
'aZ09comma');
59$sortfield =
GETPOST(
"sortfield",
'aZ09comma');
71if ($selected_cat == -1) {
75if (
GETPOST(
'subcat',
'alpha') ===
'yes') {
80if ($user->socid > 0) {
81 $socid = $user->socid;
85$hookmanager->initHooks(array(
'casoclist'));
91 $result =
restrictedArea($user,
'accounting',
'',
'',
'comptarapport');
97$search_societe =
GETPOST(
"search_societe",
'alpha');
98$search_zip =
GETPOST(
"search_zip",
'alpha');
99$search_town =
GETPOST(
"search_town",
'alpha');
100$search_country =
GETPOST(
"search_country",
'aZ09');
101$date_startyear =
GETPOSTINT(
"date_startyear");
102$date_startmonth =
GETPOSTINT(
"date_startmonth");
110 $year_start = $year_current;
112 $year_current = $year;
119if (empty($date_start) || empty($date_end)) {
124 $year_end = $year_start;
125 $month_end = $month_start;
127 if (!
GETPOST(
'year') && $month_start > $month_current) {
131 $month_end = $month_start - 1;
132 if ($month_end < 1) {
164$year_start = $tmps[
'year'];
166$year_end = $tmpe[
'year'];
167$nbofyear = ($year_end - $year_start) + 1;
169$commonparams = array();
170$commonparams[
'modecompta'] = $modecompta;
171$commonparams[
'sortorder'] = $sortorder;
172$commonparams[
'sortfield'] = $sortfield;
174$headerparams = array();
175if (!empty($date_startyear)) {
176 $headerparams[
'date_startyear'] = $date_startyear;
178if (!empty($date_startmonth)) {
179 $headerparams[
'date_startmonth'] = $date_startmonth;
181if (!empty($date_startday)) {
182 $headerparams[
'date_startday'] = $date_startday;
184if (!empty($date_endyear)) {
185 $headerparams[
'date_endyear'] = $date_endyear;
187if (!empty($date_endmonth)) {
188 $headerparams[
'date_endmonth'] = $date_endmonth;
190if (!empty($date_endday)) {
191 $headerparams[
'date_endday'] = $date_endday;
194 $headerparams[
'q'] = $q;
197$tableparams = array();
198$tableparams[
'search_categ'] = $selected_cat;
199$tableparams[
'search_societe'] = $search_societe;
200$tableparams[
'search_zip'] = $search_zip;
201$tableparams[
'search_town'] = $search_town;
202$tableparams[
'search_country'] = $search_country;
203$tableparams[
'subcat'] = $subcat ?
'yes' :
'';
206$allparams = array_merge($commonparams, $headerparams, $tableparams);
207$headerparams = array_merge($commonparams, $headerparams);
208$tableparams = array_merge($commonparams, $tableparams);
211foreach ($allparams as $key => $value) {
212 $paramslink .=
'&'.$key.
'='.$value;
226if ($modecompta ==
"BOOKKEEPINGCOLLECTED") {
227 $modecompta =
"RECETTES-DEPENSES";
238if ($modecompta ==
"CREANCES-DETTES") {
239 $name = $langs->trans(
"Turnover").
', '.$langs->trans(
"ByThirdParties");
240 $calcmode = $langs->trans(
"CalcModeDebt");
242 $description = $langs->trans(
"RulesCADue");
244 $description .= $langs->trans(
"DepositsAreNotIncluded");
246 $description .= $langs->trans(
"DepositsAreIncluded");
250} elseif ($modecompta ==
"RECETTES-DEPENSES") {
251 $name = $langs->trans(
"TurnoverCollected").
', '.$langs->trans(
"ByThirdParties");
252 $calcmode = $langs->trans(
"CalcModePayment");
254 $description = $langs->trans(
"RulesCAIn");
255 $description .= $langs->trans(
"DepositsAreIncluded");
258} elseif ($modecompta ==
"BOOKKEEPING") {
259 $name = $langs->trans(
"Turnover").
', '.$langs->trans(
"ByThirdParties");
260 $calcmode = $langs->trans(
"CalcModeBookkeeping");
261 $description = $langs->trans(
"RulesCADue");
265$period = $form->selectDate($date_start,
'date_start', 0, 0, 0,
'', 1, 0, 0,
'',
'',
'',
'', 1,
'',
'',
'tzserver');
267$period .= $form->selectDate($date_end,
'date_end', 0, 0, 0,
'', 1, 0, 0,
'',
'',
'',
'', 1,
'',
'',
'tzserver');
269 $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>';
274report_header($name, $namelink, $period, $periodlink, $description, $builddate, $exportlink, $tableparams, $calcmode);
276if (
isModEnabled(
'accounting') && $modecompta !=
'BOOKKEEPING') {
277 print
info_admin($langs->trans(
"WarningReportNotReliable"), 0, 0,
'1');
288if ($modecompta ==
'CREANCES-DETTES') {
289 $sql =
"SELECT DISTINCT s.rowid as socid, s.nom as name, s.name_alias, s.zip, s.town, s.fk_pays,";
290 $sql .=
" sum(f.total_ht) as amount, sum(f.total_ttc) as amount_ttc";
291 $sql .=
" FROM ".MAIN_DB_PREFIX.
"facture as f, ".MAIN_DB_PREFIX.
"societe as s";
292 if ($selected_cat === -2) {
293 $sql .=
" LEFT JOIN ".MAIN_DB_PREFIX.
"categorie_societe as cs ON s.rowid = cs.fk_soc";
294 } elseif ($selected_cat) {
295 $sql .=
", ".MAIN_DB_PREFIX.
"categorie as c, ".MAIN_DB_PREFIX.
"categorie_societe as cs";
297 $sql .=
" WHERE f.fk_statut in (1,2)";
299 $sql .=
" AND f.type IN (0,1,2,5)";
301 $sql .=
" AND f.type IN (0,1,2,3,5)";
303 $sql .=
" AND f.fk_soc = s.rowid";
304 if ($date_start && $date_end) {
305 $sql .=
" AND f.datef >= '".$db->idate($date_start).
"' AND f.datef <= '".
$db->idate($date_end).
"'";
307 if ($selected_cat === -2) {
308 $sql .=
" AND cs.fk_soc is null";
309 } elseif ($selected_cat) {
310 $sql .=
" AND (c.rowid = ".((int) $selected_cat);
312 $sql .=
" OR c.fk_parent = ".((int) $selected_cat);
315 $sql .=
" AND cs.fk_categorie = c.rowid AND cs.fk_soc = s.rowid";
317} elseif ($modecompta ==
"RECETTES-DEPENSES") {
322 $sql =
"SELECT s.rowid as socid, s.nom as name, s.name_alias, s.zip, s.town, s.fk_pays, sum(pf.amount) as amount_ttc";
323 $sql .=
" FROM ".MAIN_DB_PREFIX.
"facture as f";
324 $sql .=
", ".MAIN_DB_PREFIX.
"paiement_facture as pf";
325 $sql .=
", ".MAIN_DB_PREFIX.
"paiement as p";
326 $sql .=
", ".MAIN_DB_PREFIX.
"societe as s";
327 if ($selected_cat === -2) {
328 $sql .=
" LEFT JOIN ".MAIN_DB_PREFIX.
"categorie_societe as cs ON s.rowid = cs.fk_soc";
329 } elseif ($selected_cat) {
330 $sql .=
", ".MAIN_DB_PREFIX.
"categorie as c, ".MAIN_DB_PREFIX.
"categorie_societe as cs";
332 $sql .=
" WHERE p.rowid = pf.fk_paiement";
333 $sql .=
" AND pf.fk_facture = f.rowid";
334 $sql .=
" AND f.fk_soc = s.rowid";
335 if ($date_start && $date_end) {
336 $sql .=
" AND p.datep >= '".$db->idate($date_start).
"' AND p.datep <= '".
$db->idate($date_end).
"'";
338 if ($selected_cat === -2) {
339 $sql .=
" AND cs.fk_soc is null";
340 } elseif ($selected_cat) {
341 $sql .=
" AND (c.rowid = ".((int) $selected_cat);
343 $sql .=
" OR c.fk_parent = ".((int) $selected_cat);
346 $sql .=
" AND cs.fk_categorie = c.rowid AND cs.fk_soc = s.rowid";
348} elseif ($modecompta ==
"BOOKKEEPING") {
355 $sql =
"SELECT s.rowid as socid, s.nom as name, s.name_alias, s.zip, s.town, s.fk_pays,";
356 $sql .=
" SUM(CASE WHEN b.subledger_account IS NOT NULL AND b.subledger_account != '' THEN b.debit - b.credit ELSE 0 END) as amount_ttc,";
357 $sql .=
" SUM(CASE WHEN aa.pcg_type = 'INCOME' THEN b.credit - b.debit ELSE 0 END) as amount";
358 $sql .=
" FROM ".MAIN_DB_PREFIX.
"accounting_bookkeeping as b";
359 $sql .=
" LEFT JOIN ".MAIN_DB_PREFIX.
"accounting_account as aa ON aa.account_number = b.numero_compte AND aa.entity = b.entity AND aa.fk_pcg_version = '".
$db->escape($charofaccountstring).
"'";
360 $sql .=
" INNER JOIN ".MAIN_DB_PREFIX.
"societe as s ON s.code_client = b.thirdparty_code";
361 if ($selected_cat === -2) {
362 $sql .=
" LEFT JOIN ".MAIN_DB_PREFIX.
"categorie_societe as cs ON s.rowid = cs.fk_soc";
363 } elseif ($selected_cat) {
364 $sql .=
", ".MAIN_DB_PREFIX.
"categorie as c, ".MAIN_DB_PREFIX.
"categorie_societe as cs";
366 $sql .=
" WHERE b.doc_type = 'customer_invoice'";
367 $sql .=
" AND b.thirdparty_code IS NOT NULL AND b.thirdparty_code != ''";
368 if ($date_start && $date_end) {
369 $sql .=
" AND b.doc_date >= '".$db->idate($date_start).
"' AND b.doc_date <= '".
$db->idate($date_end).
"'";
371 if ($selected_cat === -2) {
372 $sql .=
" AND cs.fk_soc is null";
373 } elseif ($selected_cat) {
374 $sql .=
" AND (c.rowid = ".((int) $selected_cat);
376 $sql .=
" OR c.fk_parent = ".((int) $selected_cat);
379 $sql .=
" AND cs.fk_categorie = c.rowid AND cs.fk_soc = s.rowid";
382if (!empty($search_societe)) {
385if (!empty($search_zip)) {
388if (!empty($search_town)) {
391if ($search_country > 0) {
392 $sql .=
' AND s.fk_pays = '.((int) $search_country);
394if ($modecompta ==
'BOOKKEEPING') {
395 $sql .=
" AND b.entity = ".((int)
$conf->entity);
397 $sql .=
" AND s.rowid = ".((int) $socid);
400 $sql .=
" AND f.entity IN (".getEntity(
'invoice').
")";
402 $sql .=
" AND f.fk_soc = ".((int) $socid);
405$sql .=
" GROUP BY s.rowid, s.nom, s.name_alias, s.zip, s.town, s.fk_pays";
406$sql .=
" ORDER BY s.rowid";
411$address_zip = array();
412$address_town = array();
413$address_pays = array();
416$result =
$db->query($sql);
418 $num =
$db->num_rows($result);
421 $obj =
$db->fetch_object($result);
423 $amount_ht[$obj->socid] = (empty($obj->amount) ? 0 : $obj->amount);
424 $amount[$obj->socid] = $obj->amount_ttc;
425 $fullname = $obj->name;
426 if (!empty($obj->name_alias)) {
427 $fullname .=
' ('.$obj->name_alias.
')';
429 $name[$obj->socid] = $fullname;
431 $address_zip[$obj->socid] = $obj->zip;
432 $address_town[$obj->socid] = $obj->town;
433 $address_pays[$obj->socid] =
getCountry($obj->fk_pays);
435 $catotal_ht += (empty($obj->amount) ? 0 : $obj->amount);
436 $catotal += $obj->amount_ttc;
445if ($modecompta ==
"RECETTES-DEPENSES") {
446 $sql =
"SELECT '0' as socid, 'Autres' as name, sum(p.amount) as amount_ttc";
447 $sql .=
" FROM ".MAIN_DB_PREFIX.
"bank as b";
448 $sql .=
", ".MAIN_DB_PREFIX.
"bank_account as ba";
449 $sql .=
", ".MAIN_DB_PREFIX.
"paiement as p";
450 $sql .=
" LEFT JOIN ".MAIN_DB_PREFIX.
"paiement_facture as pf ON p.rowid = pf.fk_paiement";
451 $sql .=
" WHERE pf.rowid IS NULL";
452 $sql .=
" AND p.fk_bank = b.rowid";
453 $sql .=
" AND b.fk_account = ba.rowid";
454 $sql .=
" AND ba.entity IN (".getEntity(
'bank_account').
")";
455 if ($date_start && $date_end) {
456 $sql .=
" AND p.datep >= '".$db->idate($date_start).
"' AND p.datep <= '".
$db->idate($date_end).
"'";
458 $sql .=
" GROUP BY socid, name";
459 $sql .=
" ORDER BY name";
461 $result =
$db->query($sql);
463 $num =
$db->num_rows($result);
466 $obj =
$db->fetch_object($result);
468 if (empty($amount[$obj->socid])) {
469 $amount[$obj->socid] = $obj->amount_ttc;
471 $amount[$obj->socid] += $obj->amount_ttc;
474 $name[$obj->socid] = $obj->name;
475 $address_zip[$obj->socid] =
'';
476 $address_town[$obj->socid] =
'';
477 $address_pays[$obj->socid] =
'';
479 $catotal += $obj->amount_ttc;
491print
'<form method="POST" action="'.dolBuildUrl($_SERVER[
"PHP_SELF"]).
'">';
492print
'<input type="hidden" name="token" value="'.newToken().
'">'.
"\n";
494foreach ($headerparams as $key => $value) {
495 print
'<input type="hidden" name="'.$key.
'" value="'.$value.
'">';
500print
'<div class="div-table-responsive">';
501print
'<table class="tagtable liste'.($moreforfilter ?
" listwithfilterbefore" :
"").
'">'.
"\n";
504print
'<tr class="liste_titre">';
505print
'<td class="nowraponall">';
506print
img_picto(
'',
'category',
'class="paddingrightonly"');
507print $formother->select_categories(Categorie::TYPE_CUSTOMER, $selected_cat,
'search_categ', 0, $langs->trans(
"Category"));
509print $langs->trans(
"SubCats").
'? ';
510print
'<input type="checkbox" name="subcat" value="yes"';
515print
'<td colspan="7" class="right">';
516print
'<input type="image" class="liste_titre" name="button_search" src="'.img_picto($langs->trans(
"Search"),
'search.png',
'', 0, 1).
'" value="'.
dol_escape_htmltag($langs->trans(
"Search")).
'" title="'.
dol_escape_htmltag($langs->trans(
"Search")).
'">';
520print
'<tr class="liste_titre">';
521print
'<td class="liste_titre left">';
522print
'<input class="flat" size="6" type="text" name="search_societe" value="'.dol_escape_htmltag($search_societe).
'">';
524print
'<td class="liste_titre left">';
525print
'<input class="flat" size="6" type="text" name="search_zip" value="'.dol_escape_htmltag($search_zip).
'">';
527print
'<td class="liste_titre left">';
528print
'<input class="flat" size="6" type="text" name="search_town" value="'.dol_escape_htmltag($search_town).
'">';
530print
'<td class="liste_titre left">';
531print $form->select_country($search_country,
'search_country',
'', 0,
'minwidth100imp maxwidth100');
534print
'<td class="liste_titre"> </td>';
535print
'<td class="liste_titre"> </td>';
536print
'<td class="liste_titre"> </td>';
537print
'<td class="liste_titre"> </td>';
541print
"<tr class='liste_titre'>";
543 $langs->trans(
"Company"),
544 $_SERVER[
"PHP_SELF"],
553 $langs->trans(
"Zip"),
554 $_SERVER[
"PHP_SELF"],
563 $langs->trans(
"Town"),
564 $_SERVER[
"PHP_SELF"],
573 $langs->trans(
"Country"),
574 $_SERVER[
"PHP_SELF"],
582if ($modecompta ==
'CREANCES-DETTES') {
584 $langs->trans(
'AmountHT'),
585 $_SERVER[
"PHP_SELF"],
597 $langs->trans(
"AmountTTC"),
598 $_SERVER[
"PHP_SELF"],
607 $langs->trans(
"Percentage"),
608 $_SERVER[
"PHP_SELF"],
617 $langs->trans(
"OtherStatistics"),
618 $_SERVER[
"PHP_SELF"],
622 'align="center" width="20%"'
628 $arrayforsort = $name;
630 if ($sortfield ==
'nom' && $sortorder ==
'asc') {
632 $arrayforsort = $name;
634 if ($sortfield ==
'nom' && $sortorder ==
'desc') {
636 $arrayforsort = $name;
638 if ($sortfield ==
'amount_ht' && $sortorder ==
'asc') {
640 $arrayforsort = $amount_ht;
642 if ($sortfield ==
'amount_ht' && $sortorder ==
'desc') {
644 $arrayforsort = $amount_ht;
646 if ($sortfield ==
'amount_ttc' && $sortorder ==
'asc') {
648 $arrayforsort = $amount;
650 if ($sortfield ==
'amount_ttc' && $sortorder ==
'desc') {
652 $arrayforsort = $amount;
654 if ($sortfield ==
'zip' && $sortorder ==
'asc') {
656 $arrayforsort = $address_zip;
658 if ($sortfield ==
'zip' && $sortorder ==
'desc') {
659 arsort($address_zip);
660 $arrayforsort = $address_zip;
662 if ($sortfield ==
'town' && $sortorder ==
'asc') {
663 asort($address_town);
664 $arrayforsort = $address_town;
666 if ($sortfield ==
'town' && $sortorder ==
'desc') {
667 arsort($address_town);
668 $arrayforsort = $address_town;
670 if ($sortfield ==
'country' && $sortorder ==
'asc') {
671 asort($address_pays);
672 $arrayforsort = $address_town;
674 if ($sortfield ==
'country' && $sortorder ==
'desc') {
675 arsort($address_pays);
676 $arrayforsort = $address_town;
679 foreach ($arrayforsort as $key => $value) {
680 print
'<tr class="oddeven">';
683 $fullname = $name[$key];
685 $thirdparty_static->id = (int) $key;
686 $thirdparty_static->name = $fullname;
687 $thirdparty_static->client = 1;
688 $linkname = $thirdparty_static->getNomUrl(1,
'customer');
690 $linkname = $langs->trans(
"PaymentsNotLinkedToInvoice");
692 print
'<td class="tdoverflowmax150">'.$linkname.
"</td>\n";
695 print $address_zip[$key];
698 print
'<td class="tdoverflowmax150" title="'.dol_escape_htmltag($address_town[$key]).
'">';
699 print $address_town[$key];
702 print
'<td class="tdoverflowmax150" title="'.dol_escape_htmltag($address_pays[$key]).
'">';
703 print $address_pays[$key];
707 print
'<td class="right">';
708 if ($modecompta ==
'RECETTES-DEPENSES') {
710 print
'<a href="'.DOL_URL_ROOT.
'/compta/paiement/list.php?socid='.$key.
'">';
712 print
'<a href="'.DOL_URL_ROOT.
'/compta/paiement/list.php?socid=-1">';
716 print
'<a href="'.DOL_URL_ROOT.
'/compta/facture/list.php?socid='.$key.
'">';
718 print
'<a href="#">';
720 print
price($amount_ht[$key]);
725 print
'<td class="right">';
726 if ($modecompta !=
'CREANCES-DETTES') {
728 print
'<a href="'.DOL_URL_ROOT.
'/compta/paiement/list.php?socid='.$key.
'">';
730 print
'<a href="'.DOL_URL_ROOT.
'/compta/paiement/list.php?orphelins=1">';
734 print
'<a href="'.DOL_URL_ROOT.
'/compta/facture/list.php?socid='.$key.
'">';
736 print
'<a href="#">';
739 print
price($amount[$key]);
744 print
'<td class="right">'.($catotal > 0 ? round(100 * $amount[$key] / $catotal, 2).
'%' :
' ').
'</td>';
747 print
'<td class="center">';
749 print
' <a href="'.DOL_URL_ROOT.
'/comm/propal/stats/index.php?socid='.$key.
'">'.
img_picto($langs->trans(
"ProposalStats"),
"stats").
'</a> ';
752 print
' <a href="'.DOL_URL_ROOT.
'/commande/stats/index.php?socid='.$key.
'">'.
img_picto($langs->trans(
"OrderStats"),
"stats").
'</a> ';
755 print
' <a href="'.DOL_URL_ROOT.
'/compta/facture/stats/index.php?socid='.$key.
'">'.
img_picto($langs->trans(
"InvoiceStats"),
"stats").
'</a> ';
763 print
'<tr class="liste_total">';
764 print
'<td>'.$langs->trans(
"Total").
'</td>';
765 print
'<td> </td>';
766 print
'<td> </td>';
767 print
'<td> </td>';
768 if ($modecompta ==
'RECETTES-DEPENSES') {
771 print
'<td class="right">'.price($catotal_ht).
'</td>';
773 print
'<td class="right">'.price($catotal).
'</td>';
774 print
'<td> </td>';
775 print
'<td> </td>';
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 third parties objects (customers, suppliers, prospects...)
getCountry($searchkey, $withcode='', $dbtouse=null, $outputlangs=null, $entconv=1, $searchlabel='')
Return country label, code or id from an id, code or label.
dol_get_first_day($year, $month=1, $gm=false)
Return GMT time for first day of a month or year.
dol_time_plus_duree($time, $duration_value, $duration_unit, $ruleforendofmonth=0)
Add a delay to a date.
dol_get_last_day($year, $month=12, $gm=false)
Return GMT time for last day of a month or year.
$date_start
Variables from include:
dol_now($mode='gmt')
Return date for now.
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...
dol_getIdFromCode($db, $key, $tablename, $fieldkey='code', $fieldid='id', $entityfilter=0, $filters='', $useCache=true)
Return an id or code from a code or id.
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.
natural_search($fields, $value, $mode=0, $nofirstand=0, $sqltoadd='')
Generate natural SQL search string for a criteria (this criteria can be tested on one or several fiel...
getDolGlobalInt($key, $default=0)
Return a Dolibarr global constant int value.
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0, $nodefault=0)
Return value of a param into GET or POST supervariable.
GETPOSTINT($paramname, $method=0, $nodefault=0)
Return the value of a $_GET or $_POST supervariable, converted into integer.
dol_print_date($time, $format='', $tzoutput='auto', $outputlangs=null, $encodetooutput=false, $decorate=0)
Output date in a string format according to outputlangs (or langs if not defined).
getDolGlobalString($key, $default='')
Return a Dolibarr global constant string value.
isModEnabled($module)
Is Dolibarr module enabled.
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.
print_liste_field_titre($name, $file="", $field="", $begin="", $param="", $moreattrib="", $sortfield="", $sortorder="", $prefix="", $tooltip="", $forcenowrapcolumntitle=0)
Show title line of an array.
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_previous($titlealt='default', $moreatt='')
Show previous logo.
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.
info_admin($text, $infoonimgalt=0, $nodiv=0, $admin='1', $morecss='hideonsmartphone', $textfordropdown='', $picto='', $textonpictotooltip='', $cssfordropdown='info_admin')
Show information in HTML for admin users or standard users.
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...
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.