30require
'../../main.inc.php';
39require_once DOL_DOCUMENT_ROOT.
'/core/class/html.form.class.php';
40require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formother.class.php';
41require_once DOL_DOCUMENT_ROOT.
'/core/lib/company.lib.php';
42require_once DOL_DOCUMENT_ROOT.
'/core/lib/date.lib.php';
43require_once DOL_DOCUMENT_ROOT.
'/core/lib/report.lib.php';
44require_once DOL_DOCUMENT_ROOT.
'/core/lib/tax.lib.php';
45require_once DOL_DOCUMENT_ROOT.
'/categories/class/categorie.class.php';
48$langs->loadLangs(array(
'companies',
'categories',
'bills',
'compta'));
53 $modecompta =
GETPOST(
"modecompta");
57$sortorder =
GETPOST(
"sortorder",
'aZ09comma');
58$sortfield =
GETPOST(
"sortfield",
'aZ09comma');
71if ($selected_cat == -1) {
75if (
GETPOST(
'subcat',
'alpha') ===
'yes') {
80if ($user->socid > 0) {
81 $socid = $user->socid;
87 $result =
restrictedArea($user,
'accounting',
'',
'',
'comptarapport');
91$hookmanager->initHooks(array(
'supplierturnoverbythirdpartylist'));
95$search_societe =
GETPOST(
"search_societe",
'alpha');
96$search_zip =
GETPOST(
"search_zip",
'alpha');
97$search_town =
GETPOST(
"search_town",
'alpha');
98$search_country =
GETPOST(
"search_country",
'aZ09');
100$date_startyear =
GETPOST(
"date_startyear",
'alpha');
101$date_startmonth =
GETPOST(
"date_startmonth",
'alpha');
102$date_startday =
GETPOST(
"date_startday",
'alpha');
103$date_endyear =
GETPOST(
"date_endyear",
'alpha');
104$date_endmonth =
GETPOST(
"date_endmonth",
'alpha');
105$date_endday =
GETPOST(
"date_endday",
'alpha');
115 $year_start = $year_current - ($nbofyear - 1);
117 $year_current = $year;
119 $year_start = $year - $nbofyear + (
getDolGlobalInt(
'SOCIETE_FISCAL_MONTH_START') > 1 ? 0 : 1);
121$date_start =
dol_mktime(0, 0, 0, (
int) $date_startmonth, (
int) $date_startday, (
int) $date_startyear,
'tzserver');
122$date_end =
dol_mktime(23, 59, 59, (
int) $date_endmonth, (
int) $date_endday, (
int) $date_endyear,
'tzserver');
125if (empty($date_start) || empty($date_end)) {
129 $year_end = $year_start + $nbofyear - (
getDolGlobalInt(
'SOCIETE_FISCAL_MONTH_START') > 1 ? 0 : 1);
132 if (!$year && $month_start > $month_current) {
136 $month_end = $month_start - 1;
137 if ($month_end < 1) {
141 $month_end = $month_start;
166$year_start = $tmps[
'year'];
168$year_end = $tmpe[
'year'];
169$nbofyear = ($year_end - $year_start) + 1;
171$commonparams = array();
172$commonparams[
'modecompta'] = $modecompta;
173$commonparams[
'sortorder'] = $sortorder;
174$commonparams[
'sortfield'] = $sortfield;
176$headerparams = array();
177if (!empty($date_startyear)) {
178 $headerparams[
'date_startyear'] = $date_startyear;
180if (!empty($date_startmonth)) {
181 $headerparams[
'date_startmonth'] = $date_startmonth;
183if (!empty($date_startday)) {
184 $headerparams[
'date_startday'] = $date_startday;
186if (!empty($date_endyear)) {
187 $headerparams[
'date_endyear'] = $date_endyear;
189if (!empty($date_endmonth)) {
190 $headerparams[
'date_endmonth'] = $date_endmonth;
192if (!empty($date_endday)) {
193 $headerparams[
'date_endday'] = $date_endday;
196$tableparams = array();
197$tableparams[
'search_categ'] = $selected_cat;
198$tableparams[
'search_societe'] = $search_societe;
199$tableparams[
'search_zip'] = $search_zip;
200$tableparams[
'search_town'] = $search_town;
201$tableparams[
'search_country'] = $search_country;
202$tableparams[
'subcat'] = $subcat ?
'yes' :
'';
205$allparams = array_merge($commonparams, $headerparams, $tableparams);
206$headerparams = array_merge($commonparams, $headerparams);
207$tableparams = array_merge($commonparams, $tableparams);
210foreach ($allparams as $key => $value) {
211 $paramslink .=
'&'.$key.
'='.$value;
223$form =
new Form($db);
224$thirdparty_static =
new Societe($db);
228if ($modecompta ==
"BOOKKEEPING") {
229 $modecompta =
"CREANCES-DETTES";
231if ($modecompta ==
"BOOKKEEPINGCOLLECTED") {
232 $modecompta =
"RECETTES-DEPENSES";
243if ($modecompta ==
"CREANCES-DETTES") {
244 $name = $langs->trans(
"PurchaseTurnover").
', '.$langs->trans(
"ByThirdParties");
245 $calcmode = $langs->trans(
"CalcModeDebt");
247 $description = $langs->trans(
"RulesPurchaseTurnoverDue");
249} elseif ($modecompta ==
"RECETTES-DEPENSES") {
250 $name = $langs->trans(
"PurchaseTurnoverCollected").
', '.$langs->trans(
"ByThirdParties");
251 $calcmode = $langs->trans(
"CalcModePayment");
253 $description = $langs->trans(
"RulesPurchaseTurnoverIn");
256} elseif ($modecompta ==
"BOOKKEEPING") {
257 $name = $langs->trans(
"PurchaseTurnover").
', '.$langs->trans(
"ByThirdParties");
258 $calcmode = $langs->trans(
"CalcModeBookkeeping");
259 $description = $langs->trans(
"RulesPurchaseTurnoverDue");
263$period = $form->selectDate($date_start,
'date_start', 0, 0, 0,
'', 1, 0, 0,
'',
'',
'',
'', 1,
'',
'',
'tzserver');
265$period .= $form->selectDate($date_end,
'date_end', 0, 0, 0,
'', 1, 0, 0,
'',
'',
'',
'', 1,
'',
'',
'tzserver');
267 $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);
277 if ($modecompta !=
'BOOKKEEPING') {
278 print
info_admin($langs->trans(
"WarningReportNotReliable"), 0, 0,
'1');
282 $pcgvercode =
dol_getIdFromCode($db, $pcgverid,
'accounting_system',
'rowid',
'pcg_version');
283 if (empty($pcgvercode)) {
284 $pcgvercode = $pcgverid;
287 $sql =
"SELECT b.rowid ";
288 $sql .=
" FROM ".MAIN_DB_PREFIX.
"accounting_bookkeeping as b,";
289 $sql .=
" ".MAIN_DB_PREFIX.
"accounting_account as aa";
290 $sql .=
" WHERE b.entity = ".((int)
$conf->entity);
291 $sql .=
" AND b.numero_compte = aa.account_number";
292 $sql .=
" AND aa.entity = ".((int)
$conf->entity);
293 $sql .=
" AND aa.fk_pcg_version = '".$db->escape($pcgvercode).
"'";
294 $sql .= $db->plimit(1);
296 $resql = $db->query($sql);
297 $nb = $db->num_rows($resql);
299 $langs->load(
"errors");
300 print
info_admin($langs->trans(
"WarningNoDataTransferedInAccountancyYet"), 0, 0,
'1');
311$address_zip = array();
312$address_town = array();
313$address_pays = array();
316if ($modecompta ==
'CREANCES-DETTES') {
317 $sql =
"SELECT DISTINCT s.rowid as socid, s.nom as name, s.zip, s.town, s.fk_pays,";
318 $sql .=
" sum(f.total_ht) as amount, sum(f.total_ttc) as amount_ttc";
319 $sql .=
" FROM ".MAIN_DB_PREFIX.
"facture_fourn as f, ".MAIN_DB_PREFIX.
"societe as s";
320 if ($selected_cat === -2) {
321 $sql .=
" LEFT JOIN ".MAIN_DB_PREFIX.
"categorie_fournisseur as cs ON s.rowid = cs.fk_soc";
322 } elseif ($selected_cat) {
323 $sql .=
", ".MAIN_DB_PREFIX.
"categorie as c, ".MAIN_DB_PREFIX.
"categorie_fournisseur as cs";
325 $sql .=
" WHERE f.fk_statut in (1,2)";
326 $sql .=
" AND f.type IN (0,2)";
327 $sql .=
" AND f.fk_soc = s.rowid";
328 if ($date_start && $date_end) {
329 $sql .=
" AND f.datef >= '".$db->idate($date_start).
"' AND f.datef <= '".$db->idate($date_end).
"'";
331 if ($selected_cat === -2) {
332 $sql .=
" AND cs.fk_soc is null";
333 } elseif ($selected_cat) {
334 $sql .=
" AND (c.rowid = ".((int) $selected_cat);
336 $sql .=
" OR c.fk_parent = ".((int) $selected_cat);
339 $sql .=
" AND cs.fk_categorie = c.rowid AND cs.fk_soc = s.rowid";
341} elseif ($modecompta ==
"RECETTES-DEPENSES") {
342 $sql =
"SELECT s.rowid as socid, s.nom as name, s.zip, s.town, s.fk_pays, sum(pf.amount) as amount_ttc";
343 $sql .=
" FROM ".MAIN_DB_PREFIX.
"facture_fourn as f";
344 $sql .=
", ".MAIN_DB_PREFIX.
"paiementfourn_facturefourn as pf";
345 $sql .=
", ".MAIN_DB_PREFIX.
"paiementfourn as p";
346 $sql .=
", ".MAIN_DB_PREFIX.
"societe as s";
347 if ($selected_cat === -2) {
348 $sql .=
" LEFT JOIN ".MAIN_DB_PREFIX.
"categorie_fournisseur as cs ON s.rowid = cs.fk_soc";
349 } elseif ($selected_cat) {
350 $sql .=
", ".MAIN_DB_PREFIX.
"categorie as c, ".MAIN_DB_PREFIX.
"categorie_fournisseur as cs";
352 $sql .=
" WHERE p.rowid = pf.fk_paiementfourn";
353 $sql .=
" AND pf.fk_facturefourn = f.rowid";
354 $sql .=
" AND f.fk_soc = s.rowid";
355 if ($date_start && $date_end) {
356 $sql .=
" AND p.datep >= '".$db->idate($date_start).
"' AND p.datep <= '".$db->idate($date_end).
"'";
358 if ($selected_cat === -2) {
359 $sql .=
" AND cs.fk_soc is null";
360 } elseif ($selected_cat) {
361 $sql .=
" AND (c.rowid = ".((int) $selected_cat);
363 $sql .=
" OR c.fk_parent = ".((int) $selected_cat);
366 $sql .=
" AND cs.fk_categorie = c.rowid AND cs.fk_soc = s.rowid";
368} elseif ($modecompta ==
"BOOKKEEPING") {
375 $sql =
"SELECT s.rowid as socid, s.nom as name, s.zip, s.town, s.fk_pays,";
376 $sql .=
" SUM(CASE WHEN b.subledger_account IS NOT NULL AND b.subledger_account != '' THEN b.credit - b.debit ELSE 0 END) as amount_ttc,";
377 $sql .=
" SUM(CASE WHEN aa.pcg_type = 'EXPENSE' THEN b.debit - b.credit ELSE 0 END) as amount";
378 $sql .=
" FROM ".MAIN_DB_PREFIX.
"accounting_bookkeeping as b";
379 $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).
"'";
380 $sql .=
" INNER JOIN ".MAIN_DB_PREFIX.
"societe as s ON s.code_fournisseur = b.thirdparty_code";
381 $sql .=
" WHERE b.doc_type = 'supplier_invoice'";
382 $sql .=
" AND b.thirdparty_code IS NOT NULL AND b.thirdparty_code != ''";
383 if ($date_start && $date_end) {
384 $sql .=
" AND b.doc_date >= '".$db->idate($date_start).
"' AND b.doc_date <= '".$db->idate($date_end).
"'";
387if (!empty($search_societe)) {
390if (!empty($search_zip)) {
393if (!empty($search_town)) {
396if ($search_country > 0) {
397 $sql .=
' AND s.fk_pays = '.((int) $search_country);
399if ($modecompta ==
'BOOKKEEPING') {
400 $sql .=
" AND b.entity = ".((int)
$conf->entity);
402 $sql .=
" AND s.rowid = ".((int) $socid);
405 $sql .=
" AND f.entity IN (".getEntity(
'supplier_invoice').
")";
407 $sql .=
" AND f.fk_soc = ".((int) $socid);
410$sql .=
" GROUP BY s.rowid, s.nom, s.zip, s.town, s.fk_pays";
411$sql .=
" ORDER BY s.rowid";
417dol_syslog(
"supplier_turnover_by_thirdparty", LOG_DEBUG);
418$resql = $db->query($sql);
420 $num = $db->num_rows($resql);
423 $obj = $db->fetch_object($resql);
425 $amount_ht[$obj->socid] = (empty($obj->amount) ? 0 : $obj->amount);
426 $amount[$obj->socid] = $obj->amount_ttc;
427 $name[$obj->socid] = $obj->name;
429 $address_zip[$obj->socid] = $obj->zip;
430 $address_town[$obj->socid] = $obj->town;
431 $address_pays[$obj->socid] =
getCountry($obj->fk_pays);
433 $catotal_ht += (empty($obj->amount) ? 0 : $obj->amount);
434 $catotal += $obj->amount_ttc;
439 dol_print_error($db);
444print
'<form method="POST" action="'.dolBuildUrl($_SERVER[
"PHP_SELF"]).
'">';
445print
'<input type="hidden" name="token" value="'.newToken().
'">'.
"\n";
447foreach ($headerparams as $key => $value) {
448 print
'<input type="hidden" name="'.$key.
'" value="'.$value.
'">';
453print
'<div class="div-table-responsive">';
454print
'<table class="tagtable liste'.($moreforfilter ?
" listwithfilterbefore" :
"").
'">'.
"\n";
457print
'<tr class="liste_titre">';
459print img_picto(
'',
'category',
'class="paddingrightonly"');
460print $formother->select_categories(Categorie::TYPE_SUPPLIER, $selected_cat,
'search_categ', 0, $langs->trans(
"Category"));
462print
'<label for="subcat" class="marginleftonly">'.$langs->trans(
"SubCats").
'?</label> ';
463print
'<input type="checkbox" id="subcat" name="subcat" value="yes"';
468print
'<td colspan="7" class="right">';
469print
'<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")).
'">';
473print
'<tr class="liste_titre">';
474print
'<td class="liste_titre left">';
475print
'<input class="flat" size="6" type="text" name="search_societe" value="'.dol_escape_htmltag($search_societe).
'">';
477print
'<td class="liste_titre left">';
478print
'<input class="flat" size="6" type="text" name="search_zip" value="'.dol_escape_htmltag($search_zip).
'">';
480print
'<td class="liste_titre left">';
481print
'<input class="flat" size="6" type="text" name="search_town" value="'.dol_escape_htmltag($search_town).
'">';
483print
'<td class="liste_titre left">';
484print $form->select_country($search_country,
'search_country',
'', 0,
'maxwidth150');
487print
'<td class="liste_titre"> </td>';
488print
'<td class="liste_titre"> </td>';
489print
'<td class="liste_titre"> </td>';
490print
'<td class="liste_titre"> </td>';
494print
"<tr class='liste_titre'>";
496 $langs->trans(
"Company"),
497 $_SERVER[
"PHP_SELF"],
506 $langs->trans(
"Zip"),
507 $_SERVER[
"PHP_SELF"],
516 $langs->trans(
"Town"),
517 $_SERVER[
"PHP_SELF"],
526 $langs->trans(
"Country"),
527 $_SERVER[
"PHP_SELF"],
535if ($modecompta ==
'CREANCES-DETTES') {
537 $langs->trans(
'AmountHT'),
538 $_SERVER[
"PHP_SELF"],
550 $langs->trans(
"AmountTTC"),
551 $_SERVER[
"PHP_SELF"],
560 $langs->trans(
"Percentage"),
561 $_SERVER[
"PHP_SELF"],
570 $langs->trans(
"OtherStatistics"),
571 $_SERVER[
"PHP_SELF"],
575 'align="center" width="20%"'
581 $arrayforsort = $name;
583 if ($sortfield ==
'nom' && $sortorder ==
'asc') {
585 $arrayforsort = $name;
587 if ($sortfield ==
'nom' && $sortorder ==
'desc') {
589 $arrayforsort = $name;
591 if ($sortfield ==
'amount_ht' && $sortorder ==
'asc') {
593 $arrayforsort = $amount_ht;
595 if ($sortfield ==
'amount_ht' && $sortorder ==
'desc') {
597 $arrayforsort = $amount_ht;
599 if ($sortfield ==
'amount_ttc' && $sortorder ==
'asc') {
601 $arrayforsort = $amount;
603 if ($sortfield ==
'amount_ttc' && $sortorder ==
'desc') {
605 $arrayforsort = $amount;
607 if ($sortfield ==
'zip' && $sortorder ==
'asc') {
609 $arrayforsort = $address_zip;
611 if ($sortfield ==
'zip' && $sortorder ==
'desc') {
612 arsort($address_zip);
613 $arrayforsort = $address_zip;
615 if ($sortfield ==
'town' && $sortorder ==
'asc') {
616 asort($address_town);
617 $arrayforsort = $address_town;
619 if ($sortfield ==
'town' && $sortorder ==
'desc') {
620 arsort($address_town);
621 $arrayforsort = $address_town;
623 if ($sortfield ==
'country' && $sortorder ==
'asc') {
624 asort($address_pays);
625 $arrayforsort = $address_town;
627 if ($sortfield ==
'country' && $sortorder ==
'desc') {
628 arsort($address_pays);
629 $arrayforsort = $address_town;
632 foreach ($arrayforsort as $key => $value) {
633 print
'<tr class="oddeven">';
636 $fullname = $name[$key];
638 $thirdparty_static->id = (int) $key;
639 $thirdparty_static->name = $fullname;
640 $thirdparty_static->client = 1;
641 $linkname = $thirdparty_static->getNomUrl(1,
'supplier');
643 $linkname = $langs->trans(
"PaymentsNotLinkedToInvoice");
645 print
"<td>".$linkname.
"</td>\n";
648 print $address_zip[$key];
652 print $address_town[$key];
656 print $address_pays[$key];
660 print
'<td class="right">';
661 if ($modecompta ==
'RECETTES-DEPENSES') {
663 print
'<a href="'.DOL_URL_ROOT.
'/fourn/facture/paiement/list.php?socid='.$key.
'">';
665 print
'<a href="'.DOL_URL_ROOT.
'/fourn/facture/paiement/list.php?socid=-1">';
669 print
'<a href="'.DOL_URL_ROOT.
'/fourn/facture/list.php?socid='.$key.
'">';
671 print
'<a href="#">';
673 print
price($amount_ht[$key]);
678 print
'<td class="right">';
679 if ($modecompta ==
'RECETTES-DEPENSES') {
681 print
'<a href="'.DOL_URL_ROOT.
'/fourn/facture/paiement/list.php?socid='.$key.
'">';
683 print
'<a href="'.DOL_URL_ROOT.
'/fourn/facture/paiement/list.php?orphelins=1">';
687 print
'<a href="'.DOL_URL_ROOT.
'/fourn/facture/list.php?socid='.$key.
'">';
689 print
'<a href="#">';
692 print
price($amount[$key]);
697 print
'<td class="right">'.($catotal > 0 ? round(100 * $amount[$key] / $catotal, 2).
'%' :
' ').
'</td>';
700 print
'<td class="center">';
702 print
' <a href="'.DOL_URL_ROOT.
'/comm/propal/stats/index.php?socid='.$key.
'">'.img_picto($langs->trans(
"ProposalStats"),
"stats").
'</a> ';
705 print
' <a href="'.DOL_URL_ROOT.
'/commande/stats/index.php?mode=supplier&socid='.$key.
'">'.img_picto($langs->trans(
"SupplierOrderStats"),
"stats").
'</a> ';
708 print
' <a href="'.DOL_URL_ROOT.
'/compta/facture/stats/index.php?mode=supplier&socid='.$key.
'">'.img_picto($langs->trans(
"InvoiceStats"),
"stats").
'</a> ';
716 print
'<tr class="liste_total">';
717 print
'<td>'.$langs->trans(
"Total").
'</td>';
721 if ($modecompta ==
'RECETTES-DEPENSES') {
724 print
'<td class="right">'.price($catotal_ht).
'</td>';
726 print
'<td class="right">'.price($catotal).
'</td>';
733 print
'<tr><td colspan="8"><span class="opacitymedium">'.$langs->trans(
"NoRecordFound").
'</span></td></tr>';
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.
if(!isModEnabled('ai')||!getDolGlobalString('AI_ASSISTANT_ENABLED')) global $conf
The main.inc.php has been included so the following variable are now defined:
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_get_last_day($year, $month=12, $gm=false)
Return GMT time for last day of a month or year.
dol_time_plus_duree($time, $duration_value, $duration_unit, $ruleforendofmonth=0, $tz='')
Add a delay to a date.
$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).
GETPOSTISSET($paramname)
Return true if we are in a context of submitting the parameter $paramname from a POST of a form.
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_previous($titlealt='default', $moreatt='')
Show previous logo.
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)
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, $nodie=0, $mode='')
Check permissions of a user to show a page and an object.