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