37require
'../../main.inc.php';
38require_once DOL_DOCUMENT_ROOT.
'/expensereport/class/paymentexpensereport.class.php';
39require_once DOL_DOCUMENT_ROOT.
'/compta/bank/class/account.class.php';
40require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formother.class.php';
41require_once DOL_DOCUMENT_ROOT.
'/core/lib/date.lib.php';
42require_once DOL_DOCUMENT_ROOT.
'/accountancy/class/accountingjournal.class.php';
45$langs->loadLangs(array(
'expensereports',
'bills',
'banks',
'compta'));
47$action =
GETPOST(
'action',
'alpha');
48$massaction =
GETPOST(
'massaction',
'alpha');
49$optioncss =
GETPOST(
'optioncss',
'alpha');
50$contextpage =
GETPOST(
'contextpage',
'aZ') ?
GETPOST(
'contextpage',
'aZ') :
'vendorpaymentlist';
51$mode =
GETPOST(
'mode',
'alpha');
53$socid =
GETPOST(
'socid',
'int');
57 $socid = $user->socid;
60$search_ref =
GETPOST(
'search_ref',
'alpha');
61$search_date_startday =
GETPOST(
'search_date_startday',
'int');
62$search_date_startmonth =
GETPOST(
'search_date_startmonth',
'int');
63$search_date_startyear =
GETPOST(
'search_date_startyear',
'int');
64$search_date_endday =
GETPOST(
'search_date_endday',
'int');
65$search_date_endmonth =
GETPOST(
'search_date_endmonth',
'int');
66$search_date_endyear =
GETPOST(
'search_date_endyear',
'int');
67$search_date_start =
dol_mktime(0, 0, 0, $search_date_startmonth, $search_date_startday, $search_date_startyear);
68$search_date_end =
dol_mktime(23, 59, 59, $search_date_endmonth, $search_date_endday, $search_date_endyear);
69$search_user =
GETPOST(
'search_user',
'alpha');
70$search_payment_type =
GETPOST(
'search_payment_type');
71$search_cheque_num =
GETPOST(
'search_cheque_num',
'alpha');
72$search_bank_account =
GETPOST(
'search_bank_account',
'int');
73$search_amount =
GETPOST(
'search_amount',
'alpha');
75$limit =
GETPOST(
'limit',
'int') ?
GETPOST(
'limit',
'int') : $conf->liste_limit;
76$sortfield =
GETPOST(
'sortfield',
'aZ09comma');
77$sortorder =
GETPOST(
'sortorder',
'aZ09comma');
78$page = GETPOSTISSET(
'pageplusone') ? (
GETPOST(
'pageplusone') - 1) :
GETPOST(
'page',
'int');
80if (empty($page) || $page == -1) {
83$offset = $limit * $page;
91 $sortfield =
"pndf.datep";
94$search_all = trim(GETPOSTISSET(
"search_all") ?
GETPOST(
"search_all",
'alpha') :
GETPOST(
'sall'));
97$fieldstosearchall = array(
98 'pndf.rowid'=>
"RefPayment",
100 'pndf.num_payment'=>
"Numero",
101 'pndf.amount'=>
"Amount",
105 'pndf.rowid' =>array(
'label'=>
"RefPayment",
'checked'=>1,
'position'=>10),
106 'pndf.datep' =>array(
'label'=>
"Date",
'checked'=>1,
'position'=>20),
107 'u.login' =>array(
'label'=>
"User",
'checked'=>1,
'position'=>30),
108 'c.libelle' =>array(
'label'=>
"Type",
'checked'=>1,
'position'=>40),
109 'pndf.num_payment' =>array(
'label'=>
"Numero",
'checked'=>1,
'position'=>50,
'tooltip'=>
"ChequeOrTransferNumber"),
110 'ba.label' =>array(
'label'=>
"Account",
'checked'=>1,
'position'=>60,
'enable'=>(isModEnabled(
"banque"))),
111 'pndf.amount' =>array(
'label'=>
"Amount",
'checked'=>1,
'position'=>70),
116$hookmanager->initHooks(array(
'paymentexpensereportlist'));
121 $socid = $user->socid;
130if (!$user->hasRight(
'expensereport',
'lire')) {
139$childids = $user->getAllChildIds(1);
141$parameters = array(
'socid'=>$socid);
142$reshook = $hookmanager->executeHooks(
'doActions', $parameters, $object, $action);
147if (empty($reshook)) {
148 include DOL_DOCUMENT_ROOT.
'/core/actions_changeselectedfields.inc.php';
150 if (
GETPOST(
'button_removefilter_x',
'alpha') ||
GETPOST(
'button_removefilter.x',
'alpha') ||
GETPOST(
'button_removefilter',
'alpha')) {
152 $search_date_startday =
'';
153 $search_date_startmonth =
'';
154 $search_date_startyear =
'';
155 $search_date_endday =
'';
156 $search_date_endmonth =
'';
157 $search_date_endyear =
'';
158 $search_date_start =
'';
159 $search_date_end =
'';
161 $search_payment_type =
'';
162 $search_cheque_num =
'';
163 $search_bank_account =
'';
172llxHeader(
'', $langs->trans(
'ListPayment'));
174$form =
new Form($db);
176$accountstatic =
new Account($db);
177$userstatic =
new User($db);
180$sql =
'SELECT pndf.rowid, pndf.rowid as ref, pndf.datep, pndf.amount as pamount, pndf.num_payment';
181$sql .=
', u.rowid as userid, u.login, u.lastname, u.firstname';
182$sql .=
', c.code as paiement_type, c.libelle as paiement_libelle';
183$sql .=
', ba.rowid as bid, ba.ref as bref, ba.label as blabel, ba.number, ba.account_number as account_number, ba.iban_prefix, ba.bic, ba.currency_code, ba.fk_accountancy_journal as accountancy_journal';
184$sql .=
', SUM(pndf.amount)';
185$sql .=
' FROM '.MAIN_DB_PREFIX.
'payment_expensereport AS pndf';
186$sql .=
' LEFT JOIN '.MAIN_DB_PREFIX.
'expensereport AS ndf ON ndf.rowid=pndf.fk_expensereport';
187$sql .=
' LEFT JOIN '.MAIN_DB_PREFIX.
'c_paiement AS c ON pndf.fk_typepayment = c.id';
188$sql .=
' LEFT JOIN '.MAIN_DB_PREFIX.
'user AS u ON u.rowid = ndf.fk_user_author';
189$sql .=
' LEFT JOIN '.MAIN_DB_PREFIX.
'bank as b ON pndf.fk_bank = b.rowid';
190$sql .=
' LEFT JOIN '.MAIN_DB_PREFIX.
'bank_account as ba ON b.fk_account = ba.rowid';
191$sql .=
' WHERE ndf.entity IN ('.getEntity(
"expensereport").
')';
194if (!$user->hasRight(
'expensereport',
'readall') && !$user->hasRight(
'expensereport',
'lire_tous')
195 && (!
getDolGlobalString(
'MAIN_USE_ADVANCED_PERMS') || !$user->hasRight(
'expensereport',
'writeall_advance'))) {
196 $sql .=
" AND ndf.fk_user_author IN (".$db->sanitize(join(
',', $childids)).
")\n";
202if ($search_date_start) {
203 $sql .=
" AND pndf.datep >= '" . $db->idate($search_date_start) .
"'";
205if ($search_date_end) {
206 $sql .=
" AND pndf.datep <= '" . $db->idate($search_date_end) .
"'";
210 $sql .=
natural_search(array(
'u.login',
'u.lastname',
'u.firstname'), $search_user);
212if ($search_payment_type !=
'') {
213 $sql .=
" AND c.code='".$db->escape($search_payment_type).
"'";
215if ($search_cheque_num !=
'') {
221if ($search_bank_account > 0) {
222 $sql .=
' AND b.fk_account = '.((int) $search_bank_account);
225 $sql .=
natural_search(array_keys($fieldstosearchall), $search_all);
229include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_search_sql.tpl.php';
231$sql .=
' GROUP BY pndf.rowid, pndf.datep, pndf.amount, pndf.num_payment, u.rowid, u.login, u.lastname, u.firstname, c.code, c.libelle,';
232$sql .=
' ba.rowid, ba.ref, ba.label, ba.number, ba.account_number, ba.iban_prefix, ba.bic, ba.currency_code, ba.fk_accountancy_journal';
234$sql .= $db->order($sortfield, $sortorder);
236$nbtotalofrecords =
'';
238 $result = $db->query($sql);
239 $nbtotalofrecords = $db->num_rows($result);
240 if (($page * $limit) > $nbtotalofrecords) {
246$sql .= $db->plimit($limit + 1, $offset);
248$resql = $db->query($sql);
256$num = $db->num_rows($resql);
261 $param .=
'&mode='.urlencode($mode);
263if (!empty($contextpage) && $contextpage != $_SERVER[
'PHP_SELF']) {
264 $param .=
'&contextpage='.urlencode($contextpage);
266if ($limit > 0 && $limit != $conf->liste_limit) {
267 $param .=
'&limit='.((int) $limit);
269if ($optioncss !=
'') {
270 $param .=
'&optioncss='.urlencode($optioncss);
274 $param .=
'&search_ref='.urlencode($search_ref);
276if ($search_date_startday) {
277 $param .=
'&search_date_startday='.urlencode($search_date_startday);
279if ($search_date_startmonth) {
280 $param .=
'&search_date_startmonth='.urlencode($search_date_startmonth);
282if ($search_date_startyear) {
283 $param .=
'&search_date_startyear='.urlencode($search_date_startyear);
285if ($search_date_endday) {
286 $param .=
'&search_date_endday='.urlencode($search_date_endday);
288if ($search_date_endmonth) {
289 $param .=
'&search_date_endmonth='.urlencode($search_date_endmonth);
291if ($search_date_endyear) {
292 $param .=
'&search_date_endyear='.urlencode($search_date_endyear);
295 $param .=
'&search_user='.urlencode($search_user);
297if ($search_payment_type) {
298 $param .=
'&search_payment_type='.urlencode($search_payment_type);
300if ($search_cheque_num) {
301 $param .=
'&search_cheque_num='.urlencode($search_cheque_num);
304 $param .=
'&search_amount='.urlencode($search_amount);
307if ($search_bank_account) {
308 $param .=
'&search_bank_account='.urlencode($search_bank_account);
312include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_search_param.tpl.php';
314print
'<form method="POST" action="'.$_SERVER[
"PHP_SELF"].
'">';
315if ($optioncss !=
'') {
316 print
'<input type="hidden" name="optioncss" value="'.$optioncss.
'">';
318print
'<input type="hidden" name="token" value="'.newToken().
'">';
319print
'<input type="hidden" name="action" value="list">';
320print
'<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
321print
'<input type="hidden" name="sortfield" value="'.$sortfield.
'">';
322print
'<input type="hidden" name="sortorder" value="'.$sortorder.
'">';
323print
'<input type="hidden" name="contextpage" value="'.$contextpage.
'">';
324print
'<input type="hidden" name="mode" value="'.$mode.
'">';
327$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'));
328$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'));
330print_barre_liste($langs->trans(
'ExpenseReportPayments'), $page, $_SERVER[
'PHP_SELF'], $param, $sortfield, $sortorder,
'', $num, $nbtotalofrecords,
'expensereport', 0, $newcardbutton,
'', $limit, 0, 0, 1);
333 foreach ($fieldstosearchall as $key => $val) {
334 $fieldstosearchall[$key] = $langs->trans($val);
336 print
'<div class="divsearchfieldfilter">'.$langs->trans(
"FilterOnInto", $search_all).join(
', ', $fieldstosearchall).
'</div>';
341$parameters = array();
342$reshook = $hookmanager->executeHooks(
'printFieldPreListTitle', $parameters);
343if (empty($reshook)) {
344 $moreforfilter .= $hookmanager->resPrint;
346 $moreforfilter = $hookmanager->resPrint;
350 print
'<div class="liste_titre liste_titre_bydiv centpercent">';
351 print $moreforfilter;
355$arrayofmassactions = array();
357$varpage = empty($contextpage) ? $_SERVER[
"PHP_SELF"] : $contextpage;
358$selectedfields = ($mode !=
'kanban' ? $form->multiSelectArrayWithCheckbox(
'selectedfields', $arrayfields, $varpage,
getDolGlobalString(
'MAIN_CHECKBOX_LEFT_COLUMN',
'')) :
'');
359$selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons(
'checkforselect', 1) :
'');
361print
'<div class="div-table-responsive">';
362print
'<table class="tagtable nobottomiftotal liste'.($moreforfilter ?
" listwithfilterbefore" :
'').
'">';
364print
'<tr class="liste_titre_filter">';
368 print
'<td class="liste_titre maxwidthsearch">';
369 print $form->showFilterAndCheckAddButtons(0);
374if (!empty($arrayfields[
'pndf.rowid'][
'checked'])) {
375 print
'<td class="liste_titre left">';
376 print
'<input class="flat" type="text" size="4" name="search_ref" value="'.dol_escape_htmltag($search_ref).
'">';
381if (!empty($arrayfields[
'pndf.datep'][
'checked'])) {
382 print
'<td class="liste_titre center">';
383 print
'<div class="nowrapfordate">';
384 print $form->selectDate($search_date_start ? $search_date_start : -1,
'search_date_start', 0, 0, 1,
'', 1, 0, 0,
'',
'',
'',
'', 1,
'', $langs->trans(
'From'));
386 print
'<div class="nowrapfordate">';
387 print $form->selectDate($search_date_end ? $search_date_end : -1,
'search_date_end', 0, 0, 1,
'', 1, 0, 0,
'',
'',
'',
'', 1,
'', $langs->trans(
'to'));
393if (!empty($arrayfields[
'u.login'][
'checked'])) {
394 print
'<td class="liste_titre">';
395 print
'<input class="flat" type="text" size="6" name="search_user" value="'.dol_escape_htmltag($search_user).
'">';
400if (!empty($arrayfields[
'c.libelle'][
'checked'])) {
401 print
'<td class="liste_titre">';
402 $form->select_types_paiements($search_payment_type,
'search_payment_type',
'', 2, 1, 1);
407if (!empty($arrayfields[
'pndf.num_payment'][
'checked'])) {
408 print
'<td class="liste_titre">';
409 print
'<input class="flat" type="text" size="4" name="search_cheque_num" value="'.dol_escape_htmltag($search_cheque_num).
'">';
414if (!empty($arrayfields[
'ba.label'][
'checked'])) {
415 print
'<td class="liste_titre">';
416 $form->select_comptes($search_bank_account,
'search_bank_account', 0,
'', 1);
421if (!empty($arrayfields[
'pndf.amount'][
'checked'])) {
422 print
'<td class="liste_titre right">';
423 print
'<input class="flat" type="text" size="4" name="search_amount" value="'.dol_escape_htmltag($search_amount).
'">';
428$parameters = array(
'arrayfields'=>$arrayfields);
429$reshook = $hookmanager->executeHooks(
'printFieldListOption', $parameters);
430print $hookmanager->resPrint;
434 print
'<td class="liste_titre maxwidthsearch">';
435 print $form->showFilterAndCheckAddButtons(0);
441$totalarray = array();
442$totalarray[
'nbfield'] = 0;
444print
'<tr class="liste_titre">';
447 print_liste_field_titre($selectedfields, $_SERVER[
'PHP_SELF'],
'',
'',
'',
'align="center"', $sortfield, $sortorder,
'maxwidthsearch ');
448 $totalarray[
'nbfield']++;
452 $totalarray[
'nbfield']++;
454if (!empty($arrayfields[
'pndf.rowid'][
'checked'])) {
455 print_liste_field_titre($arrayfields[
'pndf.rowid'][
'label'], $_SERVER[
"PHP_SELF"],
'pndf.rowid',
'', $param,
'', $sortfield, $sortorder);
456 $totalarray[
'nbfield']++;
458if (!empty($arrayfields[
'pndf.datep'][
'checked'])) {
459 print_liste_field_titre($arrayfields[
'pndf.datep'][
'label'], $_SERVER[
"PHP_SELF"],
'pndf.datep',
'', $param,
'', $sortfield, $sortorder,
'center ');
460 $totalarray[
'nbfield']++;
462if (!empty($arrayfields[
'u.login'][
'checked'])) {
463 print_liste_field_titre($arrayfields[
'u.login'][
'label'], $_SERVER[
"PHP_SELF"],
'u.lastname',
'', $param,
'', $sortfield, $sortorder);
464 $totalarray[
'nbfield']++;
466if (!empty($arrayfields[
'c.libelle'][
'checked'])) {
467 print_liste_field_titre($arrayfields[
'c.libelle'][
'label'], $_SERVER[
"PHP_SELF"],
'c.libelle',
'', $param,
'', $sortfield, $sortorder);
468 $totalarray[
'nbfield']++;
470if (!empty($arrayfields[
'pndf.num_payment'][
'checked'])) {
471 print_liste_field_titre($arrayfields[
'pndf.num_payment'][
'label'], $_SERVER[
"PHP_SELF"],
"pndf.num_payment",
'', $param,
'', $sortfield, $sortorder,
'', $arrayfields[
'pndf.num_payment'][
'tooltip']);
472 $totalarray[
'nbfield']++;
474if (!empty($arrayfields[
'ba.label'][
'checked'])) {
475 print_liste_field_titre($arrayfields[
'ba.label'][
'label'], $_SERVER[
"PHP_SELF"],
'ba.label',
'', $param,
'', $sortfield, $sortorder);
476 $totalarray[
'nbfield']++;
478if (!empty($arrayfields[
'pndf.amount'][
'checked'])) {
479 print_liste_field_titre($arrayfields[
'pndf.amount'][
'label'], $_SERVER[
"PHP_SELF"],
'pndf.amount',
'', $param,
'', $sortfield, $sortorder,
'right ');
480 $totalarray[
'nbfield']++;
484$parameters = array(
'arrayfields'=>$arrayfields,
'param'=>$param,
'sortfield'=>$sortfield,
'sortorder'=>$sortorder,
'totalarray'=>&$totalarray);
485$reshook = $hookmanager->executeHooks(
'printFieldListTitle', $parameters);
486print $hookmanager->resPrint;
489 print_liste_field_titre($selectedfields, $_SERVER[
'PHP_SELF'],
'',
'',
'',
'align="center"', $sortfield, $sortorder,
'maxwidthsearch ');
490 $totalarray[
'nbfield']++;
495foreach ($arrayfields as $column) {
496 if ($column[
'checked']) {
504$savnbfield = $totalarray[
'nbfield'];
505$totalarray = array();
506$totalarray[
'nbfield'] = 0;
507$imaxinloop = ($limit ? min($num, $limit) : $num);
508while ($i < $imaxinloop) {
509 $objp = $db->fetch_object($resql);
511 $paymentexpensereportstatic->id = $objp->rowid;
512 $paymentexpensereportstatic->ref = $objp->ref;
513 $paymentexpensereportstatic->datep = $db->jdate($objp->datep);
514 $paymentexpensereportstatic->amount = $objp->pamount;
515 $paymentexpensereportstatic->fk_typepayment = $objp->paiement_type;
518 $accountstatic->fetch($objp->bid);
519 $paymentexpensereportstatic->fk_bank = $accountstatic->getNomUrl(1);
521 $paymentexpensereportstatic->fk_bank =
null;
524 $userstatic->id = $objp->userid;
525 $userstatic->lastname = $objp->lastname;
526 $userstatic->firstname = $objp->firstname;
528 if ($mode ==
'kanban') {
530 print
'<tr class="trkanban"><td colspan="'.$savnbfield.
'">';
531 print
'<div class="box-flex-container kanban">';
534 print $paymentexpensereportstatic->getKanbanView(
'', array(
'selected' => in_array($objp->id, $arrayofselected)));
535 if ($i == ($imaxinloop - 1)) {
540 print
'<tr class="oddeven">';
546 $totalarray[
'nbfield']++;
552 print
'<td>'.(($offset * $limit) + $i).
'</td>';
554 $totalarray[
'nbfield']++;
559 if (!empty($arrayfields[
'pndf.rowid'][
'checked'])) {
560 print
'<td class="nowrap">'.$paymentexpensereportstatic->getNomUrl(1).
'</td>';
562 $totalarray[
'nbfield']++;
567 if (!empty($arrayfields[
'pndf.datep'][
'checked'])) {
568 $dateformatforpayment =
'dayhour';
569 print
'<td class="nowrap center">'.dol_print_date($db->jdate($objp->datep), $dateformatforpayment).
'</td>';
571 $totalarray[
'nbfield']++;
576 if (!empty($arrayfields[
'u.login'][
'checked'])) {
578 if ($userstatic->id > 0) {
579 print $userstatic->getNomUrl(1);
583 $totalarray[
'nbfield']++;
588 if (!empty($arrayfields[
'c.libelle'][
'checked'])) {
589 $payment_type = $langs->trans(
"PaymentType".$objp->paiement_type) !=
"PaymentType".$objp->paiement_type ? $langs->trans(
"PaymentType".$objp->paiement_type) : $objp->paiement_libelle;
590 print
'<td>'.$payment_type.
' '.
dol_trunc($objp->num_payment, 32).
'</td>';
592 $totalarray[
'nbfield']++;
597 if (!empty($arrayfields[
'pndf.num_payment'][
'checked'])) {
598 print
'<td>'.$objp->num_payment.
'</td>';
600 $totalarray[
'nbfield']++;
605 if (!empty($arrayfields[
'ba.label'][
'checked'])) {
608 $accountstatic->id = $objp->bid;
609 $accountstatic->ref = $objp->bref;
610 $accountstatic->label = $objp->blabel;
611 $accountstatic->number = $objp->number;
612 $accountstatic->iban = $objp->iban_prefix;
613 $accountstatic->bic = $objp->bic;
614 $accountstatic->currency_code = $objp->currency_code;
615 $accountstatic->account_number = $objp->account_number;
618 $accountingjournal->fetch($objp->accountancy_journal);
619 $accountstatic->accountancy_journal = $accountingjournal->code;
621 print $accountstatic->getNomUrl(1);
627 $totalarray[
'nbfield']++;
632 if (!empty($arrayfields[
'pndf.amount'][
'checked'])) {
633 print
'<td class="right"><span class="amount">'.price($objp->pamount).
'</span></td>';
635 $totalarray[
'nbfield']++;
637 $totalarray[
'pos'][$checkedCount] =
'amount';
638 if (empty($totalarray[
'val'][
'amount'])) {
639 $totalarray[
'val'][
'amount'] = $objp->pamount;
641 $totalarray[
'val'][
'amount'] += $objp->pamount;
649 $totalarray[
'nbfield']++;
659include DOL_DOCUMENT_ROOT.
'/core/tpl/list_print_total.tpl.php';
if(!defined('NOREQUIRESOC')) if(!defined( 'NOREQUIRETRAN')) if(!defined('NOTOKENRENEWAL')) if(!defined( 'NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined( 'NOREQUIREAJAX')) llxHeader()
Empty header.
Class to manage bank accounts.
Class to manage accounting journals.
Class to manage payments of expense report.
Class to manage Dolibarr users.
dol_mktime($hour, $minute, $second, $month, $day, $year, $gm='auto', $check=1)
Return a timestamp date built from detailed informations (by default a local PHP server timestamp) Re...
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 a Dolibarr global constant int value.
dol_sort_array(&$array, $index, $order='asc', $natsort=0, $case_sensitive=0, $keepindex=0)
Advanced sort array by second index function, which produces ascending (default) or descending output...
print_liste_field_titre($name, $file="", $field="", $begin="", $moreparam="", $moreattrib="", $sortfield="", $sortorder="", $prefix="", $tooltip="", $forcenowrapcolumntitle=0)
Show 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.
dol_trunc($string, $size=40, $trunc='right', $stringencoding='UTF-8', $nodot=0, $display=0)
Truncate a string to a particular length adding '…' if string larger than length.
getDolGlobalString($key, $default='')
Return dolibarr global constant string value.
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.