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');
56if ($user->socid) $socid = $user->socid;
58$search_ref =
GETPOST(
'search_ref',
'alpha');
59$search_date_startday =
GETPOST(
'search_date_startday',
'int');
60$search_date_startmonth =
GETPOST(
'search_date_startmonth',
'int');
61$search_date_startyear =
GETPOST(
'search_date_startyear',
'int');
62$search_date_endday =
GETPOST(
'search_date_endday',
'int');
63$search_date_endmonth =
GETPOST(
'search_date_endmonth',
'int');
64$search_date_endyear =
GETPOST(
'search_date_endyear',
'int');
65$search_date_start =
dol_mktime(0, 0, 0, $search_date_startmonth, $search_date_startday, $search_date_startyear);
66$search_date_end =
dol_mktime(23, 59, 59, $search_date_endmonth, $search_date_endday, $search_date_endyear);
67$search_user =
GETPOST(
'search_user',
'alpha');
68$search_payment_type =
GETPOST(
'search_payment_type');
69$search_cheque_num =
GETPOST(
'search_cheque_num',
'alpha');
70$search_bank_account =
GETPOST(
'search_bank_account',
'int');
71$search_amount =
GETPOST(
'search_amount',
'alpha');
73$limit =
GETPOST(
'limit',
'int') ?
GETPOST(
'limit',
'int') : $conf->liste_limit;
74$sortfield =
GETPOST(
'sortfield',
'aZ09comma');
75$sortorder =
GETPOST(
'sortorder',
'aZ09comma');
76$page = GETPOSTISSET(
'pageplusone') ? (
GETPOST(
'pageplusone') - 1) :
GETPOST(
'page',
'int');
78if (empty($page) || $page == -1) {
81$offset = $limit * $page;
89 $sortfield =
"pndf.datep";
92$search_all = trim(GETPOSTISSET(
"search_all") ?
GETPOST(
"search_all",
'alpha') :
GETPOST(
'sall'));
95$fieldstosearchall = array(
96 'pndf.rowid'=>
"RefPayment",
98 'pndf.num_payment'=>
"Numero",
99 'pndf.amount'=>
"Amount",
103 'pndf.rowid' =>array(
'label'=>
"RefPayment",
'checked'=>1,
'position'=>10),
104 'pndf.datep' =>array(
'label'=>
"Date",
'checked'=>1,
'position'=>20),
105 'u.login' =>array(
'label'=>
"User",
'checked'=>1,
'position'=>30),
106 'c.libelle' =>array(
'label'=>
"Type",
'checked'=>1,
'position'=>40),
107 'pndf.num_payment' =>array(
'label'=>
"Numero",
'checked'=>1,
'position'=>50,
'tooltip'=>
"ChequeOrTransferNumber"),
108 'ba.label' =>array(
'label'=>
"Account",
'checked'=>1,
'position'=>60,
'enable'=>(isModEnabled(
"banque"))),
109 'pndf.amount' =>array(
'label'=>
"Amount",
'checked'=>1,
'position'=>70),
114$hookmanager->initHooks(array(
'paymentexpensereportlist'));
119 $socid = $user->socid;
128if (empty($user->rights->expensereport->lire)) {
137$childids = $user->getAllChildIds(1);
139$parameters = array(
'socid'=>$socid);
140$reshook = $hookmanager->executeHooks(
'doActions', $parameters, $object, $action);
145if (empty($reshook)) {
146 include DOL_DOCUMENT_ROOT.
'/core/actions_changeselectedfields.inc.php';
148 if (
GETPOST(
'button_removefilter_x',
'alpha') ||
GETPOST(
'button_removefilter.x',
'alpha') ||
GETPOST(
'button_removefilter',
'alpha')) {
150 $search_date_startday =
'';
151 $search_date_startmonth =
'';
152 $search_date_startyear =
'';
153 $search_date_endday =
'';
154 $search_date_endmonth =
'';
155 $search_date_endyear =
'';
156 $search_date_start =
'';
157 $search_date_end =
'';
159 $search_payment_type =
'';
160 $search_cheque_num =
'';
161 $search_bank_account =
'';
170llxHeader(
'', $langs->trans(
'ListPayment'));
172$form =
new Form($db);
174$accountstatic =
new Account($db);
175$userstatic =
new User($db);
178$sql =
'SELECT pndf.rowid, pndf.rowid as ref, pndf.datep, pndf.amount as pamount, pndf.num_payment';
179$sql .=
', u.rowid as userid, u.login, u.lastname, u.firstname';
180$sql .=
', c.code as paiement_type, c.libelle as paiement_libelle';
181$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';
182$sql .=
', SUM(pndf.amount)';
183$sql .=
' FROM '.MAIN_DB_PREFIX.
'payment_expensereport AS pndf';
184$sql .=
' LEFT JOIN '.MAIN_DB_PREFIX.
'expensereport AS ndf ON ndf.rowid=pndf.fk_expensereport';
185$sql .=
' LEFT JOIN '.MAIN_DB_PREFIX.
'c_paiement AS c ON pndf.fk_typepayment = c.id';
186$sql .=
' LEFT JOIN '.MAIN_DB_PREFIX.
'user AS u ON u.rowid = ndf.fk_user_author';
187$sql .=
' LEFT JOIN '.MAIN_DB_PREFIX.
'bank as b ON pndf.fk_bank = b.rowid';
188$sql .=
' LEFT JOIN '.MAIN_DB_PREFIX.
'bank_account as ba ON b.fk_account = ba.rowid';
189$sql .=
' WHERE ndf.entity IN ('.getEntity(
"expensereport").
')';
192if (empty($user->rights->expensereport->readall) && empty($user->rights->expensereport->lire_tous)
193 && (empty($conf->global->MAIN_USE_ADVANCED_PERMS) || empty($user->rights->expensereport->writeall_advance))) {
194 $sql .=
" AND ndf.fk_user_author IN (".$db->sanitize(join(
',', $childids)).
")\n";
200if ($search_date_start) {
201 $sql .=
" AND pndf.datep >= '" . $db->idate($search_date_start) .
"'";
203if ($search_date_end) {
204 $sql .=
" AND pndf.datep <= '" . $db->idate($search_date_end) .
"'";
208 $sql .=
natural_search(array(
'u.login',
'u.lastname',
'u.firstname'), $search_user);
210if ($search_payment_type !=
'') {
211 $sql .=
" AND c.code='".$db->escape($search_payment_type).
"'";
213if ($search_cheque_num !=
'') {
219if ($search_bank_account > 0) {
220 $sql .=
' AND b.fk_account = '.((int) $search_bank_account);
223 $sql .=
natural_search(array_keys($fieldstosearchall), $search_all);
227include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_search_sql.tpl.php';
229$sql .=
' GROUP BY pndf.rowid, pndf.datep, pndf.amount, pndf.num_payment, u.rowid, u.login, u.lastname, u.firstname, c.code, c.libelle,';
230$sql .=
' ba.rowid, ba.ref, ba.label, ba.number, ba.account_number, ba.iban_prefix, ba.bic, ba.currency_code, ba.fk_accountancy_journal';
232$sql .= $db->order($sortfield, $sortorder);
234$nbtotalofrecords =
'';
236 $result = $db->query($sql);
237 $nbtotalofrecords = $db->num_rows($result);
238 if (($page * $limit) > $nbtotalofrecords) {
244$sql .= $db->plimit($limit + 1, $offset);
246$resql = $db->query($sql);
254$num = $db->num_rows($resql);
259 $param .=
'&mode='.urlencode($mode);
261if (!empty($contextpage) && $contextpage != $_SERVER[
'PHP_SELF']) {
262 $param .=
'&contextpage='.urlencode($contextpage);
264if ($limit > 0 && $limit != $conf->liste_limit) {
265 $param .=
'&limit='.((int) $limit);
267if ($optioncss !=
'') {
268 $param .=
'&optioncss='.urlencode($optioncss);
272 $param .=
'&search_ref='.urlencode($search_ref);
274if ($search_date_startday) {
275 $param .=
'&search_date_startday='.urlencode($search_date_startday);
277if ($search_date_startmonth) {
278 $param .=
'&search_date_startmonth='.urlencode($search_date_startmonth);
280if ($search_date_startyear) {
281 $param .=
'&search_date_startyear='.urlencode($search_date_startyear);
283if ($search_date_endday) {
284 $param .=
'&search_date_endday='.urlencode($search_date_endday);
286if ($search_date_endmonth) {
287 $param .=
'&search_date_endmonth='.urlencode($search_date_endmonth);
289if ($search_date_endyear) {
290 $param .=
'&search_date_endyear='.urlencode($search_date_endyear);
293 $param .=
'&search_user='.urlencode($search_user);
295if ($search_payment_type) {
296 $param .=
'&search_payment_type='.urlencode($search_payment_type);
298if ($search_cheque_num) {
299 $param .=
'&search_cheque_num='.urlencode($search_cheque_num);
302 $param .=
'&search_amount='.urlencode($search_amount);
305if ($search_bank_account) {
306 $param .=
'&search_bank_account='.urlencode($search_bank_account);
310include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_search_param.tpl.php';
312print
'<form method="POST" action="'.$_SERVER[
"PHP_SELF"].
'">';
313if ($optioncss !=
'') {
314 print
'<input type="hidden" name="optioncss" value="'.$optioncss.
'">';
316print
'<input type="hidden" name="token" value="'.newToken().
'">';
317print
'<input type="hidden" name="action" value="list">';
318print
'<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
319print
'<input type="hidden" name="sortfield" value="'.$sortfield.
'">';
320print
'<input type="hidden" name="sortorder" value="'.$sortorder.
'">';
321print
'<input type="hidden" name="contextpage" value="'.$contextpage.
'">';
322print
'<input type="hidden" name="mode" value="'.$mode.
'">';
325$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'));
326$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'));
328print_barre_liste($langs->trans(
'ExpenseReportPayments'), $page, $_SERVER[
'PHP_SELF'], $param, $sortfield, $sortorder,
'', $num, $nbtotalofrecords,
'expensereport', 0, $newcardbutton,
'', $limit, 0, 0, 1);
331 foreach ($fieldstosearchall as $key => $val) {
332 $fieldstosearchall[$key] = $langs->trans($val);
334 print
'<div class="divsearchfieldfilter">'.$langs->trans(
"FilterOnInto", $search_all).join(
', ', $fieldstosearchall).
'</div>';
339$parameters = array();
340$reshook = $hookmanager->executeHooks(
'printFieldPreListTitle', $parameters);
341if (empty($reshook)) {
342 $moreforfilter .= $hookmanager->resPrint;
344 $moreforfilter = $hookmanager->resPrint;
348 print
'<div class="liste_titre liste_titre_bydiv centpercent">';
349 print $moreforfilter;
353$arrayofmassactions = array();
355$varpage = empty($contextpage) ? $_SERVER[
"PHP_SELF"] : $contextpage;
356$selectedfields = ($mode !=
'kanban' ? $form->multiSelectArrayWithCheckbox(
'selectedfields', $arrayfields, $varpage,
getDolGlobalString(
'MAIN_CHECKBOX_LEFT_COLUMN',
'')) :
'');
357$selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons(
'checkforselect', 1) :
'');
359print
'<div class="div-table-responsive">';
360print
'<table class="tagtable nobottomiftotal liste'.($moreforfilter ?
" listwithfilterbefore" :
'').
'">';
362print
'<tr class="liste_titre_filter">';
366 print
'<td class="liste_titre maxwidthsearch">';
367 print $form->showFilterAndCheckAddButtons(0);
372if (!empty($arrayfields[
'pndf.rowid'][
'checked'])) {
373 print
'<td class="liste_titre left">';
374 print
'<input class="flat" type="text" size="4" name="search_ref" value="'.dol_escape_htmltag($search_ref).
'">';
379if (!empty($arrayfields[
'pndf.datep'][
'checked'])) {
380 print
'<td class="liste_titre center">';
381 print
'<div class="nowrap">';
382 print $form->selectDate($search_date_start ? $search_date_start : -1,
'search_date_start', 0, 0, 1,
'', 1, 0, 0,
'',
'',
'',
'', 1,
'', $langs->trans(
'From'));
384 print
'<div class="nowrap">';
385 print $form->selectDate($search_date_end ? $search_date_end : -1,
'search_date_end', 0, 0, 1,
'', 1, 0, 0,
'',
'',
'',
'', 1,
'', $langs->trans(
'to'));
391if (!empty($arrayfields[
'u.login'][
'checked'])) {
392 print
'<td class="liste_titre">';
393 print
'<input class="flat" type="text" size="6" name="search_user" value="'.dol_escape_htmltag($search_user).
'">';
398if (!empty($arrayfields[
'c.libelle'][
'checked'])) {
399 print
'<td class="liste_titre">';
400 $form->select_types_paiements($search_payment_type,
'search_payment_type',
'', 2, 1, 1);
405if (!empty($arrayfields[
'pndf.num_payment'][
'checked'])) {
406 print
'<td class="liste_titre">';
407 print
'<input class="flat" type="text" size="4" name="search_cheque_num" value="'.dol_escape_htmltag($search_cheque_num).
'">';
412if (!empty($arrayfields[
'ba.label'][
'checked'])) {
413 print
'<td class="liste_titre">';
414 $form->select_comptes($search_bank_account,
'search_bank_account', 0,
'', 1);
419if (!empty($arrayfields[
'pndf.amount'][
'checked'])) {
420 print
'<td class="liste_titre right">';
421 print
'<input class="flat" type="text" size="4" name="search_amount" value="'.dol_escape_htmltag($search_amount).
'">';
426$parameters = array(
'arrayfields'=>$arrayfields);
427$reshook = $hookmanager->executeHooks(
'printFieldListOption', $parameters);
428print $hookmanager->resPrint;
432 print
'<td class="liste_titre maxwidthsearch">';
433 print $form->showFilterAndCheckAddButtons(0);
439$totalarray = array();
440$totalarray[
'nbfield'] = 0;
442print
'<tr class="liste_titre">';
445 print_liste_field_titre($selectedfields, $_SERVER[
'PHP_SELF'],
'',
'',
'',
'align="center"', $sortfield, $sortorder,
'maxwidthsearch ');
446 $totalarray[
'nbfield']++;
448if (!empty($conf->global->MAIN_VIEW_LINE_NUMBER_IN_LIST)) {
450 $totalarray[
'nbfield']++;
452if (!empty($arrayfields[
'pndf.rowid'][
'checked'])) {
453 print_liste_field_titre($arrayfields[
'pndf.rowid'][
'label'], $_SERVER[
"PHP_SELF"],
'pndf.rowid',
'', $param,
'', $sortfield, $sortorder);
454 $totalarray[
'nbfield']++;
456if (!empty($arrayfields[
'pndf.datep'][
'checked'])) {
457 print_liste_field_titre($arrayfields[
'pndf.datep'][
'label'], $_SERVER[
"PHP_SELF"],
'pndf.datep',
'', $param,
'', $sortfield, $sortorder,
'center ');
458 $totalarray[
'nbfield']++;
460if (!empty($arrayfields[
'u.login'][
'checked'])) {
461 print_liste_field_titre($arrayfields[
'u.login'][
'label'], $_SERVER[
"PHP_SELF"],
'u.lastname',
'', $param,
'', $sortfield, $sortorder);
462 $totalarray[
'nbfield']++;
464if (!empty($arrayfields[
'c.libelle'][
'checked'])) {
465 print_liste_field_titre($arrayfields[
'c.libelle'][
'label'], $_SERVER[
"PHP_SELF"],
'c.libelle',
'', $param,
'', $sortfield, $sortorder);
466 $totalarray[
'nbfield']++;
468if (!empty($arrayfields[
'pndf.num_payment'][
'checked'])) {
469 print_liste_field_titre($arrayfields[
'pndf.num_payment'][
'label'], $_SERVER[
"PHP_SELF"],
"pndf.num_payment",
'', $param,
'', $sortfield, $sortorder,
'', $arrayfields[
'pndf.num_payment'][
'tooltip']);
470 $totalarray[
'nbfield']++;
472if (!empty($arrayfields[
'ba.label'][
'checked'])) {
473 print_liste_field_titre($arrayfields[
'ba.label'][
'label'], $_SERVER[
"PHP_SELF"],
'ba.label',
'', $param,
'', $sortfield, $sortorder);
474 $totalarray[
'nbfield']++;
476if (!empty($arrayfields[
'pndf.amount'][
'checked'])) {
477 print_liste_field_titre($arrayfields[
'pndf.amount'][
'label'], $_SERVER[
"PHP_SELF"],
'pndf.amount',
'', $param,
'', $sortfield, $sortorder,
'right ');
478 $totalarray[
'nbfield']++;
482$parameters = array(
'arrayfields'=>$arrayfields,
'param'=>$param,
'sortfield'=>$sortfield,
'sortorder'=>$sortorder,
'totalarray'=>&$totalarray);
483$reshook = $hookmanager->executeHooks(
'printFieldListTitle', $parameters);
484print $hookmanager->resPrint;
487 print_liste_field_titre($selectedfields, $_SERVER[
'PHP_SELF'],
'',
'',
'',
'align="center"', $sortfield, $sortorder,
'maxwidthsearch ');
488 $totalarray[
'nbfield']++;
493foreach ($arrayfields as $column) {
494 if ($column[
'checked']) {
502$savnbfield = $totalarray[
'nbfield'];
503$totalarray = array();
504$totalarray[
'nbfield'] = 0;
505$imaxinloop = ($limit ? min($num, $limit) : $num);
506while ($i < $imaxinloop) {
507 $objp = $db->fetch_object($resql);
509 $paymentexpensereportstatic->id = $objp->rowid;
510 $paymentexpensereportstatic->ref = $objp->ref;
511 $paymentexpensereportstatic->datep = $db->jdate($objp->datep);
512 $paymentexpensereportstatic->amount = $objp->pamount;
513 $paymentexpensereportstatic->fk_typepayment = $objp->paiement_type;
516 $accountstatic->fetch($objp->bid);
517 $paymentexpensereportstatic->fk_bank = $accountstatic->getNomUrl(1);
519 $paymentexpensereportstatic->fk_bank =
null;
522 $userstatic->id = $objp->userid;
523 $userstatic->lastname = $objp->lastname;
524 $userstatic->firstname = $objp->firstname;
526 if ($mode ==
'kanban') {
528 print
'<tr class="trkanban"><td colspan="'.$savnbfield.
'">';
529 print
'<div class="box-flex-container kanban">';
532 print $paymentexpensereportstatic->getKanbanView(
'', array(
'selected' => in_array($objp->id, $arrayofselected)));
533 if ($i == ($imaxinloop - 1)) {
538 print
'<tr class="oddeven">';
544 $totalarray[
'nbfield']++;
549 if (!empty($conf->global->MAIN_VIEW_LINE_NUMBER_IN_LIST)) {
550 print
'<td>'.(($offset * $limit) + $i).
'</td>';
552 $totalarray[
'nbfield']++;
557 if (!empty($arrayfields[
'pndf.rowid'][
'checked'])) {
558 print
'<td class="nowrap">'.$paymentexpensereportstatic->getNomUrl(1).
'</td>';
560 $totalarray[
'nbfield']++;
565 if (!empty($arrayfields[
'pndf.datep'][
'checked'])) {
566 $dateformatforpayment =
'dayhour';
567 print
'<td class="nowrap center">'.dol_print_date($db->jdate($objp->datep), $dateformatforpayment).
'</td>';
569 $totalarray[
'nbfield']++;
574 if (!empty($arrayfields[
'u.login'][
'checked'])) {
576 if ($userstatic->id > 0) {
577 print $userstatic->getNomUrl(1);
581 $totalarray[
'nbfield']++;
586 if (!empty($arrayfields[
'c.libelle'][
'checked'])) {
587 $payment_type = $langs->trans(
"PaymentType".$objp->paiement_type) != (
"PaymentType".$objp->paiement_type) ? $langs->trans(
"PaymentType".$objp->paiement_type) : $objp->paiement_libelle;
588 print
'<td>'.$payment_type.
' '.
dol_trunc($objp->num_payment, 32).
'</td>';
590 $totalarray[
'nbfield']++;
595 if (!empty($arrayfields[
'pndf.num_payment'][
'checked'])) {
596 print
'<td>'.$objp->num_payment.
'</td>';
598 $totalarray[
'nbfield']++;
603 if (!empty($arrayfields[
'ba.label'][
'checked'])) {
606 $accountstatic->id = $objp->bid;
607 $accountstatic->ref = $objp->bref;
608 $accountstatic->label = $objp->blabel;
609 $accountstatic->number = $objp->number;
610 $accountstatic->iban = $objp->iban_prefix;
611 $accountstatic->bic = $objp->bic;
612 $accountstatic->currency_code = $objp->currency_code;
613 $accountstatic->account_number = $objp->account_number;
616 $accountingjournal->fetch($objp->accountancy_journal);
617 $accountstatic->accountancy_journal = $accountingjournal->code;
619 print $accountstatic->getNomUrl(1);
625 $totalarray[
'nbfield']++;
630 if (!empty($arrayfields[
'pndf.amount'][
'checked'])) {
631 print
'<td class="right"><span class="amount">'.price($objp->pamount).
'</span></td>';
633 $totalarray[
'nbfield']++;
635 $totalarray[
'pos'][$checkedCount] =
'amount';
636 if (empty($totalarray[
'val'][
'amount'])) {
637 $totalarray[
'val'][
'amount'] = $objp->pamount;
639 $totalarray[
'val'][
'amount'] += $objp->pamount;
647 $totalarray[
'nbfield']++;
657include 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 accounts.
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 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.