dolibarr 21.0.0-alpha
list.php
Go to the documentation of this file.
1<?php
2/* Copyright (C) 2001-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
3 * Copyright (C) 2004-2012 Laurent Destailleur <eldy@users.sourceforge.net>
4 * Copyright (C) 2005-2007 Regis Houssin <regis.houssin@inodbox.com>
5 * Copyright (C) 2010 Juanjo Menent <jmenent@2byte.es>
6 * Copyright (C) 2012 Christophe Battarel <christophe.battarel@altairis.fr>
7 * Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr>
8 * Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 3 of the License, or
13 * (at your option) any later version.
14 *
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
19 *
20 * You should have received a copy of the GNU General Public License
21 * along with this program. If not, see <https://www.gnu.org/licenses/>.
22 */
23
31// Load Dolibarr environment
32require '../../main.inc.php';
33require_once DOL_DOCUMENT_ROOT .'/product/class/product.class.php';
34require_once DOL_DOCUMENT_ROOT .'/societe/class/societe.class.php';
35require_once DOL_DOCUMENT_ROOT .'/fourn/class/fournisseur.class.php';
36
37
38// Load translation files required by the page
39$langs->loadLangs(array('products', 'suppliers'));
40
41// Get Parameters
42$action = GETPOST('action', 'aZ09') ? GETPOST('action', 'aZ09') : 'view'; // The action 'create'/'add', 'edit'/'update', 'view', ...
43$toselect = GETPOST('toselect', 'array:int'); // Array of ids of elements selected into a list
44$optioncss = GETPOST('optioncss', 'alpha');
45$mode = GETPOST('mode', 'aZ'); // The output mode ('list', 'kanban', 'hierarchy', 'calendar', ...)
46
47$sref = GETPOST('sref', 'alphanohtml');
48$sRefSupplier = GETPOST('srefsupplier');
49$snom = GETPOST('snom', 'alphanohtml');
50$type = GETPOST('type', 'alphanohtml');
51
52// Load variable for pagination
53$limit = GETPOSTINT('limit') ? GETPOSTINT('limit') : $conf->liste_limit;
54$sortfield = GETPOST('sortfield', 'aZ09comma');
55$sortorder = GETPOST('sortorder', 'aZ09comma');
56$page = GETPOSTISSET('pageplusone') ? (GETPOSTINT('pageplusone') - 1) : GETPOSTINT('page');
57if (empty($page) || $page < 0 || GETPOST('button_search', 'alpha') || GETPOST('button_removefilter', 'alpha')) {
58 // If $page is not defined, or '' or -1 or if we click on clear filters
59 $page = 0;
60}
61$offset = $limit * $page;
62$pageprev = $page - 1;
63$pagenext = $page + 1;
64if (!$sortfield) {
65 $sortfield = "p.ref"; // Set here default search field
66}
67if (!$sortorder) {
68 $sortorder = "ASC";
69}
70
71$fourn_id = GETPOST('fourn_id', 'intcomma');
72if ($user->socid) {
73 $fourn_id = $user->socid;
74}
75
76$catid = GETPOST('catid', 'intcomma');
77
78// Initialize a technical object to manage hooks. Note that conf->hooks_modules contains array
79$hookmanager->initHooks(array('supplierpricelist'));
80$extrafields = new ExtraFields($db);
81
82if (!$user->hasRight("produit", "lire") && !$user->hasRight("service", "lire")) {
84}
85
86// Permissions
87$permissiontoadd = ($user->hasRight('product', 'read') || $user->hasRight('service', 'read'));
88
89
90/*
91 * Actions
92 */
93
94if (GETPOST('cancel', 'alpha')) {
95 $action = 'list';
96 $massaction = '';
97}
98if (!GETPOST('confirmmassaction', 'alpha') && $massaction != 'presend' && $massaction != 'confirm_presend') {
99 $massaction = '';
100}
101
102$parameters = array();
103
104$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
105if ($reshook < 0) {
106 setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
107}
108
109if (empty($reshook)) {
110 // Selection of new fields
111 include DOL_DOCUMENT_ROOT.'/core/actions_changeselectedfields.inc.php';
112
113 // Purge search criteria
114 if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x', 'alpha') || GETPOST('button_removefilter', 'alpha')) { // All tests are required to be compatible with all browsers
115 $sref = '';
116 $sRefSupplier = '';
117 $snom = '';
118 $search_field1 = '';
119 $search_field2 = '';
120 $search_date_creation = '';
121 $search_date_modification = '';
122 $toselect = array();
123 $search_array_options = array();
124 }
125}
126
127
128/*
129 * View
130 */
131
132$form = new Form($db);
133$productstatic = new Product($db);
134$companystatic = new Societe($db);
135
136$title = $langs->trans('Supplier')." - ".$langs->trans('ProductsAndServices');
137
138if ($fourn_id) {
139 $supplier = new Fournisseur($db);
140 $supplier->fetch($fourn_id);
141}
142
143
144// Build and execute select
145// --------------------------------------------------------------------
146$sql = "SELECT p.rowid, p.label, p.ref, p.fk_product_type, p.entity, p.tosell, p.tobuy, p.barcode, p.fk_barcode_type,";
147$sql .= " ppf.fk_soc, ppf.ref_fourn, ppf.price as price, ppf.quantity as qty, ppf.unitprice,";
148$sql .= " s.rowid as socid, s.nom as name";
149// Add fields to SELECT from hooks
150$parameters = array();
151$reshook = $hookmanager->executeHooks('printFieldListSelect', $parameters, $object, $action);
152if ($reshook < 0) {
153 setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
154}
155$sql .= $hookmanager->resPrint;
156
157$sqlfields = $sql; // $sql fields to remove for count total
158
159$sql .= " FROM ".MAIN_DB_PREFIX."product as p";
160if ($catid) {
161 $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."categorie_product as cp ON cp.fk_product = p.rowid";
162}
163$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product_fournisseur_price as ppf ON p.rowid = ppf.fk_product AND p.entity = ppf.entity";
164$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON ppf.fk_soc = s.rowid AND s.entity IN (".getEntity('societe').")";
165$sql .= " WHERE p.entity IN (".getEntity('product').")";
166if ($sRefSupplier) {
167 $sql .= natural_search('ppf.ref_fourn', $sRefSupplier);
168}
169if (GETPOST('type')) {
170 $sql .= " AND p.fk_product_type = ".GETPOSTINT('type');
171}
172if ($sref) {
173 $sql .= natural_search('p.ref', $sref);
174}
175if ($snom) {
176 $sql .= natural_search('p.label', $snom);
177}
178if ($catid) {
179 $sql .= " AND cp.fk_categorie = ".((int) $catid);
180}
181if ($fourn_id > 0) {
182 $sql .= " AND ppf.fk_soc = ".((int) $fourn_id);
183}
184
185// Add WHERE filters from hooks
186$parameters = array();
187$reshook = $hookmanager->executeHooks('printFieldListWhere', $parameters);
188if ($reshook < 0) {
189 setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
190}
191$sql .= $hookmanager->resPrint;
192
193// Count total nb of records
194$nbtotalofrecords = '';
195if (!getDolGlobalInt('MAIN_DISABLE_FULL_SCANLIST')) {
196 /* The fast and low memory method to get and count full list converts the sql into a sql count */
197 $sqlforcount = preg_replace('/^'.preg_quote($sqlfields, '/').'/', 'SELECT COUNT(*) as nbtotalofrecords', $sql);
198 $sqlforcount = preg_replace('/GROUP BY .*$/', '', $sqlforcount);
199 $resql = $db->query($sqlforcount);
200 if ($resql) {
201 $objforcount = $db->fetch_object($resql);
202 $nbtotalofrecords = $objforcount->nbtotalofrecords;
203 } else {
204 dol_print_error($db);
205 }
206
207 if (($page * $limit) > $nbtotalofrecords) { // if total resultset is smaller than the paging size (filtering), goto and load page 0
208 $page = 0;
209 $offset = 0;
210 }
211 $db->free($resql);
212}
213
214// Complete request and execute it with limit
215$sql .= $db->order($sortfield, $sortorder);
216if ($limit) {
217 $sql .= $db->plimit($limit + 1, $offset);
218}
219
220dol_syslog("fourn/product/list.php:", LOG_DEBUG);
221$resql = $db->query($sql);
222if (!$resql) {
223 dol_print_error($db);
224 exit;
225}
226
227$num = $db->num_rows($resql);
228
229$i = 0;
230
231if ($num == 1 && (GETPOST("mode") == 'search')) {
232 $objp = $db->fetch_object($resql);
233 header("Location: ".DOL_URL_ROOT."/product/card.php?id=".$objp->rowid);
234 exit;
235}
236
237if (!empty($supplier->id)) {
238 $title = $langs->trans("ListOfSupplierProductForSupplier", $supplier->name);
239} else {
240 $title = $langs->trans("List");
241}
242
243
244// Output page
245// --------------------------------------------------------------------
246
247llxHeader("", $title, $help_url, '', 0, 0, '', '', '', 'bodyforlist mod-fourn-product page-list');
248
249$arrayofselected = is_array($toselect) ? $toselect : array();
250
251$param = '';
252if (!empty($mode)) {
253 $param .= '&mode='.urlencode($mode);
254}
255if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) {
256 $param .= '&contextpage='.urlencode($contextpage);
257}
258if ($limit > 0 && $limit != $conf->liste_limit) {
259 $param .= '&limit='.((int) $limit);
260}
261if ($optioncss != '') {
262 $param .= '&optioncss='.urlencode($optioncss);
263}
264$param = "&sref=".$sref."&snom=".$snom."&fourn_id=".$fourn_id.(isset($type) ? "&amp;type=".$type : "").(empty($sRefSupplier) ? "" : "&amp;srefsupplier=".$sRefSupplier);
265
266$newcardbutton = '';
267$newcardbutton .= dolGetButtonTitle($langs->trans('New'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/product/list.php?action=create&backtopage='.urlencode($_SERVER['PHP_SELF']), '', (int) $permissiontoadd);
268
269print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'generic', 0, $newcardbutton);
270
271if (!empty($catid)) {
272 print "<div id='ways'>";
273 $c = new Categorie($db);
274 $ways = $c->print_all_ways(' &gt; ', 'fourn/product/list.php');
275 print " &gt; ".$ways[0]."<br>\n";
276 print "</div><br>";
277}
278
279$arrayofmassactions = array(
280 //'generate_doc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("ReGeneratePDF"),
281 //'builddoc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("PDFMerge"),
282 //'presend'=>img_picto('', 'email', 'class="pictofixedwidth"').$langs->trans("SendByMail"),
283);
284if (!empty($permissiontodelete)) {
285 $arrayofmassactions['predelete'] = img_picto('', 'delete', 'class="pictofixedwidth"').$langs->trans("Delete");
286}
287if (GETPOSTINT('nomassaction') || in_array($massaction, array('presend', 'predelete'))) {
288 $arrayofmassactions = array();
289}
290$massactionbutton = $form->selectMassAction('', $arrayofmassactions);
291
292print '<form method="POST" id="searchFormList" action="'.$_SERVER["PHP_SELF"].'">'."\n";
293if ($optioncss != '') {
294 print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
295}
296print '<input type="hidden" name="token" value="'.newToken().'">';
297if ($fourn_id > 0) {
298 print '<input type="hidden" name="fourn_id" value="'.$fourn_id.'">';
299}
300print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
301print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
302print '<input type="hidden" name="page" value="'.$page.'">';
303print '<input type="hidden" name="type" value="'.$type.'">';
304
305$topicmail = "Information";
306$modelmail = "product";
307$objecttmp = new Product($db);
308$trackid = 'prod'.$object->id;
309include DOL_DOCUMENT_ROOT.'/core/tpl/massactions_pre.tpl.php';
310
311$varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage;
312$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // This also change content of $arrayfields with user setup
313$selectedfields = ($mode != 'kanban' ? $htmlofselectarray : '');
314$selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : '');
315
316print '<div class="div-table-responsive-no-min">';
317print '<table class="tagtable nobottomiftotal liste'.($moreforfilter ? " listwithfilterbefore" : "").'">'."\n";
318
319// Fields title search
320// --------------------------------------------------------------------
321print '<tr class="liste_titre_filter">';
322
323// Action column
324if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
325 print '<td class="liste_titre center maxwidthsearch">';
326 $searchpicto = $form->showFilterButtons('left');
327 print $searchpicto;
328 print '</td>';
329}
330print '<td class="liste_titre">';
331print '<input class="flat maxwidth100" type="text" name="sref" value="'.$sref.'">';
332print '</td>';
333print '<td class="liste_titre">';
334print '<input class="flat maxwidth100" type="text" name="srefsupplier" value="'.$sRefSupplier.'">';
335print '</td>';
336print '<td class="liste_titre">';
337print '<input class="flat maxwidth100" type="text" name="snom" value="'.$snom.'">';
338print '</td>';
339print '<td></td>';
340print '<td></td>';
341print '<td></td>';
342print '<td></td>';
343// add filters from hooks
344$parameters = array();
345$reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters, $object, $action);
346if ($reshook < 0) {
347 setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
348}
349print $hookmanager->resPrint;
350// Action column
351if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
352 print '<td class="liste_titre center maxwidthsearch">';
353 $searchpicto = $form->showFilterButtons();
354 print $searchpicto;
355 print '</td>';
356}
357print '</tr>'."\n";
358
359// Fields title label
360// --------------------------------------------------------------------
361print '<tr class="liste_titre">';
362// Action column
363if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
364 print getTitleFieldOfList($selectedfields, 0, $_SERVER["PHP_SELF"], '', '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ')."\n";
365 $totalarray['nbfield']++;
366}
367print_liste_field_titre("Ref", $_SERVER["PHP_SELF"], "p.ref", $param, "", "", $sortfield, $sortorder);
368print_liste_field_titre("RefSupplierShort", $_SERVER["PHP_SELF"], "ppf.ref_fourn", $param, "", "", $sortfield, $sortorder);
369print_liste_field_titre("Label", $_SERVER["PHP_SELF"], "p.label", $param, "", "", $sortfield, $sortorder);
370print_liste_field_titre("Supplier", $_SERVER["PHP_SELF"], "ppf.fk_soc", $param, "", "", $sortfield, $sortorder);
371print_liste_field_titre("BuyingPrice", $_SERVER["PHP_SELF"], "ppf.price", $param, "", '', $sortfield, $sortorder, 'right ');
372print_liste_field_titre("QtyMin", $_SERVER["PHP_SELF"], "ppf.quantity", $param, "", '', $sortfield, $sortorder, 'right ');
373print_liste_field_titre("UnitPrice", $_SERVER["PHP_SELF"], "ppf.unitprice", $param, "", '', $sortfield, $sortorder, 'right ');
374// add header cells from hooks
375$parameters = array();
376$reshook = $hookmanager->executeHooks('printFieldListTitle', $parameters, $object, $action);
377if ($reshook < 0) {
378 setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
379}
380print $hookmanager->resPrint;
381// Action column
382if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
383 print getTitleFieldOfList($selectedfields, 0, $_SERVER["PHP_SELF"], '', '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ')."\n";
384 $totalarray['nbfield']++;
385}
386print '</tr>'."\n";
387
388// Loop on record
389// --------------------------------------------------------------------
390$i = 0;
391$savnbfield = $totalarray['nbfield'];
392$totalarray = array();
393$totalarray['nbfield'] = 0;
394$imaxinloop = ($limit ? min($num, $limit) : $num);
395while ($i < $imaxinloop) {
396 $objp = $db->fetch_object($resql);
397 if (empty($objp)) {
398 break; // Should not happen
399 }
400
401 $productstatic->id = $objp->rowid;
402 $productstatic->ref = $objp->ref;
403 $productstatic->type = $objp->fk_product_type;
404 $productstatic->entity = $objp->entity;
405 $productstatic->status = $objp->tosell;
406 $productstatic->status_buy = $objp->tobuy;
407 $productstatic->barcode = $objp->barcode;
408 $productstatic->barcode_type = $objp->fk_barcode_type;
409
410 print '<tr data-rowid="'.$object->id.'" class="oddeven">';
411
412 // Action column
413 if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
414 print '<td class="nowrap center">';
415 if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
416 $selected = 0;
417 if (in_array($object->id, $arrayofselected)) {
418 $selected = 1;
419 }
420 print '<input id="cb'.$object->id.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$object->id.'"'.($selected ? ' checked="checked"' : '').'>';
421 }
422 print '</td>';
423 if (!$i) {
424 $totalarray['nbfield']++;
425 }
426 }
427
428 print '<td>';
429 print $productstatic->getNomUrl(1, 'supplier');
430 print '</td>';
431
432 print '<td>'.$objp->ref_fourn.'</td>';
433
434 print '<td>'.$objp->label.'</td>'."\n";
435
436 $companystatic->name = $objp->name;
437 $companystatic->id = $objp->socid;
438 print '<td>';
439 if ($companystatic->id > 0) {
440 print $companystatic->getNomUrl(1, 'supplier');
441 }
442 print '</td>';
443
444 print '<td class="right">'.(isset($objp->price) ? price($objp->price) : '').'</td>';
445
446 print '<td class="right">'.$objp->qty.'</td>';
447
448 print '<td class="right">'.(isset($objp->unitprice) ? price($objp->unitprice) : '').'</td>';
449
450 // add additional columns from hooks
451 $parameters = array();
452 $reshook = $hookmanager->executeHooks('printFieldListValue', $parameters, $objp, $action);
453 if ($reshook < 0) {
454 setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
455 }
456 print $hookmanager->resPrint;
457
458 // Action column
459 if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
460 print '<td class="nowrap center">';
461 if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
462 $selected = 0;
463 if (in_array($object->id, $arrayofselected)) {
464 $selected = 1;
465 }
466 print '<input id="cb'.$object->id.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$object->id.'"'.($selected ? ' checked="checked"' : '').'>';
467 }
468 print '</td>';
469 if (!$i) {
470 $totalarray['nbfield']++;
471 }
472 }
473
474 print '</tr>'."\n";
475 $i++;
476}
477
478// Show total line
479include DOL_DOCUMENT_ROOT.'/core/tpl/list_print_total.tpl.php';
480
481// If no record found
482if ($num == 0) {
483 $colspan = 8;
484 /*foreach ($arrayfields as $key => $val) {
485 if (!empty($val['checked'])) {
486 $colspan++;
487 }
488 }*/
489 print '<tr><td colspan="'.$colspan.'"><span class="opacitymedium">'.$langs->trans("NoRecordFound").'</span></td></tr>';
490}
491
492$db->free($resql);
493
494$parameters = array('arrayfields' => $arrayfields, 'sql' => $sql);
495$reshook = $hookmanager->executeHooks('printFieldListFooter', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
496print $hookmanager->resPrint;
497
498print '</table>'."\n";
499print '</div>'."\n";
500
501print '</form>'."\n";
502
503
504// End of page
505llxFooter();
506$db->close();
if( $user->socid > 0) if(! $user->hasRight('accounting', 'chartofaccount')) $object
Definition card.php:58
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:70
Class to manage categories.
Class to manage standard extra fields.
Class to manage generation of HTML components Only common components must be here.
Class to manage suppliers.
Class to manage products or services.
Class to manage third parties objects (customers, suppliers, prospects...)
llxFooter()
Footer empty.
Definition document.php:107
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='', $noduplicate=0, $attop=0)
Set event messages in dol_events session object.
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.
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.
natural_search($fields, $value, $mode=0, $nofirstand=0)
Generate natural SQL search string for a criteria (this criteria can be tested on one or several fiel...
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.
getDolGlobalInt($key, $default=0)
Return a Dolibarr global constant int value.
print_liste_field_titre($name, $file="", $field="", $begin="", $moreparam="", $moreattrib="", $sortfield="", $sortorder="", $prefix="", $tooltip="", $forcenowrapcolumntitle=0)
Show title line of an array.
getTitleFieldOfList($name, $thead=0, $file="", $field="", $begin="", $moreparam="", $moreattrib="", $sortfield="", $sortorder="", $prefix="", $disablesortlink=0, $tooltip='', $forcenowrapcolumntitle=0)
Get title line of an array.
print_barre_liste($title, $page, $file, $options='', $sortfield='', $sortorder='', $morehtmlcenter='', $num=-1, $totalnboflines='', $picto='generic', $pictoisfullpath=0, $morehtmlright='', $morecss='', $limit=-1, $hideselectlimit=0, $hidenavigation=0, $pagenavastextinput=0, $morehtmlrightbeforearrow='')
Print a title with navigation controls for pagination.
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...
getDolGlobalString($key, $default='')
Return a Dolibarr global constant string value.
dol_syslog($message, $level=LOG_INFO, $ident=0, $suffixinfilename='', $restricttologhandler='', $logcontext=null)
Write log message into outputs.
getEntity($element, $shared=1, $currentobject=null)
Get list of entity id to use.
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.