dolibarr 21.0.0-beta
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 * Copyright (C) 2024 Alexandre Spangaro <alexandre@inovea-conseil.com>
7 * Copyright (C) 2024 Frédéric France <frederic.france@free.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
30// Load Dolibarr environment
31require '../../main.inc.php';
32require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/bonprelevement.class.php';
33require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
34
44// Load translation files required by the page
45$langs->loadLangs(array('banks', 'categories', 'withdrawals'));
46
47$action = GETPOST('action', 'aZ09') ? GETPOST('action', 'aZ09') : 'view'; // The action 'add', 'create', 'edit', 'update', 'view', ...
48$massaction = GETPOST('massaction', 'alpha'); // The bulk action (combo box choice into lists)
49$confirm = GETPOST('confirm', 'alpha'); // Result of a confirmation
50$cancel = GETPOST('cancel', 'alpha'); // We click on a Cancel button
51$toselect = GETPOST('toselect', 'array'); // Array of ids of elements selected into a list
52$contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'directdebitcredittransferlist'; // To manage different context of search
53$backtopage = GETPOST('backtopage', 'alpha'); // Go back to a dedicated page
54$optioncss = GETPOST('optioncss', 'alpha');
55$mode = GETPOST('mode', 'alpha');
56
57$type = GETPOST('type', 'aZ09');
58
59// Load variable for pagination
60$limit = GETPOSTINT('limit') ? GETPOSTINT('limit') : $conf->liste_limit;
61$sortfield = GETPOST('sortfield', 'aZ09comma');
62$sortorder = GETPOST('sortorder', 'aZ09comma');
63$page = GETPOSTISSET('pageplusone') ? (GETPOSTINT('pageplusone') - 1) : GETPOSTINT("page");
64if (empty($page) || $page < 0 || GETPOST('button_search', 'alpha') || GETPOST('button_removefilter', 'alpha')) {
65 // If $page is not defined, or '' or -1 or if we click on clear filters
66 $page = 0;
67}
68$offset = $limit * $page;
69$pageprev = $page - 1;
70$pagenext = $page + 1;
71if (!$sortorder) {
72 $sortorder = "DESC";
73}
74if (!$sortfield) {
75 $sortfield = "p.datec";
76}
77
78// Get supervariables
79$statut = GETPOSTINT('statut');
80$search_ref = GETPOST('search_ref', 'alpha');
81$search_amount = GETPOST('search_amount', 'alpha');
82
83$bon = new BonPrelevement($db);
84$hookmanager->initHooks(array('withdrawalsreceiptslist'));
85
86$usercancreate = $user->hasRight('prelevement', 'bons', 'creer');
87$permissiontodelete = $user->hasRight('prelevement', 'creer');
88if ($type == 'bank-transfer') {
89 $usercancreate = $user->hasRight('paymentbybanktransfer', 'create');
90 $permissiontodelete = $user->hasRight('paymentbybanktransfer', 'create');
91}
92
93// Security check
94$socid = GETPOSTINT('socid');
95if ($user->socid) {
96 $socid = $user->socid;
97}
98if ($type == 'bank-transfer') {
99 $result = restrictedArea($user, 'paymentbybanktransfer', '', '', '');
100} else {
101 $result = restrictedArea($user, 'prelevement', '', '', 'bons');
102}
103
104
105/*
106 * Actions
107 */
108$error = 0;
109
110if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x', 'alpha') || GETPOST('button_removefilter', 'alpha')) { // All tests are required to be compatible with all browsers
111 $search_ref = "";
112 $search_amount = "";
113}
114
115// Mass actions
116
117// Delete draft
118if (($massaction == "delete" || ($action == 'delete' && $confirm == 'yes')) && $permissiontodelete) {
119 $TMsg = array();
120 $db->begin();
121 $objecttmp = new BonPrelevement($db);
122 $nbignored = 0;
123 $nbok = 0;
124 foreach ($toselect as $toselectid) {
125 $result = $objecttmp->fetch($toselectid);
126 if ($result > 0) {
127 if ($objecttmp->status != $objecttmp::STATUS_DRAFT || $objecttmp->credite > 0 || $objecttmp->date_creation != null) {
128 $langs->load("errors");
129 $nbignored++;
130 $TMsg[] = '<div class="error">'.$langs->trans('ErrorOnlyDraftStatusCanBeDeletedInMassAction', $objecttmp->ref).'</div><br>';
131 continue;
132 }
133 $result = $objecttmp->delete($user);
134 if ($result < 0) { // if delete returns is < 0, there is an error, we break and rollback later
135 setEventMessages($objecttmp->error, $objecttmp->errors, 'errors');
136 $error++;
137 break;
138 } else {
139 $nbok++;
140 }
141 } else {
142 setEventMessages($objecttmp->error, $objecttmp->errors, 'errors');
143 $error++;
144 break;
145 }
146 }
147 if (empty($error)) {
148 // Message for elements well deleted
149 if ($nbok > 1) {
150 setEventMessages($langs->trans("RecordsDeleted", $nbok), null, 'mesgs');
151 } elseif ($nbok > 0) {
152 setEventMessages($langs->trans("RecordDeleted", $nbok), null, 'mesgs');
153 } else {
154 setEventMessages($langs->trans("NoRecordDeleted"), null, 'mesgs');
155 }
156
157 // Message for elements which can't be deleted
158 if (!empty($TMsg)) {
159 sort($TMsg);
160 setEventMessages('', array_unique($TMsg), 'warnings');
161 }
162
163 $db->commit();
164 } else {
165 $db->rollback();
166 }
167 $massaction = '';
168}
169$objectclass = 'BonPrelevement';
170$objectlabel = 'BonPrelevement';
171if ($type == 'bank-transfer') {
172 $uploaddir = $conf->paymentbybanktransfer->dir_output;
173} else {
174 $uploaddir = $conf->prelevement->dir_output;
175}
176include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php';
177
178/*
179 * View
180 */
181
182$directdebitorder = new BonPrelevement($db);
183
184$titlekey = "WithdrawalsReceipts";
185$title = $langs->trans("WithdrawalsReceipts");
186if ($type == 'bank-transfer') {
187 $titlekey = "BankTransferReceipts";
188 $title = $langs->trans("BankTransferReceipts");
189}
190$help_url = '';
191
192
193$sql = "SELECT p.rowid, p.ref, p.amount, p.statut, p.datec";
194
195$sqlfields = $sql; // $sql fields to remove for count total
196
197$sql .= " FROM ".MAIN_DB_PREFIX."prelevement_bons as p";
198$sql .= " WHERE p.entity IN (".getEntity('invoice').")";
199if ($type == 'bank-transfer') {
200 $sql .= " AND p.type = 'bank-transfer'";
201} else {
202 $sql .= " AND p.type = 'debit-order'";
203}
204if ($search_ref) {
205 $sql .= natural_search("p.ref", $search_ref);
206}
207if ($search_amount) {
208 $sql .= natural_search("p.amount", $search_amount, 1);
209}
210
211// Count total nb of records
212$nbtotalofrecords = '';
213if (!getDolGlobalInt('MAIN_DISABLE_FULL_SCANLIST')) {
214 /* The fast and low memory method to get and count full list converts the sql into a sql count */
215 $sqlforcount = preg_replace('/^'.preg_quote($sqlfields, '/').'/', 'SELECT COUNT(*) as nbtotalofrecords', $sql);
216 $sqlforcount = preg_replace('/GROUP BY .*$/', '', $sqlforcount);
217 $resql = $db->query($sqlforcount);
218 if ($resql) {
219 $objforcount = $db->fetch_object($resql);
220 $nbtotalofrecords = $objforcount->nbtotalofrecords;
221 } else {
222 dol_print_error($db);
223 }
224
225 if (($page * $limit) > $nbtotalofrecords) { // if total resultset is smaller than the paging size (filtering), goto and load page 0
226 $page = 0;
227 $offset = 0;
228 }
229 $db->free($resql);
230}
231
232// Complete request and execute it with limit
233$sql .= $db->order($sortfield, $sortorder);
234if ($limit) {
235 $sql .= $db->plimit($limit + 1, $offset);
236}
237
238$resql = $db->query($sql);
239if (!$resql) {
240 dol_print_error($db);
241 exit;
242}
243
244$num = $db->num_rows($resql);
245
246// Output page
247// --------------------------------------------------------------------
248
249llxHeader('', $title, $help_url, '', 0, 0, '', '', '', 'bodyforlist');
250
251$arrayofselected = is_array($toselect) ? $toselect : array();
252$param = '';
253$param .= "&statut=".urlencode((string) ($statut));
254if ($type == 'bank-transfer') {
255 $param .= '&type=bank-transfer';
256}
257if (!empty($mode)) {
258 $param .= '&mode='.urlencode($mode);
259}
260if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) {
261 $param .= '&contextpage='.urlencode($contextpage);
262}
263if ($limit > 0 && $limit != $conf->liste_limit) {
264 $param .= '&limit='.((int) $limit);
265}
266if ($optioncss != '') {
267 $param .= '&optioncss='.urlencode($optioncss);
268}
269
270$arrayofmassactions = array(
271 //'presend'=>img_picto('', 'email', 'class="pictofixedwidth"').$langs->trans("SendByMail"),
272 //'builddoc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("PDFMerge"),
273);
274if (!empty($permissiontodelete)) {
275 $arrayofmassactions['predeletedraft'] = img_picto('', 'delete', 'class="pictofixedwidth"').$langs->trans("Delete");
276}
277$massactionbutton = $form->selectMassAction('', $arrayofmassactions);
278
279print '<form method="POST" id="searchFormList" action="'.$_SERVER["PHP_SELF"].'">'."\n";
280print '<input type="hidden" name="token" value="'.newToken().'">';
281if ($optioncss != '') {
282 print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
283}
284print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
285print '<input type="hidden" name="action" value="list">';
286print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
287print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
288print '<input type="hidden" name="page" value="'.$page.'">';
289print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
290print '<input type="hidden" name="page_y" value="">';
291print '<input type="hidden" name="mode" value="'.$mode.'">';
292
293if ($type != '') {
294 print '<input type="hidden" name="type" value="'.$type.'">';
295}
296
297$newcardbutton = '';
298$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'));
299$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'));
300if ($usercancreate) {
301 $newcardbutton .= dolGetButtonTitleSeparator();
302 $newcardbutton .= dolGetButtonTitle($langs->trans('NewStandingOrder'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/compta/prelevement/create.php?type='.urlencode($type));
303}
304
305print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'generic', 0, $newcardbutton, '', $limit, 0, 0, 1);
306
307include DOL_DOCUMENT_ROOT.'/core/tpl/massactions_pre.tpl.php';
308
309
310$moreforfilter = '';
311/*$moreforfilter.='<div class="divsearchfield">';
312 $moreforfilter.= $langs->trans('MyFilter') . ': <input type="text" name="search_myfield" value="'.dol_escape_htmltag($search_myfield).'">';
313 $moreforfilter.= '</div>';*/
314
315$parameters = array();
316$reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
317if (empty($reshook)) {
318 $moreforfilter .= $hookmanager->resPrint;
319} else {
320 $moreforfilter = $hookmanager->resPrint;
321}
322
323if (!empty($moreforfilter)) {
324 print '<div class="liste_titre liste_titre_bydiv centpercent">';
325 print $moreforfilter;
326 print '</div>';
327}
328
329$varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage;
330$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // This also change content of $arrayfields with user setup
331$selectedfields = ($mode != 'kanban' ? $htmlofselectarray : '');
332$selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : '');
333
334print '<div class="div-table-responsive">'; // You can use div-table-responsive-no-min if you don't need reserved height for your table
335print '<table class="tagtable nobottomiftotal liste'.($moreforfilter ? " listwithfilterbefore" : "").'">'."\n";
336
337// Fields title search
338// --------------------------------------------------------------------
339print '<tr class="liste_titre_filter">';
340// Action column
341if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
342 print '<td class="liste_titre center maxwidthsearch">';
343 $searchpicto = $form->showFilterButtons('left');
344 print $searchpicto;
345 print '</td>';
346}
347print '<td class="liste_titre"><input type="text" class="flat maxwidth100" name="search_ref" value="'.dol_escape_htmltag($search_ref).'"></td>';
348print '<td class="liste_titre">&nbsp;</td>';
349print '<td class="liste_titre right"><input type="text" class="flat maxwidth100" name="search_amount" value="'.dol_escape_htmltag($search_amount).'"></td>';
350print '<td class="liste_titre">&nbsp;</td>';
351// Action column
352if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
353 print '<td class="liste_titre center maxwidthsearch">';
354 $searchpicto = $form->showFilterButtons();
355 print $searchpicto;
356 print '</td>';
357}
358print '</tr>'."\n";
359
360$totalarray = array();
361$totalarray['nbfield'] = 0;
362
363// Fields title label
364// --------------------------------------------------------------------
365print '<tr class="liste_titre">';
366// Action column
367if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
368 print getTitleFieldOfList($selectedfields, 0, $_SERVER["PHP_SELF"], '', '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ')."\n";
369 $totalarray['nbfield']++;
370}
371print_liste_field_titre($titlekey, $_SERVER["PHP_SELF"], "p.ref", '', $param, '', $sortfield, $sortorder);
372$totalarray['nbfield']++;
373print_liste_field_titre("Date", $_SERVER["PHP_SELF"], "p.datec", "", $param, '', $sortfield, $sortorder, 'center ');
374$totalarray['nbfield']++;
375print_liste_field_titre("Amount", $_SERVER["PHP_SELF"], "p.amount", "", $param, '', $sortfield, $sortorder, 'right ');
376$totalarray['nbfield']++;
377print_liste_field_titre("Status", $_SERVER["PHP_SELF"], "", "", $param, '', $sortfield, $sortorder, 'right ');
378$totalarray['nbfield']++;
379// Action column
380if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
381 print getTitleFieldOfList($selectedfields, 0, $_SERVER["PHP_SELF"], '', '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ')."\n";
382 $totalarray['nbfield']++;
383}
384print '</tr>'."\n";
385
386// Loop on record
387// --------------------------------------------------------------------
388
389$i = 0;
390$savnbfield = $totalarray['nbfield'];
391$totalarray = array();
392$totalarray['nbfield'] = 0;
393
394$imaxinloop = ($limit ? min($num, $limit) : $num);
395while ($i < $imaxinloop) {
396 $obj = $db->fetch_object($resql);
397
398 $directdebitorder->id = $obj->rowid;
399 $directdebitorder->ref = $obj->ref;
400 $directdebitorder->date_echeance = $obj->datec;
401 $directdebitorder->total = $obj->amount;
402 $directdebitorder->statut = $obj->statut;
403
404 $object = $directdebitorder;
405
406 if ($mode == 'kanban') {
407 if ($i == 0) {
408 print '<tr class="trkanban"><td colspan="'.$savnbfield.'">';
409 print '<div class="box-flex-container kanban">';
410 }
411 // Output Kanban
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 }
418 print $directdebitorder->getKanbanView('', array('selected' => in_array($obj->id, $arrayofselected)));
419 if ($i == ($imaxinloop - 1)) {
420 print '</div>';
421 print '</td></tr>';
422 }
423 } else {
424 // Show line of result
425 $j = 0;
426 print '<tr data-rowid="'.$object->id.'" class="oddeven">';
427
428 // Action column
429 if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
430 print '<td class="nowrap center">';
431 if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
432 $selected = 0;
433 if (in_array($object->id, $arrayofselected)) {
434 $selected = 1;
435 }
436 print '<input id="cb'.$object->id.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$object->id.'"'.($selected ? ' checked="checked"' : '').'>';
437 }
438 print '</td>';
439 if (!$i) {
440 $totalarray['nbfield']++;
441 }
442 }
443
444 print '<td>';
445 print $directdebitorder->getNomUrl(1);
446 print "</td>\n";
447
448 print '<td class="center">'.dol_print_date($db->jdate($obj->datec), 'day')."</td>\n";
449
450 print '<td class="right"><span class="amount">'.price($obj->amount)."</span></td>\n";
451
452 print '<td class="right">';
453 print $bon->LibStatut($obj->statut, 5);
454 print '</td>';
455
456 // Action column
457 if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
458 print '<td class="nowrap center">';
459 if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
460 $selected = 0;
461 if (in_array($object->id, $arrayofselected)) {
462 $selected = 1;
463 }
464 print '<input id="cb'.$object->id.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$object->id.'"'.($selected ? ' checked="checked"' : '').'>';
465 }
466 print '</td>';
467 if (!$i) {
468 $totalarray['nbfield']++;
469 }
470 }
471
472 print '</tr>'."\n";
473 }
474 $i++;
475}
476
477if ($num == 0) {
478 print '<tr><td colspan="5"><span class="opacitymedium">'.$langs->trans("None").'</span></td></tr>';
479}
480
481$db->free($resql);
482
483$parameters = array('arrayfields' => $arrayfields, 'sql' => $sql);
484$reshook = $hookmanager->executeHooks('printFieldListFooter', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
485print $hookmanager->resPrint;
486
487print '</table>'."\n";
488print '</div>'."\n";
489
490print '</form>'."\n";
491
492
493// End of page
494llxFooter();
495$db->close();
if( $user->socid > 0) if(! $user->hasRight('accounting', 'chartofaccount')) $object
Definition card.php:66
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:71
Class to manage withdrawal receipts.
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.
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)
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...
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.
dolGetButtonTitleSeparator($moreClass="")
Add space between dolGetButtonTitle.
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.
global $conf
The following vars must be defined: $type2label $form $conf, $lang, The following vars may also be de...
Definition member.php:79
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.