dolibarr  19.0.0-dev
orders_list.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (C) 2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
3  * Copyright (C) 2005-2017 Laurent Destailleur <eldy@users.sourceforge.net>
4  * Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com>
5  * Copyright (C) 2010-2012 Juanjo Menent <jmenent@2byte.es>
6  *
7  * This program is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation; either version 3 of the License, or
10  * (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program. If not, see <https://www.gnu.org/licenses/>.
19  */
20 
27 // Load Dolibarr environment
28 require '../../main.inc.php';
29 require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/bonprelevement.class.php';
30 require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
31 
32 // Load translation files required by the page
33 $langs->loadLangs(array('banks', 'categories', 'withdrawals'));
34 
35 $action = GETPOST('action', 'aZ09') ? GETPOST('action', 'aZ09') : 'view'; // The action 'add', 'create', 'edit', 'update', 'view', ...
36 $massaction = GETPOST('massaction', 'alpha'); // The bulk action (combo box choice into lists)
37 $confirm = GETPOST('confirm', 'alpha'); // Result of a confirmation
38 $cancel = GETPOST('cancel', 'alpha'); // We click on a Cancel button
39 $toselect = GETPOST('toselect', 'array'); // Array of ids of elements selected into a list
40 $contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'directdebitcredittransferlist'; // To manage different context of search
41 $backtopage = GETPOST('backtopage', 'alpha'); // Go back to a dedicated page
42 $optioncss = GETPOST('optioncss', 'alpha');
43 $mode = GETPOST('mode', 'alpha');
44 
45 $type = GETPOST('type', 'aZ09');
46 
47 // Load variable for pagination
48 $limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit;
49 $sortfield = GETPOST('sortfield', 'aZ09comma');
50 $sortorder = GETPOST('sortorder', 'aZ09comma');
51 $page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int');
52 if (empty($page) || $page < 0 || GETPOST('button_search', 'alpha') || GETPOST('button_removefilter', 'alpha')) {
53  // If $page is not defined, or '' or -1 or if we click on clear filters
54  $page = 0;
55 }
56 $offset = $limit * $page;
57 $pageprev = $page - 1;
58 $pagenext = $page + 1;
59 if (!$sortorder) {
60  $sortorder = "DESC";
61 }
62 if (!$sortfield) {
63  $sortfield = "p.datec";
64 }
65 
66 // Get supervariables
67 $statut = GETPOST('statut', 'int');
68 $search_ref = GETPOST('search_ref', 'alpha');
69 $search_amount = GETPOST('search_amount', 'alpha');
70 
71 $bon = new BonPrelevement($db);
72 $hookmanager->initHooks(array('withdrawalsreceiptslist'));
73 
74 $usercancreate = $user->rights->prelevement->bons->creer;
75 $permissiontodelete = $user->hasRight('prelevement', 'creer');
76 if ($type == 'bank-transfer') {
77  $usercancreate = $user->rights->paymentbybanktransfer->create;
78  $permissiontodelete = $user->hasRight('paymentbybanktransfer', 'create');
79 }
80 
81 // Security check
82 $socid = GETPOST('socid', 'int');
83 if ($user->socid) {
84  $socid = $user->socid;
85 }
86 if ($type == 'bank-transfer') {
87  $result = restrictedArea($user, 'paymentbybanktransfer', '', '', '');
88 } else {
89  $result = restrictedArea($user, 'prelevement', '', '', 'bons');
90 }
91 
92 
93 /*
94  * Actions
95  */
96 
97 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
98  $search_ref = "";
99  $search_amount = "";
100 }
101 
102 // Mass actions
103 
104 // Delete draft
105 if (($massaction == "delete" || ($action == 'delete' && $confirm == 'yes')) && $permissiontodelete) {
106  $db->begin();
107  $objecttmp = new BonPrelevement($db);
108  foreach ($toselect as $toselectid) {
109  $result = $objecttmp->fetch($toselectid);
110  if ($result > 0) {
111  if ($objecttmp->status != $objecttmp::STATUS_DRAFT || $objecttmp->credite > 0 || $objecttmp->date_creation != null) {
112  $langs->load("errors");
113  $nbignored++;
114  $TMsg[] = '<div class="error">'.$langs->trans('ErrorOnlyDraftStatusCanBeDeletedInMassAction', $objecttmp->ref).'</div><br>';
115  continue;
116  }
117  $result = $objecttmp->delete($user);
118  if ($result < 0) { // if delete returns is < 0, there is an error, we break and rollback later
119  setEventMessages($objecttmp->error, $objecttmp->errors, 'errors');
120  $error++;
121  break;
122  } else {
123  $nbok++;
124  }
125  } else {
126  setEventMessages($objecttmp->error, $objecttmp->errors, 'errors');
127  $error++;
128  break;
129  }
130  }
131  if (empty($error)) {
132  // Message for elements well deleted
133  if ($nbok > 1) {
134  setEventMessages($langs->trans("RecordsDeleted", $nbok), null, 'mesgs');
135  } elseif ($nbok > 0) {
136  setEventMessages($langs->trans("RecordDeleted", $nbok), null, 'mesgs');
137  } else {
138  setEventMessages($langs->trans("NoRecordDeleted"), null, 'mesgs');
139  }
140 
141  // Message for elements which can't be deleted
142  if (!empty($TMsg)) {
143  sort($TMsg);
144  setEventMessages('', array_unique($TMsg), 'warnings');
145  }
146 
147  $db->commit();
148  } else {
149  $db->rollback();
150  }
151  $massaction = '';
152 }
153 $objectclass = 'BonPrelevement';
154 $objectlabel = 'BonPrelevement';
155 $uploaddir = $conf->prelevement->dir_output;
156 include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php';
157 
158 /*
159  * View
160  */
161 
162 $directdebitorder = new BonPrelevement($db);
163 
164 $titlekey = "WithdrawalsReceipts";
165 $title = $langs->trans("WithdrawalsReceipts");
166 if ($type == 'bank-transfer') {
167  $titlekey = "BankTransferReceipts";
168  $title = $langs->trans("BankTransferReceipts");
169 }
170 $help_url = '';
171 
172 
173 $sql = "SELECT p.rowid, p.ref, p.amount, p.statut, p.datec";
174 
175 $sqlfields = $sql; // $sql fields to remove for count total
176 
177 $sql .= " FROM ".MAIN_DB_PREFIX."prelevement_bons as p";
178 $sql .= " WHERE p.entity IN (".getEntity('invoice').")";
179 if ($type == 'bank-transfer') {
180  $sql .= " AND p.type = 'bank-transfer'";
181 } else {
182  $sql .= " AND p.type = 'debit-order'";
183 }
184 if ($search_ref) {
185  $sql .= natural_search("p.ref", $search_ref);
186 }
187 if ($search_amount) {
188  $sql .= natural_search("p.amount", $search_amount, 1);
189 }
190 
191 // Count total nb of records
192 $nbtotalofrecords = '';
193 if (!getDolGlobalInt('MAIN_DISABLE_FULL_SCANLIST')) {
194  /* The fast and low memory method to get and count full list converts the sql into a sql count */
195  $sqlforcount = preg_replace('/^'.preg_quote($sqlfields, '/').'/', 'SELECT COUNT(*) as nbtotalofrecords', $sql);
196  $sqlforcount = preg_replace('/GROUP BY .*$/', '', $sqlforcount);
197  $resql = $db->query($sqlforcount);
198  if ($resql) {
199  $objforcount = $db->fetch_object($resql);
200  $nbtotalofrecords = $objforcount->nbtotalofrecords;
201  } else {
202  dol_print_error($db);
203  }
204 
205  if (($page * $limit) > $nbtotalofrecords) { // if total resultset is smaller than the paging size (filtering), goto and load page 0
206  $page = 0;
207  $offset = 0;
208  }
209  $db->free($resql);
210 }
211 
212 // Complete request and execute it with limit
213 $sql .= $db->order($sortfield, $sortorder);
214 if ($limit) {
215  $sql .= $db->plimit($limit + 1, $offset);
216 }
217 
218 $resql = $db->query($sql);
219 if (!$resql) {
220  dol_print_error($db);
221  exit;
222 }
223 
224 $num = $db->num_rows($resql);
225 
226 // Output page
227 // --------------------------------------------------------------------
228 
229 llxHeader('', $title, $help_url);
230 
231 $arrayofselected = is_array($toselect) ? $toselect : array();
232 $param = '';
233 $param .= "&statut=".urlencode($statut);
234 if ($type == 'bank-transfer') {
235  $param .= '&type=bank-transfer';
236 }
237 if (!empty($mode)) {
238  $param .= '&mode='.urlencode($mode);
239 }
240 if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) {
241  $param .= '&contextpage='.urlencode($contextpage);
242 }
243 if ($limit > 0 && $limit != $conf->liste_limit) {
244  $param .= '&limit='.((int) $limit);
245 }
246 if ($optioncss != '') {
247  $param .= '&optioncss='.urlencode($optioncss);
248 }
249 
250 $arrayofmassactions = array(
251  //'presend'=>img_picto('', 'email', 'class="pictofixedwidth"').$langs->trans("SendByMail"),
252  //'builddoc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("PDFMerge"),
253 );
254 if (!empty($permissiontodelete)) {
255  $arrayofmassactions['predeletedraft'] = img_picto('', 'delete', 'class="pictofixedwidth"').$langs->trans("Delete");
256 }
257 $massactionbutton = $form->selectMassAction('', $arrayofmassactions);
258 
259 print '<form method="POST" id="searchFormList" action="'.$_SERVER["PHP_SELF"].'">'."\n";
260 print '<input type="hidden" name="token" value="'.newToken().'">';
261 if ($optioncss != '') {
262  print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
263 }
264 print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
265 print '<input type="hidden" name="action" value="list">';
266 print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
267 print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
268 print '<input type="hidden" name="page" value="'.$page.'">';
269 print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
270 print '<input type="hidden" name="page_y" value="">';
271 print '<input type="hidden" name="mode" value="'.$mode.'">';
272 
273 if ($type != '') {
274  print '<input type="hidden" name="type" value="'.$type.'">';
275 }
276 
277 $newcardbutton = '';
278 $newcardbutton .= dolGetButtonTitle($langs->trans('ViewList'), '', 'fa fa-bars imgforviewmode', $_SERVER["PHP_SELF"].'?mode=common'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ((empty($mode) || $mode == 'common') ? 2 : 1), array('morecss'=>'reposition'));
279 $newcardbutton .= dolGetButtonTitle($langs->trans('ViewKanban'), '', 'fa fa-th-list imgforviewmode', $_SERVER["PHP_SELF"].'?mode=kanban'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ($mode == 'kanban' ? 2 : 1), array('morecss'=>'reposition'));
280 if ($usercancreate) {
281  $newcardbutton .= dolGetButtonTitle($langs->trans('NewStandingOrder'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/compta/prelevement/create.php?type='.urlencode($type));
282 }
283 
284 print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'generic', 0, $newcardbutton, '', $limit, 0, 0, 1);
285 
286 include DOL_DOCUMENT_ROOT.'/core/tpl/massactions_pre.tpl.php';
287 
288 
289 $moreforfilter = '';
290 /*$moreforfilter.='<div class="divsearchfield">';
291  $moreforfilter.= $langs->trans('MyFilter') . ': <input type="text" name="search_myfield" value="'.dol_escape_htmltag($search_myfield).'">';
292  $moreforfilter.= '</div>';*/
293 
294 $parameters = array();
295 $reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
296 if (empty($reshook)) {
297  $moreforfilter .= $hookmanager->resPrint;
298 } else {
299  $moreforfilter = $hookmanager->resPrint;
300 }
301 
302 if (!empty($moreforfilter)) {
303  print '<div class="liste_titre liste_titre_bydiv centpercent">';
304  print $moreforfilter;
305  $parameters = array();
306  $reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
307  print $hookmanager->resPrint;
308  print '</div>';
309 }
310 
311 $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage;
312 $selectedfields = ($mode != 'kanban' ? $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN', '')) : ''); // This also change content of $arrayfields
313 $selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : '');
314 
315 print '<div class="div-table-responsive">'; // You can use div-table-responsive-no-min if you dont need reserved height for your table
316 print '<table class="tagtable nobottomiftotal liste'.($moreforfilter ? " listwithfilterbefore" : "").'">'."\n";
317 
318 // Fields title search
319 // --------------------------------------------------------------------
320 print '<tr class="liste_titre_filter">';
321 // Action column
322 if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
323  print '<td class="liste_titre center maxwidthsearch">';
324  $searchpicto = $form->showFilterButtons('left');
325  print $searchpicto;
326  print '</td>';
327 }
328 print '<td class="liste_titre"><input type="text" class="flat maxwidth100" name="search_ref" value="'.dol_escape_htmltag($search_ref).'"></td>';
329 print '<td class="liste_titre">&nbsp;</td>';
330 print '<td class="liste_titre right"><input type="text" class="flat maxwidth100" name="search_amount" value="'.dol_escape_htmltag($search_amount).'"></td>';
331 print '<td class="liste_titre">&nbsp;</td>';
332 // Action column
333 if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
334  print '<td class="liste_titre center maxwidthsearch">';
335  $searchpicto = $form->showFilterButtons();
336  print $searchpicto;
337  print '</td>';
338 }
339 print '</tr>'."\n";
340 
341 $totalarray = array();
342 $totalarray['nbfield'] = 0;
343 
344 // Fields title label
345 // --------------------------------------------------------------------
346 print '<tr class="liste_titre">';
347 // Action column
348 if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
349  print getTitleFieldOfList($selectedfields, 0, $_SERVER["PHP_SELF"], '', '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ')."\n";
350  $totalarray['nbfield']++;
351 }
352 print_liste_field_titre($titlekey, $_SERVER["PHP_SELF"], "p.ref", '', $param, '', $sortfield, $sortorder);
353 $totalarray['nbfield']++;
354 print_liste_field_titre("Date", $_SERVER["PHP_SELF"], "p.datec", "", $param, '', $sortfield, $sortorder, 'center ');
355 $totalarray['nbfield']++;
356 print_liste_field_titre("Amount", $_SERVER["PHP_SELF"], "p.amount", "", $param, '', $sortfield, $sortorder, 'right ');
357 $totalarray['nbfield']++;
358 print_liste_field_titre("Status", $_SERVER["PHP_SELF"], "", "", $param, '', $sortfield, $sortorder, 'right ');
359 $totalarray['nbfield']++;
360 // Action column
361 if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
362  print getTitleFieldOfList($selectedfields, 0, $_SERVER["PHP_SELF"], '', '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ')."\n";
363  $totalarray['nbfield']++;
364 }
365 print '</tr>'."\n";
366 
367 // Loop on record
368 // --------------------------------------------------------------------
369 
370 $i = 0;
371 $savnbfield = $totalarray['nbfield'];
372 $totalarray = array();
373 $totalarray['nbfield'] = 0;
374 
375 $imaxinloop = ($limit ? min($num, $limit) : $num);
376 while ($i < $imaxinloop) {
377  $obj = $db->fetch_object($resql);
378 
379  $directdebitorder->id = $obj->rowid;
380  $directdebitorder->ref = $obj->ref;
381  $directdebitorder->date_echeance = $obj->datec;
382  $directdebitorder->total = $obj->amount;
383  $directdebitorder->statut = $obj->statut;
384 
385  $object = $directdebitorder;
386 
387  if ($mode == 'kanban') {
388  if ($i == 0) {
389  print '<tr class="trkanban"><td colspan="'.$savnbfield.'">';
390  print '<div class="box-flex-container kanban">';
391  }
392  // Output Kanban
393  if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
394  $selected = 0;
395  if (in_array($object->id, $arrayofselected)) {
396  $selected = 1;
397  }
398  }
399  print $directdebitorder->getKanbanView('', array('selected' => in_array($obj->id, $arrayofselected)));
400  if ($i == ($imaxinloop - 1)) {
401  print '</div>';
402  print '</td></tr>';
403  }
404  } else {
405  // Show line of result
406  $j = 0;
407  print '<tr data-rowid="'.$object->id.'" class="oddeven">';
408 
409  // Action column
410  if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
411  print '<td class="nowrap center">';
412  if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
413  $selected = 0;
414  if (in_array($object->id, $arrayofselected)) {
415  $selected = 1;
416  }
417  print '<input id="cb'.$object->id.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$object->id.'"'.($selected ? ' checked="checked"' : '').'>';
418  }
419  print '</td>';
420  if (!$i) {
421  $totalarray['nbfield']++;
422  }
423  }
424 
425  print '<td>';
426  print $directdebitorder->getNomUrl(1);
427  print "</td>\n";
428 
429  print '<td class="center">'.dol_print_date($db->jdate($obj->datec), 'day')."</td>\n";
430 
431  print '<td class="right"><span class="amount">'.price($obj->amount)."</span></td>\n";
432 
433  print '<td class="right">';
434  print $bon->LibStatut($obj->statut, 5);
435  print '</td>';
436 
437  // Action column
438  if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
439  print '<td class="nowrap center">';
440  if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
441  $selected = 0;
442  if (in_array($object->id, $arrayofselected)) {
443  $selected = 1;
444  }
445  print '<input id="cb'.$object->id.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$object->id.'"'.($selected ? ' checked="checked"' : '').'>';
446  }
447  print '</td>';
448  if (!$i) {
449  $totalarray['nbfield']++;
450  }
451  }
452 
453  print '</tr>'."\n";
454  }
455  $i++;
456 }
457 
458 if ($num == 0) {
459  print '<tr><td colspan="5"><span class="opacitymedium">'.$langs->trans("None").'</span></td></tr>';
460 }
461 
462 $db->free($result);
463 
464 $parameters = array('arrayfields' => $arrayfields, 'sql' => $sql);
465 $reshook = $hookmanager->executeHooks('printFieldListFooter', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
466 print $hookmanager->resPrint;
467 
468 print '</table>'."\n";
469 print '</div>'."\n";
470 
471 print '</form>'."\n";
472 
473 
474 // End of page
475 llxFooter();
476 $db->close();
if(GETPOST('button_removefilter_x', 'alpha')||GETPOST('button_removefilter.x', 'alpha')||GETPOST('button_removefilter', 'alpha')) if(GETPOST('button_search_x', 'alpha')||GETPOST('button_search.x', 'alpha')||GETPOST('button_search', 'alpha')) if($action=="save" &&empty($cancel)) $help_url
View.
Definition: agenda.php:118
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 withdrawal receipts.
if(isModEnabled('facture') && $user->hasRight('facture', 'lire')) if((isModEnabled('fournisseur') &&empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) && $user->hasRight("fournisseur", "facture", "lire"))||(isModEnabled('supplier_invoice') && $user->hasRight("supplier_invoice", "lire"))) if(isModEnabled('don') && $user->hasRight('don', 'lire')) if(isModEnabled('tax') &&!empty($user->rights->tax->charges->lire)) if(isModEnabled('facture') &&isModEnabled('commande') && $user->hasRight("commande", "lire") &&empty($conf->global->WORKFLOW_DISABLE_CREATE_INVOICE_FROM_ORDER)) $sql
Social contributions to pay.
Definition: index.php:746
if($cancel &&! $id) if($action=='add' &&! $cancel) if($action=='delete') if($id) $form
Actions.
Definition: card.php:143
dol_print_error($db='', $error='', $errors=null)
Displays error message system with all the information to facilitate the diagnosis and the escalation...
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...
getDolGlobalInt($key, $default=0)
Return dolibarr global constant int value.
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.
getTitleFieldOfList($name, $thead=0, $file="", $field="", $begin="", $moreparam="", $moreattrib="", $sortfield="", $sortorder="", $prefix="", $disablesortlink=0, $tooltip='', $forcenowrapcolumntitle=0)
Get title line of an array.
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='', $noduplicate=0)
Set event messages in dol_events session object.
print_barre_liste($titre, $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.
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 dolibarr global constant string value.
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.