34 require
'../../main.inc.php';
35 require_once DOL_DOCUMENT_ROOT.
'/compta/paiement/class/paiement.class.php';
36 require_once DOL_DOCUMENT_ROOT.
'/compta/bank/class/account.class.php';
37 require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formother.class.php';
38 require_once DOL_DOCUMENT_ROOT.
'/core/lib/date.lib.php';
39 require_once DOL_DOCUMENT_ROOT.
'/accountancy/class/accountingjournal.class.php';
42 $langs->loadLangs(array(
'bills',
'banks',
'compta',
'companies'));
44 $action =
GETPOST(
'action',
'alpha');
45 $massaction =
GETPOST(
'massaction',
'alpha');
46 $confirm =
GETPOST(
'confirm',
'alpha');
47 $optioncss =
GETPOST(
'optioncss',
'alpha');
48 $contextpage =
GETPOST(
'contextpage',
'aZ') ?
GETPOST(
'contextpage',
'aZ') :
'paymentlist';
50 $facid =
GETPOST(
'facid',
'int');
51 $socid =
GETPOST(
'socid',
'int');
52 $userid =
GETPOST(
'userid',
'int');
55 if ($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_company =
GETPOST(
"search_company",
'alpha');
68 $search_paymenttype =
GETPOST(
"search_paymenttype");
69 $search_account =
GETPOST(
"search_account",
"int");
70 $search_payment_num =
GETPOST(
'search_payment_num',
'alpha');
71 $search_amount =
GETPOST(
"search_amount",
'alpha');
72 $search_status =
GETPOST(
'search_status',
'intcomma');
74 $limit =
GETPOST(
'limit',
'int') ?
GETPOST(
'limit',
'int') : $conf->liste_limit;
75 $sortfield =
GETPOST(
'sortfield',
'aZ09comma');
76 $sortorder =
GETPOST(
'sortorder',
'aZ09comma');
79 if (empty($page) || $page == -1) {
82 $offset = $limit * $page;
83 $pageprev = $page - 1;
84 $pagenext = $page + 1;
96 $fieldstosearchall = array(
97 'p.ref'=>
"RefPayment",
98 's.nom'=>
"ThirdParty",
99 'p.num_paiement'=>
"Numero",
100 'p.amount'=>
"Amount",
103 $arrayfields = array(
104 'p.ref' => array(
'label'=>
"RefPayment",
'checked'=>1,
'position'=>10),
105 'p.datep' => array(
'label'=>
"Date",
'checked'=>1,
'position'=>20),
106 's.nom' => array(
'label'=>
"ThirdParty",
'checked'=>1,
'position'=>30),
107 'c.libelle' => array(
'label'=>
"Type",
'checked'=>1,
'position'=>40),
108 'transaction' => array(
'label'=>
"BankTransactionLine",
'checked'=>1,
'position'=>50,
'enabled'=>(
isModEnabled(
"banque"))),
109 'ba.label' => array(
'label'=>
"Account",
'checked'=>1,
'position'=>60,
'enabled'=>(
isModEnabled(
"banque"))),
110 'p.num_paiement' => array(
'label'=>
"Numero",
'checked'=>1,
'position'=>70,
'tooltip'=>
"ChequeOrTransferNumber"),
111 'p.amount' => array(
'label'=>
"Amount",
'checked'=>1,
'position'=>80),
112 'p.statut' => array(
'label'=>
"Status",
'checked'=>1,
'position'=>90,
'enabled'=>(!empty($conf->global->BILL_ADD_PAYMENT_VALIDATION))),
117 $hookmanager->initHooks(array(
'paymentlist'));
124 $parameters = array(
'socid'=>$socid);
125 $reshook = $hookmanager->executeHooks(
'doActions', $parameters, $object, $action);
131 if (empty($reshook)) {
132 include DOL_DOCUMENT_ROOT.
'/core/actions_changeselectedfields.inc.php';
135 if (
GETPOST(
'button_removefilter_x',
'alpha') ||
GETPOST(
'button_removefilter.x',
'alpha') ||
GETPOST(
'button_removefilter',
'alpha')) {
137 $search_date_startday =
'';
138 $search_date_startmonth =
'';
139 $search_date_startyear =
'';
140 $search_date_endday =
'';
141 $search_date_endmonth =
'';
142 $search_date_endyear =
'';
143 $search_date_start =
'';
144 $search_date_end =
'';
145 $search_account =
'';
147 $search_paymenttype =
'';
148 $search_payment_num =
'';
149 $search_company =
'';
153 $search_array_options = array();
163 $accountstatic =
new Account($db);
164 $companystatic =
new Societe($db);
167 llxHeader(
'', $langs->trans(
'ListPayment'));
169 if (
GETPOST(
"orphelins",
"alpha")) {
171 $sql =
"SELECT p.rowid, p.ref, p.datep, p.amount, p.statut, p.num_paiement";
172 $sql .=
", c.code as paiement_code";
175 $parameters = array();
176 $reshook = $hookmanager->executeHooks(
'printFieldListSelect', $parameters);
177 $sql .= $hookmanager->resPrint;
178 $sql .=
" FROM ".MAIN_DB_PREFIX.
"paiement as p LEFT JOIN ".MAIN_DB_PREFIX.
"c_paiement as c ON p.fk_paiement = c.id";
179 $sql .=
" LEFT JOIN ".MAIN_DB_PREFIX.
"paiement_facture as pf ON p.rowid = pf.fk_paiement";
180 $sql .=
" WHERE p.entity IN (".getEntity(
'invoice').
")";
181 $sql .=
" AND pf.fk_facture IS NULL";
184 $parameters = array();
185 $reshook = $hookmanager->executeHooks(
'printFieldListWhere', $parameters);
186 $sql .= $hookmanager->resPrint;
189 $sql =
"SELECT DISTINCT p.rowid, p.ref, p.datep, p.fk_bank, p.amount, p.statut, p.num_paiement";
190 $sql .=
", c.code as paiement_code";
191 $sql .=
", ba.rowid as bid, ba.ref as bref, ba.label as blabel, ba.number, ba.account_number as account_number, ba.fk_accountancy_journal as accountancy_journal";
192 $sql .=
", s.rowid as socid, s.nom as name, s.email";
195 $parameters = array();
196 $reshook = $hookmanager->executeHooks(
'printFieldListSelect', $parameters);
197 $sql .= $hookmanager->resPrint;
201 $sql .=
" FROM ".MAIN_DB_PREFIX.
"paiement as p";
202 $sql .=
" LEFT JOIN ".MAIN_DB_PREFIX.
"c_paiement as c ON p.fk_paiement = c.id";
203 $sql .=
" LEFT JOIN ".MAIN_DB_PREFIX.
"bank as b ON p.fk_bank = b.rowid";
204 $sql .=
" LEFT JOIN ".MAIN_DB_PREFIX.
"bank_account as ba ON b.fk_account = ba.rowid";
205 $sql .=
" LEFT JOIN ".MAIN_DB_PREFIX.
"paiement_facture as pf ON p.rowid = pf.fk_paiement";
206 $sql .=
" LEFT JOIN ".MAIN_DB_PREFIX.
"facture as f ON pf.fk_facture = f.rowid";
207 $sql .=
" LEFT JOIN ".MAIN_DB_PREFIX.
"societe as s ON f.fk_soc = s.rowid";
208 if (empty($user->rights->societe->client->voir) && !$socid) {
209 $sql .=
" LEFT JOIN ".MAIN_DB_PREFIX.
"societe_commerciaux as sc ON s.rowid = sc.fk_soc";
211 $sql .=
" WHERE p.entity IN (".getEntity(
'invoice').
")";
212 if (empty($user->rights->societe->client->voir) && !$socid) {
213 $sql .=
" AND sc.fk_user = ".((int) $user->id);
216 $sql .=
" AND f.fk_soc = ".((int) $socid);
220 $sql .=
" AND f.fk_user_author IS NULL";
222 $sql .=
" AND f.fk_user_author = ".((int) $userid);
230 if ($search_date_start) {
231 $sql .=
" AND p.datep >= '" . $db->idate($search_date_start) .
"'";
233 if ($search_date_end) {
234 $sql .=
" AND p.datep <= '" . $db->idate($search_date_end) .
"'";
236 if ($search_account > 0) {
237 $sql .=
" AND b.fk_account=".((int) $search_account);
239 if ($search_paymenttype !=
'') {
240 $sql .=
" AND c.code='".$db->escape($search_paymenttype).
"'";
242 if ($search_payment_num !=
'') {
245 if ($search_amount) {
248 if ($search_company) {
253 $sql .=
natural_search(array_keys($fieldstosearchall), $search_all);
257 $parameters = array();
258 $reshook = $hookmanager->executeHooks(
'printFieldListWhere', $parameters);
259 $sql .= $hookmanager->resPrint;
264 if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) {
266 $sqlforcount = preg_replace(
'/^'.preg_quote($sqlfields,
'/').
'/',
'SELECT COUNT(*) as nbtotalofrecords', $sql);
267 $sqlforcount = preg_replace(
'/GROUP BY .*$/',
'', $sqlforcount);
268 $resql = $db->query($sqlforcount);
270 $objforcount = $db->fetch_object(
$resql);
284 $sql .= $db->order($sortfield, $sortorder);
286 $sql .= $db->plimit($limit + 1, $offset);
289 $resql = $db->query($sql);
297 $num = $db->num_rows(
$resql);
300 if (!empty($contextpage) && $contextpage != $_SERVER[
"PHP_SELF"]) {
301 $param .=
'&contextpage='.urlencode($contextpage);
303 if ($limit > 0 && $limit != $conf->liste_limit) {
304 $param .=
'&limit='.urlencode($limit);
308 $param .=
'&orphelins=1';
311 $param .=
'&search_ref='.urlencode($search_ref);
313 if ($search_date_startday) {
314 $param .=
'&search_date_startday='.urlencode($search_date_startday);
316 if ($search_date_startmonth) {
317 $param .=
'&search_date_startmonth='.urlencode($search_date_startmonth);
319 if ($search_date_startyear) {
320 $param .=
'&search_date_startyear='.urlencode($search_date_startyear);
322 if ($search_date_endday) {
323 $param .=
'&search_date_endday='.urlencode($search_date_endday);
325 if ($search_date_endmonth) {
326 $param .=
'&search_date_endmonth='.urlencode($search_date_endmonth);
328 if ($search_date_endyear) {
329 $param .=
'&search_date_endyear='.urlencode($search_date_endyear);
331 if ($search_company) {
332 $param .=
'&search_company='.urlencode($search_company);
334 if ($search_amount !=
'') {
335 $param .=
'&search_amount='.urlencode($search_amount);
337 if ($search_paymenttype) {
338 $param .=
'&search_paymenttype='.urlencode($search_paymenttype);
340 if ($search_account) {
341 $param .=
'&search_account='.urlencode($search_account);
343 if ($search_payment_num) {
344 $param .=
'&search_payment_num='.urlencode($search_payment_num);
346 if ($optioncss !=
'') {
347 $param .=
'&optioncss='.urlencode($optioncss);
350 print
'<form method="POST" action="'.$_SERVER[
"PHP_SELF"].
'">';
351 if ($optioncss !=
'') {
352 print
'<input type="hidden" name="optioncss" value="'.$optioncss.
'">';
354 print
'<input type="hidden" name="token" value="'.newToken().
'">';
355 print
'<input type="hidden" name="action" value="list">';
356 print
'<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
357 print
'<input type="hidden" name="sortfield" value="'.$sortfield.
'">';
358 print
'<input type="hidden" name="sortorder" value="'.$sortorder.
'">';
359 print
'<input type="hidden" name="contextpage" value="'.$contextpage.
'">';
361 print_barre_liste($langs->trans(
"ReceivedCustomersPayments"), $page, $_SERVER[
"PHP_SELF"], $param, $sortfield, $sortorder,
'', $num,
$nbtotalofrecords,
'bill', 0,
'',
'', $limit, 0, 0, 1);
364 foreach ($fieldstosearchall as $key => $val) {
365 $fieldstosearchall[$key] = $langs->trans($val);
367 print
'<div class="divsearchfieldfilter">'.$langs->trans(
"FilterOnInto", $search_all).join(
', ', $fieldstosearchall).
'</div>';
370 $varpage = empty($contextpage) ? $_SERVER[
"PHP_SELF"] : $contextpage;
371 $selectedfields =
$form->multiSelectArrayWithCheckbox(
'selectedfields', $arrayfields, $varpage);
372 $massactionbutton =
'';
373 if ($massactionbutton) {
374 $selectedfields .=
$form->showCheckAddButtons(
'checkforselect', 1);
378 print
'<div class="div-table-responsive">';
379 print
'<table class="tagtable liste'.($moreforfilter ?
" listwithfilterbefore" :
'').
'">';
381 print
'<tr class="liste_titre_filter">';
384 print
'<tr class="liste_titre_filter">';
385 if (!empty($conf->global->MAIN_VIEW_LINE_NUMBER_IN_LIST)) {
386 print
'<td class="liste_titre">';
391 if (!empty($arrayfields[
'p.ref'][
'checked'])) {
392 print
'<td class="liste_titre left">';
393 print
'<input class="flat" type="text" size="4" name="search_ref" value="'.dol_escape_htmltag($search_ref).
'">';
398 if (!empty($arrayfields[
'p.datep'][
'checked'])) {
399 print
'<td class="liste_titre center">';
400 print
'<div class="nowrap">';
401 print
$form->selectDate($search_date_start ? $search_date_start : -1,
'search_date_start', 0, 0, 1,
'', 1, 0, 0,
'',
'',
'',
'', 1,
'', $langs->trans(
'From'));
403 print
'<div class="nowrap">';
404 print
$form->selectDate($search_date_end ? $search_date_end : -1,
'search_date_end', 0, 0, 1,
'', 1, 0, 0,
'',
'',
'',
'', 1,
'', $langs->trans(
'to'));
410 if (!empty($arrayfields[
's.nom'][
'checked'])) {
411 print
'<td class="liste_titre">';
412 print
'<input class="flat" type="text" size="6" name="search_company" value="'.dol_escape_htmltag($search_company).
'">';
417 if (!empty($arrayfields[
'c.libelle'][
'checked'])) {
418 print
'<td class="liste_titre">';
419 print
$form->select_types_paiements($search_paymenttype,
'search_paymenttype',
'', 2, 1, 1, 1, 1,
'', 1);
424 if (!empty($arrayfields[
'transaction'][
'checked'])) {
425 print
'<td class="liste_titre">';
426 print
'<input class="flat" type="text" size="4" name="search_payment_num" value="'.dol_escape_htmltag($search_payment_num).
'">';
431 if (!empty($arrayfields[
'p.num_paiement'][
'checked'])) {
432 print
'<td class="liste_titre">';
437 if (!empty($arrayfields[
'ba.label'][
'checked'])) {
438 print
'<td class="liste_titre">';
439 $form->select_comptes($search_account,
'search_account', 0,
'', 1);
444 if (!empty($arrayfields[
'p.amount'][
'checked'])) {
445 print
'<td class="liste_titre right">';
446 print
'<input class="flat" type="text" size="4" name="search_amount" value="'.dol_escape_htmltag($search_amount).
'">';
451 if (!empty($arrayfields[
'p.statut'][
'checked'])) {
452 print
'<td class="liste_titre right">';
457 $parameters = array(
'arrayfields'=>$arrayfields);
458 $reshook = $hookmanager->executeHooks(
'printFieldListOption', $parameters);
459 print $hookmanager->resPrint;
461 print
'<td class="liste_titre maxwidthsearch">';
462 print
$form->showFilterAndCheckAddButtons(0);
467 print
'<tr class="liste_titre">';
468 if (!empty($conf->global->MAIN_VIEW_LINE_NUMBER_IN_LIST)) {
471 if (!empty($arrayfields[
'p.ref'][
'checked'])) {
472 print_liste_field_titre($arrayfields[
'p.ref'][
'label'], $_SERVER[
"PHP_SELF"],
"p.ref",
'', $param,
'', $sortfield, $sortorder);
474 if (!empty($arrayfields[
'p.datep'][
'checked'])) {
475 print_liste_field_titre($arrayfields[
'p.datep'][
'label'], $_SERVER[
"PHP_SELF"],
"p.datep",
'', $param,
'', $sortfield, $sortorder,
'center ');
477 if (!empty($arrayfields[
's.nom'][
'checked'])) {
478 print_liste_field_titre($arrayfields[
's.nom'][
'label'], $_SERVER[
"PHP_SELF"],
"s.nom",
'', $param,
'', $sortfield, $sortorder);
480 if (!empty($arrayfields[
'c.libelle'][
'checked'])) {
481 print_liste_field_titre($arrayfields[
'c.libelle'][
'label'], $_SERVER[
"PHP_SELF"],
"c.libelle",
'', $param,
'', $sortfield, $sortorder);
483 if (!empty($arrayfields[
'p.num_paiement'][
'checked'])) {
484 print_liste_field_titre($arrayfields[
'p.num_paiement'][
'label'], $_SERVER[
"PHP_SELF"],
"p.num_paiement",
'', $param,
'', $sortfield, $sortorder,
'', $arrayfields[
'p.num_paiement'][
'tooltip']);
486 if (!empty($arrayfields[
'transaction'][
'checked'])) {
487 print_liste_field_titre($arrayfields[
'transaction'][
'label'], $_SERVER[
"PHP_SELF"],
'',
'', $param,
'', $sortfield, $sortorder);
489 if (!empty($arrayfields[
'ba.label'][
'checked'])) {
490 print_liste_field_titre($arrayfields[
'ba.label'][
'label'], $_SERVER[
"PHP_SELF"],
"ba.label",
'', $param,
'', $sortfield, $sortorder);
492 if (!empty($arrayfields[
'p.amount'][
'checked'])) {
493 print_liste_field_titre($arrayfields[
'p.amount'][
'label'], $_SERVER[
"PHP_SELF"],
"p.amount",
'', $param,
'class="right"', $sortfield, $sortorder);
495 if (!empty($arrayfields[
'p.statut'][
'checked'])) {
496 print_liste_field_titre($arrayfields[
'p.statut'][
'label'], $_SERVER[
"PHP_SELF"],
"p.statut",
'', $param,
'class="right"', $sortfield, $sortorder);
500 $parameters = array(
'arrayfields'=>$arrayfields,
'param'=>$param,
'sortfield'=>$sortfield,
'sortorder'=>$sortorder);
501 $reshook = $hookmanager->executeHooks(
'printFieldListTitle', $parameters);
502 print $hookmanager->resPrint;
504 print_liste_field_titre($selectedfields, $_SERVER[
"PHP_SELF"],
'',
'',
'',
'align="center"', $sortfield, $sortorder,
'maxwidthsearch ');
508 foreach ($arrayfields as $column) {
509 if ($column[
'checked']) {
515 $totalarray = array();
516 while ($i < min($num, $limit)) {
517 $objp = $db->fetch_object(
$resql);
519 $object->id = $objp->rowid;
520 $object->ref = ($objp->ref ? $objp->ref : $objp->rowid);
522 $companystatic->id = $objp->socid;
523 $companystatic->name = $objp->name;
524 $companystatic->email = $objp->email;
526 print
'<tr class="oddeven">';
529 if (!empty($conf->global->MAIN_VIEW_LINE_NUMBER_IN_LIST)) {
530 print
'<td>'.(($offset * $limit) + $i).
'</td>';
532 $totalarray[
'nbfield']++;
537 if (!empty($arrayfields[
'p.ref'][
'checked'])) {
538 print
'<td>'.$object->getNomUrl(1).
'</td>';
540 $totalarray[
'nbfield']++;
545 if (!empty($arrayfields[
'p.datep'][
'checked'])) {
546 $dateformatforpayment =
'dayhour';
547 print
'<td class="center">'.dol_print_date($db->jdate($objp->datep), $dateformatforpayment,
'tzuser').
'</td>';
549 $totalarray[
'nbfield']++;
554 if (!empty($arrayfields[
's.nom'][
'checked'])) {
556 if ($objp->socid > 0) {
557 print $companystatic->getNomUrl(1,
'', 24);
561 $totalarray[
'nbfield']++;
566 if (!empty($arrayfields[
'c.libelle'][
'checked'])) {
567 print
'<td>'.$langs->trans(
"PaymentTypeShort".$objp->paiement_code).
'</td>';
569 $totalarray[
'nbfield']++;
574 if (!empty($arrayfields[
'p.num_paiement'][
'checked'])) {
575 print
'<td>'.$objp->num_paiement.
'</td>';
577 $totalarray[
'nbfield']++;
582 if (!empty($arrayfields[
'transaction'][
'checked'])) {
584 if ($objp->fk_bank > 0) {
585 $bankline->fetch($objp->fk_bank);
586 print $bankline->getNomUrl(1, 0);
590 $totalarray[
'nbfield']++;
595 if (!empty($arrayfields[
'ba.label'][
'checked'])) {
597 if ($objp->bid > 0) {
598 $accountstatic->id = $objp->bid;
599 $accountstatic->ref = $objp->bref;
600 $accountstatic->label = $objp->blabel;
601 $accountstatic->number = $objp->number;
602 $accountstatic->account_number = $objp->account_number;
605 $accountingjournal->fetch($objp->accountancy_journal);
606 $accountstatic->accountancy_journal = $accountingjournal->code;
608 print $accountstatic->getNomUrl(1);
612 $totalarray[
'nbfield']++;
617 if (!empty($arrayfields[
'p.amount'][
'checked'])) {
618 print
'<td class="right"><span class="amount">'.price($objp->amount).
'</span></td>';
620 $totalarray[
'nbfield']++;
622 $totalarray[
'pos'][$checkedCount] =
'amount';
623 $totalarray[
'val'][
'amount'] += $objp->amount;
627 if (!empty($arrayfields[
'p.statut'][
'checked'])) {
628 print
'<td class="right">';
629 if ($objp->statut == 0) {
630 print
'<a href="card.php?id='.$objp->rowid.
'&action=valide">';
632 print $object->LibStatut($objp->statut, 5);
633 if ($objp->statut == 0) {
638 $totalarray[
'nbfield']++;
645 $totalarray[
'nbfield']++;
654 include DOL_DOCUMENT_ROOT.
'/core/tpl/list_print_total.tpl.php';
659 foreach ($arrayfields as $key => $val) {
660 if (!empty($val[
'checked'])) {
664 print
'<tr><td colspan="'.$colspan.
'" class="opacitymedium">'.$langs->trans(
"NoRecordFound").
'</td></tr>';
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 bank transaction lines.
Class to manage accounting accounts.
Class to manage payments of customer invoices.
Class to manage third parties objects (customers, suppliers, prospects...)
if(isModEnabled('facture') &&!empty($user->rights->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') &&!empty($user->rights->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)) $resql
Social contributions to pay.
if($cancel &&! $id) if($action=='add' &&! $cancel) if($action=='delete') if($id) $form
Actions.
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...
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...
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='')
Set event messages in dol_events session object.
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.
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.
isModEnabled($module)
Is Dolibarr module enabled.
$nbtotalofrecords
Count total nb of records.
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.