dolibarr 25.0.0-alpha
index.php
Go to the documentation of this file.
1<?php
2/* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
3 * Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
4 * Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
5 * Copyright (C) 2012 Marcos García <marcosgdf@gmail.com>
6 * Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
7 * Copyright (C) 2020 Maxime DEMAREST <maxime@indelog.fr>
8 * Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
9 * Copyright (C) 2024-2025 Frédéric France <frederic.france@free.fr>
10 *
11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License as published by
13 * the Free Software Foundation; either version 3 of the License, or
14 * (at your option) any later version.
15 *
16 * This program is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
20 *
21 * You should have received a copy of the GNU General Public License
22 * along with this program. If not, see <https://www.gnu.org/licenses/>.
23 */
24
31// Load Dolibarr environment
32require '../../../main.inc.php';
40require_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propalestats.class.php';
41require_once DOL_DOCUMENT_ROOT.'/core/class/dolgraph.class.php';
42require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
43require_once DOL_DOCUMENT_ROOT.'/core/class/html.formpropal.class.php';
44require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
45require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
46
49
50$mode = GETPOSTISSET("mode") ? GETPOST("mode", 'aZ09') : 'customer';
51
52$hookmanager->initHooks(array('propalstats', 'globalcard'));
53
54$object_status = GETPOST('object_status', 'intcomma');
55$typent_id = GETPOSTINT('typent_id');
56$categ_id = GETPOSTINT('categ_id');
57$select_categ_propal_id=GETPOST('select_categ_propal_id', 'array');
58
59$userid = GETPOSTINT('userid');
60$socid = GETPOSTINT('socid');
61// Security check
62if ($user->socid > 0) {
63 $action = '';
64 $socid = $user->socid;
65}
66
67$parameters = array();
68$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
69if ($reshook < 0) {
70 setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
71}
72
73$nowyear = dol_print_date(dol_now('gmt'), "%Y", 'gmt');
74$year = GETPOST('year') > 0 ? GETPOSTINT('year') : $nowyear;
75$startyear = $year - (!getDolGlobalString('MAIN_STATS_GRAPHS_SHOW_N_YEARS') ? 2 : max(1, min(10, getDolGlobalString('MAIN_STATS_GRAPHS_SHOW_N_YEARS'))));
76$endyear = $year;
77
78// Load translation files required by the page
79$langs->loadLangs(array('orders', 'companies', 'other', 'suppliers', 'supplier_proposal'));
80
81if ($mode == 'customer' && !$user->hasRight('propal', 'lire')) {
83}
84if ($mode == 'supplier' && !$user->hasRight('supplier_proposal', 'lire')) {
86}
87
88
89/*
90 * View
91 */
92
93$form = new Form($db);
94$formpropal = new FormPropal($db);
95$formcompany = new FormCompany($db);
96$formother = new FormOther($db);
97
98$langs->loadLangs(array('propal', 'other', 'companies'));
99
100$picto = 'propal';
101$title = $langs->trans('Proposals');
102$modheader = 'propal';
103
104$dir = $conf->propal->dir_temp;
105$cat_type = Categorie::TYPE_CUSTOMER;
106$cat_label = $langs->trans("Category").' '.lcfirst($langs->trans("Customer"));
107
108if ($mode == 'supplier') {
109 $picto = 'supplier_proposal';
110 $title = $langs->trans("SupplierProposals");
111 $modheader = 'supplier_proposal';
112 $dir = $conf->supplier_proposal->dir_temp;
113 $cat_type = Categorie::TYPE_SUPPLIER;
114 $cat_label = $langs->trans("Category").' '.lcfirst($langs->trans("Supplier"));
115}
116
117llxHeader('', $title, '', '', 0, 0, '', '', '', 'mod-'.$modheader.' page-stats');
118
119$page = 0;
120$param = '';
121$sortfield = '';
122$sortorder = '';
123$massactionbutton = '';
124$num = 0;
125$nbtotalofrecords = $langs->trans("Statistics");
126$limit = 0;
127
128$url = DOL_URL_ROOT.'/comm/propal/card.php?action=create';
129if (!empty($socid)) {
130 $url .= '&socid='.$socid;
131}
132
133$newcardbutton = '';
134if ($mode == 'supplier') {
135 $urlnew = DOL_URL_ROOT.'/supplier_proposal/card.php?action=create';
136 if (!empty($socid)) {
137 $urlnew .= '&socid='.$socid;
138 }
139 $newcardbutton .= dolGetButtonTitle($langs->trans('ViewList'), '', 'fa fa-bars imgforviewmode', DOL_URL_ROOT.'/supplier_proposal/list.php?mode=common', '', 1, array('morecss' => 'reposition'));
140 $newcardbutton .= dolGetButtonTitle($langs->trans('ViewKanban'), '', 'fa fa-th-list imgforviewmode', DOL_URL_ROOT.'/supplier_proposal/list.php?mode=kanban', '', 1, array('morecss' => 'reposition'));
141 $newcardbutton .= dolGetButtonTitle($langs->trans('Statistics'), '', 'fa fa-chart-bar imgforviewmode', DOL_URL_ROOT.'/comm/propal/stats/index.php?mode=supplier', '', 2, array('morecss' => 'reposition'));
142 $newcardbutton .= dolGetButtonTitleSeparator();
143 $newcardbutton .= dolGetButtonTitle($langs->trans('NewAskPrice'), '', 'fa fa-plus-circle', $urlnew, '', $user->hasRight('supplier_proposal', 'creer'));
144} else {
145 $newcardbutton .= dolGetButtonTitle($langs->trans('ViewList'), '', 'fa fa-bars imgforviewmode', DOL_URL_ROOT . '/comm/propal/list.php?mode=common' . preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', 1, array('morecss' => 'reposition'));
146 $newcardbutton .= dolGetButtonTitle($langs->trans('ViewKanban'), '', 'fa fa-th-list imgforviewmode', DOL_URL_ROOT . '/comm/propal/list.php?mode=kanban' . preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', 1, array('morecss' => 'reposition'));
147 $newcardbutton .= dolGetButtonTitle($langs->trans('Statistics'), '', 'fa fa-chart-bar imgforviewmode', DOL_URL_ROOT . '/comm/propal/stats/index.php' . preg_replace('/(&|\?)*(mode|groupby)=[^&]+/', '', $param), '', 2, array('morecss' => 'reposition'));
148 $newcardbutton .= dolGetButtonTitleSeparator();
149 $newcardbutton .= dolGetButtonTitle($langs->trans('NewPropal'), '', 'fa fa-plus-circle', $url, '', $user->hasRight('propal', 'creer'));
150}
151
152print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, $picto, 0, $newcardbutton, '', $limit, 0, 0, 1);
153
154
155dol_mkdir($dir);
156
157
158$stats = new PropaleStats($db, $socid, ($userid > 0 ? $userid : 0), $mode, ($typent_id > 0 ? $typent_id : 0), ($categ_id > 0 ? $categ_id : 0));
159if ($object_status != '' && $object_status >= 0) {
160 $stats->where .= ' AND p.fk_statut IN ('.$db->sanitize($object_status).')';
161}
162
163// Build graphic number of object
164$data = $stats->getNbByMonthWithPrevYear($endyear, $startyear);
165// $data = array(array('Lib',val1,val2,val3),...)
166if ($mode == 'customer') {
167 if (is_array($select_categ_propal_id) && !empty($select_categ_propal_id)) {
168 $stats->from .= ' LEFT JOIN '.MAIN_DB_PREFIX.'categorie_propal as cat ON (p.rowid = cat.fk_propal)';
169 $stats->where .= ' AND cat.fk_categorie IN ('.$db->sanitize(implode(',', $select_categ_propal_id)).')';
170 }
171}
172if ($mode == 'supplier') {
173 if (is_array($select_categ_propal_id) && !empty($select_categ_propal_id)) {
174 $stats->from .= ' LEFT JOIN '.MAIN_DB_PREFIX.'categorie_supplier_proposal as cat ON (p.rowid = cat.fk_supplier_proposal)';
175 $stats->where .= ' AND cat.fk_categorie IN ('.$db->sanitize(implode(',', $select_categ_propal_id)).')';
176 }
177}
178
179if (!$user->hasRight('societe', 'client', 'voir')) {
180 $filenamenb = $dir.'/proposalsnbinyear-'.$user->id.'-'.$year.'.png';
181 $fileurlnb = DOL_URL_ROOT.'/viewimage.php?modulepart=propalstats&file=proposalsnbinyear-'.$user->id.'-'.$year.'.png';
182} else {
183 $filenamenb = $dir.'/proposalsnbinyear-'.$year.'.png';
184 $fileurlnb = DOL_URL_ROOT.'/viewimage.php?modulepart=propalstats&file=proposalsnbinyear-'.$year.'.png';
185}
186
187$px1 = new DolGraph();
188$mesg = $px1->isGraphKo();
189if (!$mesg) {
190 $px1->SetData($data);
191 $i = $startyear;
192 $legend = array();
193 while ($i <= $endyear) {
194 $legend[] = $i;
195 $i++;
196 }
197 $px1->SetLegend($legend);
198 $px1->SetMaxValue($px1->GetCeilMaxValue());
199 $px1->SetMinValue(min(0, $px1->GetFloorMinValue()));
200 $px1->SetWidth($WIDTH);
201 $px1->SetHeight($HEIGHT);
202 $px1->SetYLabel($langs->trans("NbOfProposals"));
203 $px1->SetShading(3);
204 $px1->SetHorizTickIncrement(1);
205 $px1->mode = 'depth';
206 $px1->SetTitle($langs->trans("NumberOfProposalsByMonth"));
207
208 $px1->draw($filenamenb, $fileurlnb);
209}
210
211// Build graphic amount of object
212$data = $stats->getAmountByMonthWithPrevYear($endyear, $startyear, 0);
213// $data = array(array('Lib',val1,val2,val3),...)
214
215if (!$user->hasRight('societe', 'client', 'voir')) {
216 $filenameamount = $dir.'/proposalsamountinyear-'.$user->id.'-'.$year.'.png';
217 $fileurlamount = DOL_URL_ROOT.'/viewimage.php?modulepart=propalstats&file=proposalsamountinyear-'.$user->id.'-'.$year.'.png';
218} else {
219 $filenameamount = $dir.'/proposalsamountinyear-'.$year.'.png';
220 $fileurlamount = DOL_URL_ROOT.'/viewimage.php?modulepart=propalstats&file=proposalsamountinyear-'.$year.'.png';
221}
222
223$px2 = new DolGraph();
224$mesg = $px2->isGraphKo();
225if (!$mesg) {
226 $px2->SetData($data);
227 $i = $startyear;
228 $legend = array();
229 while ($i <= $endyear) {
230 $legend[] = $i;
231 $i++;
232 }
233 $px2->SetLegend($legend);
234 $px2->SetMaxValue($px2->GetCeilMaxValue());
235 $px2->SetMinValue(min(0, $px2->GetFloorMinValue()));
236 $px2->SetWidth($WIDTH);
237 $px2->SetHeight($HEIGHT);
238 $px2->SetYLabel($langs->trans("AmountOfProposals"));
239 $px2->SetShading(3);
240 $px2->SetHorizTickIncrement(1);
241 $px2->mode = 'depth';
242 $px2->SetTitle($langs->trans("AmountOfProposalsByMonthHT"));
243
244 $px2->draw($filenameamount, $fileurlamount);
245}
246
247$data = $stats->getAverageByMonthWithPrevYear($endyear, $startyear);
248
249$fileurl_avg = '';
250if (!$user->hasRight('societe', 'client', 'voir')) {
251 $filename_avg = $dir.'/ordersaverage-'.$user->id.'-'.$year.'.png';
252 if ($mode == 'customer') {
253 $fileurl_avg = DOL_URL_ROOT.'/viewimage.php?modulepart=orderstats&file=ordersaverage-'.$user->id.'-'.$year.'.png';
254 }
255 if ($mode == 'supplier') {
256 $fileurl_avg = DOL_URL_ROOT.'/viewimage.php?modulepart=orderstatssupplier&file=ordersaverage-'.$user->id.'-'.$year.'.png';
257 }
258} else {
259 $filename_avg = $dir.'/ordersaverage-'.$year.'.png';
260 if ($mode == 'customer') {
261 $fileurl_avg = DOL_URL_ROOT.'/viewimage.php?modulepart=orderstats&file=ordersaverage-'.$year.'.png';
262 }
263 if ($mode == 'supplier') {
264 $fileurl_avg = DOL_URL_ROOT.'/viewimage.php?modulepart=orderstatssupplier&file=ordersaverage-'.$year.'.png';
265 }
266}
267
268$px3 = new DolGraph();
269$mesg = $px3->isGraphKo();
270if (!$mesg) {
271 $px3->SetData($data);
272 $i = $startyear;
273 $legend = array();
274 while ($i <= $endyear) {
275 $legend[] = $i;
276 $i++;
277 }
278 $px3->SetLegend($legend);
279 $px3->SetYLabel($langs->trans("AmountAverage"));
280 $px3->SetMaxValue($px3->GetCeilMaxValue());
281 $px3->SetMinValue((int) $px3->GetFloorMinValue());
282 $px3->SetWidth($WIDTH);
283 $px3->SetHeight($HEIGHT);
284 $px3->SetShading(3);
285 $px3->SetHorizTickIncrement(1);
286 $px3->mode = 'depth';
287 $px3->SetTitle($langs->trans("AmountAverage"));
288
289 $px3->draw($filename_avg, $fileurl_avg);
290}
291
292
293// Show array
294$data = $stats->getAllByYear();
295$arrayyears = array();
296foreach ($data as $val) {
297 if (!empty($val['year'])) {
298 $arrayyears[$val['year']] = $val['year'];
299 }
300}
301if (!count($arrayyears)) {
302 $arrayyears[$nowyear] = $nowyear;
303}
304
305
306$h = 0;
307$head = array();
308$head[$h][0] = DOL_URL_ROOT.'/comm/propal/stats/index.php';
309$head[$h][1] = $langs->trans("ByMonthYear");
310$head[$h][2] = 'byyear';
311$h++;
312
313complete_head_from_modules($conf, $langs, null, $head, $h, 'propal_stats');
314
315print dol_get_fiche_head($head, 'byyear', '', -1);
316
317
318print '<div class="fichecenter"><div class="fichethirdleft">';
319
320
321// Show filter box
322print '<form name="stats" method="POST" action="'.dolBuildUrl($_SERVER["PHP_SELF"]).'">';
323print '<input type="hidden" name="token" value="'.newToken().'">';
324print '<input type="hidden" name="mode" value="'.$mode.'">';
325
326print '<table class="noborder centpercent">';
327print '<tr class="liste_titre"><td class="liste_titre" colspan="2">'.$langs->trans("Filter").'</td></tr>';
328// Company
329print '<tr><td class="left">'.$langs->trans("ThirdParty").'</td><td class="left">';
330print img_picto('', 'company', 'class="pictofixedwidth"');
331$filter = '(s.client:IN:1,2,3)';
332print $form->select_company($socid, 'socid', $filter, 1, 0, 0, array(), 0, 'widthcentpercentminusx maxwidth300', '');
333print '</td></tr>';
334// ThirdParty Type
335print '<tr><td>'.$langs->trans("ThirdPartyType").'</td><td>';
336$sortparam_typent = (!getDolGlobalString('SOCIETE_SORT_ON_TYPEENT') ? 'ASC' : $conf->global->SOCIETE_SORT_ON_TYPEENT); // NONE means we keep sort of original array, so we sort on position. ASC, means next function will sort on label.
337print $form->selectarray("typent_id", $formcompany->typent_array(0), $typent_id, 1, 0, 0, '', 0, 0, 0, $sortparam_typent, '', 1);
338if ($user->admin) {
339 print ' '.info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1);
340}
341print '</td></tr>';
342// Category
343print '<tr><td>'.$cat_label.'</td><td>';
344print img_picto('', 'category', 'class="pictofixedwidth"');
345print $formother->select_categories($cat_type, $categ_id, 'categ_id', 0, 1, 'widthcentpercentminusx maxwidth300');
346print '</td></tr>';
347
348if (isModEnabled('category')) {
349 $cat_type = '';
350 $cat_label = '';
351 if ($mode == 'customer') {
352 $cat_type = Categorie::TYPE_PROPOSAL;
353 $cat_label = $langs->trans("Category").' '.lcfirst($langs->trans("Proposals"));
354 }
355 if ($mode == 'supplier') {
356 $cat_type = Categorie::TYPE_SUPPLIER_PROPOSAL;
357 $cat_label = $langs->trans("Category").' '.lcfirst($langs->trans("SupplierProposals"));
358 }
359 print '<tr><td>'.$cat_label.'</td><td>';
360 $cate_arbo = $form->select_all_categories($cat_type, '', 'parent', 0, 0, 1);
361 print img_picto('', 'category', 'class="pictofixedwidth"');
362 print $form->multiselectarray('select_categ_propal_id', $cate_arbo, GETPOST('select_categ_propal_id', 'array'), 0, 0, 'widthcentpercentminusx maxwidth300');
363 //print $formother->select_categories($cat_type, $categ_id, 'categ_id', true);
364 print '</td></tr>';
365}
366// User
367print '<tr><td>'.$langs->trans("CreatedBy").'</td><td>';
368print img_picto('', 'user', 'class="pictofixedwidth"');
369print $form->select_dolusers($userid, 'userid', 1, null, 0, '', '', '0', 0, 0, '', 0, '', 'widthcentpercentminusx maxwidth300');
370print '</td></tr>';
371// Status
372print '<tr><td>'.$langs->trans("Status").'</td><td>';
373$formpropal->selectProposalStatus(($object_status != '' ? $object_status : -1), 0, 0, 1, $mode, 'object_status');
374print '</td></tr>';
375// Year
376print '<tr><td>'.$langs->trans("Year").'</td><td>';
377if (!in_array($year, $arrayyears)) {
378 $arrayyears[$year] = $year;
379}
380if (!in_array($nowyear, $arrayyears)) {
381 $arrayyears[$nowyear] = $nowyear;
382}
383arsort($arrayyears);
384print img_picto('', 'calendar', 'class="pictofixedwidth"');
385print $form->selectarray('year', $arrayyears, $year, 0, 0, 0, '', 0, 0, 0, '', 'width75');
386print '</td></tr>';
387print '<tr><td align="center" colspan="2"><input type="submit" name="submit" class="button small" value="'.$langs->trans("Refresh").'"></td></tr>';
388print '</table>';
389print '</form>';
390print '<br><br>';
391
392print '<div class="div-table-responsive-no-min">';
393print '<table class="noborder centpercent">';
394print '<tr class="liste_titre" height="24">';
395print '<td class="center">'.$langs->trans("Year").'</td>';
396print '<td class="right">'.$langs->trans("NbOfProposals").'</td>';
397print '<td class="right">%</td>';
398print '<td class="right">'.$langs->trans("AmountTotal").'</td>';
399print '<td class="right">%</td>';
400print '<td class="right">'.$langs->trans("AmountAverage").'</td>';
401print '<td class="right">%</td>';
402print '</tr>';
403
404$oldyear = 0;
405foreach ($data as $val) {
406 $year = $val['year'];
407 while (!empty($year) && $oldyear > (int) $year + 1) { // If we have empty year
408 $oldyear--;
409
410 print '<tr class="oddeven" height="24">';
411 print '<td align="center"><a href="'.$_SERVER["PHP_SELF"].'?year='.$oldyear.'&amp;mode='.$mode.($socid > 0 ? '&socid='.$socid : '').($userid > 0 ? '&userid='.$userid : '').'">'.$oldyear.'</a></td>';
412 print '<td class="right">0</td>';
413 print '<td class="right"></td>';
414 print '<td class="right">0</td>';
415 print '<td class="right"></td>';
416 print '<td class="right">0</td>';
417 print '<td class="right"></td>';
418 print '</tr>';
419 }
420 print '<tr class="oddeven" height="24">';
421 print '<td align="center"><a href="'.$_SERVER["PHP_SELF"].'?year='.$year.($socid > 0 ? '&socid='.$socid : '').($userid > 0 ? '&userid='.$userid : '').'">'.$year.'</a></td>';
422 print '<td class="right">'.$val['nb'].'</td>';
423 print '<td class="right opacitylow" style="'.((!isset($val['nb_diff']) || $val['nb_diff'] >= 0) ? 'color: green;' : 'color: red;').'">'.(isset($val['nb_diff']) ? round($val['nb_diff']) : "0").'%</td>';
424 print '<td class="right">'.price(price2num($val['total'], 'MT'), 1).'</td>';
425 print '<td class="right opacitylow" style="'.((!isset($val['total_diff']) || $val['total_diff'] >= 0) ? 'color: green;' : 'color: red;').'">'.(isset($val['total_diff']) ? round($val['total_diff']) : "0").'%</td>';
426 print '<td class="right">'.price(price2num($val['avg'], 'MT'), 1).'</td>';
427 print '<td class="right opacitylow" style="'.((!isset($val['avg_diff']) || $val['avg_diff'] >= 0) ? 'color: green;' : 'color: red;').'">'.(isset($val['avg_diff']) ? round($val['avg_diff']) : "0").'%</td>';
428 print '</tr>';
429 $oldyear = $year;
430}
431
432print '</table>';
433print '</div>';
434
435print '</div><div class="fichetwothirdright">';
436
437
438// Show graphs
439print '<table class="border centpercent"><tr class="pair nohover"><td align="center">';
440if ($mesg) {
441 print $mesg;
442} else {
443 print $px1->show();
444 print "<br>\n";
445 print $px2->show();
446 print "<br>\n";
447 print $px3->show();
448}
449print '</td></tr></table>';
450
451
452print '</div></div>';
453print '<div class="clearboth"></div>';
454
455
456print dol_get_fiche_end();
457
458// End of page
459llxFooter();
460$db->close();
llxFooter($comment='', $zone='private', $disabledoutputofmessages=0)
Empty footer.
Definition wrapper.php:91
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.
Definition wrapper.php:73
Class to build graphs.
static getDefaultGraphSizeForStats($direction, $defaultsize='')
getDefaultGraphSizeForStats
Class to build HTML component for third parties management Only common components are here.
Class to manage generation of HTML components Only common components must be here.
Class to help generate other html components Only common components are here.
Class to manage generation of HTML components for proposal management.
Class to manage proposals statistics.
if(!isModEnabled('ai')||!getDolGlobalString('AI_ASSISTANT_ENABLED')) global $conf
The main.inc.php has been included so the following variable are now defined:
if(!isModEnabled('ai')||!getDolGlobalString('AI_ASSISTANT_ENABLED')) global $db
API class for accounts.
dol_now($mode='gmt')
Return date for now.
price2num($amount, $rounding='', $option=0)
Function that return a number with universal decimal format (decimal separator is '.
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).
complete_head_from_modules($conf, $langs, $object, &$head, &$h, $type, $mode='add', $filterorigmodule='')
Complete or removed entries into a head array (used to build tabs).
getDolGlobalString($key, $default='')
Return a Dolibarr global constant string value.
isModEnabled($module)
Is Dolibarr module enabled.
dol_mkdir($dir, $dataroot='', $newmask='')
Creation of a directory (this can create recursive subdir)
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='', $noduplicate=0, $attop=0)
Set event messages in dol_events session object.
print_barre_liste($title, $page, $file, $options='', $sortfield='', $sortorder='', $morehtmlcenter='', $num=-1, $totalnboflines='', $picto='generic', $pictoisfullpath=0, $morehtmlright='', $morecss='', $limit=-1, $selectlimitsuffix=0, $hidenavigation=0, $pagenavastextinput=0, $morehtmlrightbeforearrow='')
Print a title with navigation controls for pagination.
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)
dol_get_fiche_head($links=array(), $active='', $title='', $notab=0, $picto='', $pictoisfullpath=0, $morehtmlright='', $morecss='', $limittoshow=0, $moretabssuffix='', $dragdropfile=0, $morecssdiv='')
Show tabs of a record.
Definition html.lib.php:519
dolGetButtonTitle($label, $helpText='', $iconClass='fa fa-file', $url='', $id='', $status=1, $params=array())
Function dolGetButtonTitle : this kind of buttons are used in title in list.
dol_get_fiche_end($notab=0)
Return tab footer of a card.
Definition html.lib.php:717
dolGetButtonTitleSeparator($moreClass="")
Add space between dolGetButtonTitle.
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.