31require
'../../main.inc.php';
32require_once DOL_DOCUMENT_ROOT.
'/don/class/don.class.php';
33require_once DOL_DOCUMENT_ROOT.
'/compta/bank/class/account.class.php';
34require_once DOL_DOCUMENT_ROOT.
'/compta/paiement/class/paiement.class.php';
35require_once DOL_DOCUMENT_ROOT.
'/accountancy/class/accountingjournal.class.php';
46$langs->loadLangs(array(
'companies',
'donations'));
48$action =
GETPOST(
'action',
'aZ09') ?
GETPOST(
'action',
'aZ09') :
'view';
49$massaction =
GETPOST(
'massaction',
'alpha');
50$contextpage =
GETPOST(
'contextpage',
'aZ') ?
GETPOST(
'contextpage',
'aZ') :
'sclist';
51$mode =
GETPOST(
'mode',
'alpha');
55$search_ref =
GETPOST(
"search_ref",
"alpha");
56$search_date_startday =
GETPOSTINT(
'search_date_startday');
57$search_date_startmonth =
GETPOSTINT(
'search_date_startmonth');
58$search_date_startyear =
GETPOSTINT(
'search_date_startyear');
59$search_date_endday =
GETPOSTINT(
'search_date_endday');
60$search_date_endmonth =
GETPOSTINT(
'search_date_endmonth');
61$search_date_endyear =
GETPOSTINT(
'search_date_endyear');
62$search_date_start =
dol_mktime(0, 0, 0, $search_date_startmonth, $search_date_startday, $search_date_startyear);
63$search_date_end =
dol_mktime(23, 59, 59, $search_date_endmonth, $search_date_endday, $search_date_endyear);
64$search_company =
GETPOST(
"search_company",
'alpha');
65$search_paymenttype =
GETPOST(
"search_paymenttype",
"intcomma");
66$search_account =
GETPOST(
"search_account",
'alpha');
67$search_payment_num =
GETPOST(
'search_payment_num',
'alpha');
68$search_amount =
GETPOST(
"search_amount",
'alpha');
69$search_status =
GETPOST(
'search_status',
'intcomma');
72$sortfield =
GETPOST(
'sortfield',
'aZ09comma');
73$sortorder =
GETPOST(
'sortorder',
'aZ09comma');
75if (empty($page) || $page == -1) {
78$offset = $limit * $page;
85 $sortfield =
"pd.rowid";
88$search_all = trim(
GETPOST(
'search_all',
'alphanohtml'));
91$fieldstosearchall = array(
92 'pd.rowid' =>
"RefPayment",
93 's.nom' =>
"ThirdParty",
94 'pd.num_paiement' =>
"Numero",
95 'pd.amount' =>
"Amount",
99 'pd.rowid' => array(
'label' =>
"RefPayment",
'checked' => 1,
'position' => 10),
100 'pd.datep' => array(
'label' =>
"Date",
'checked' => 1,
'position' => 20),
101 's.nom' => array(
'label' =>
"ThirdParty",
'checked' => 1,
'position' => 30),
102 'c.code' => array(
'label' =>
"Type",
'checked' => 1,
'position' => 40),
103 'pd.num_paiement' => array(
'label' =>
"Numero",
'checked' => 1,
'position' => 50,
'tooltip' =>
"ChequeOrTransferNumber"),
104 'transaction' => array(
'label' =>
"BankTransactionLine",
'checked' => 1,
'position' => 60,
'enabled' => (isModEnabled(
"bank"))),
105 'ba.label' => array(
'label' =>
"BankAccount",
'checked' => 1,
'position' => 70,
'enabled' => (isModEnabled(
"bank"))),
106 'pd.amount' => array(
'label' =>
"Amount",
'checked' => 1,
'position' => 80),
109'@phan-var-force array<string,array{label:string,checked?:int<0,1>,position?:int,help?:string}> $arrayfields';
111$optioncss =
GETPOST(
'optioncss',
'alpha');
112$moreforfilter =
GETPOST(
'moreforfilter',
'alpha');
115$hookmanager->initHooks(array(
'donationlist'));
120$permissiontoread = $user->hasRight(
'don',
'read');
121$permissiontoadd = $user->hasRight(
'don',
'write');
122$permissiontodelete = $user->hasRight(
'don',
'delete');
128$parameters = array(
'socid' => $paiementid);
129$reshook = $hookmanager->executeHooks(
'doActions', $parameters, $object, $action);
134if (empty($reshook)) {
135 include DOL_DOCUMENT_ROOT.
'/core/actions_changeselectedfields.inc.php';
138 if (
GETPOST(
'button_removefilter_x',
'alpha') ||
GETPOST(
'button_removefilter.x',
'alpha') ||
GETPOST(
'button_removefilter',
'alpha')) {
140 $search_date_startday =
'';
141 $search_date_startmonth =
'';
142 $search_date_startyear =
'';
143 $search_date_endday =
'';
144 $search_date_endmonth =
'';
145 $search_date_endyear =
'';
146 $search_date_start =
'';
147 $search_date_end =
'';
148 $search_account =
'';
150 $search_paymenttype =
'';
151 $search_payment_num =
'';
152 $search_company =
'';
155 $search_array_options = array();
163$form =
new Form($db);
164$donationstatic =
new Don($db);
165$companystatic =
new Societe($db);
167$accountstatic =
new Account($db);
169$title = $langs->trans(
"Donations");
170$help_url =
'EN:Module_Donations|FR:Module_Dons|ES:Módulo_Donaciones|DE:Modul_Spenden';
174$sql =
"SELECT pd.rowid as payment_id, pd.amount, pd.datep, pd.fk_typepayment, pd.num_payment, pd.amount, pd.fk_bank, ";
175$sql .=
' s.rowid as soc_id, s.nom, ';
176$sql .=
' d.societe, ';
177$sql .=
' c.code as paiement_code, ';
178$sql .=
' d.rowid, 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 ';
181$parameters = array();
182$reshook = $hookmanager->executeHooks(
'printFieldListSelect', $parameters);
183$sql .= $hookmanager->resPrint;
187$sql .=
" FROM ".MAIN_DB_PREFIX.
"payment_donation as pd";
188$sql .=
" LEFT JOIN ".MAIN_DB_PREFIX.
"don as d ON (d.rowid = pd.fk_donation)";
189$sql .=
" LEFT JOIN ".MAIN_DB_PREFIX.
"bank as b ON (b.rowid = pd.fk_bank)";
190$sql .=
" LEFT JOIN ".MAIN_DB_PREFIX.
"bank_account as ba ON (ba.rowid = b.fk_account)";
191$sql .=
" LEFT JOIN ".MAIN_DB_PREFIX.
"societe as s ON (s.rowid = d.fk_soc)";
192$sql .=
" LEFT JOIN ".MAIN_DB_PREFIX.
"c_paiement as c ON (c.id = pd.fk_typepayment)";
193$sql .=
" WHERE d.entity IN (".getEntity(
'donation').
")";
198if ($search_date_start) {
199 $sql .=
" AND pd.datep >= '" . $db->idate($search_date_start) .
"'";
201if ($search_date_end) {
202 $sql .=
" AND pd.datep <= '" . $db->idate($search_date_end) .
"'";
204if ($search_account > 0) {
205 $sql .=
" AND b.fk_account=".((int) $search_account);
207if ($search_paymenttype !=
'') {
208 $sql .=
" AND c.code='".$db->escape($search_paymenttype).
"'";
210if ($search_payment_num !=
'') {
216if ($search_company) {
220 $sql .=
natural_search(array_keys($fieldstosearchall), $search_all);
224$parameters = array();
225$reshook = $hookmanager->executeHooks(
'printFieldListWhere', $parameters);
226$sql .= $hookmanager->resPrint;
229$nbtotalofrecords =
'';
232 $sqlforcount = preg_replace(
'/^'.preg_quote($sqlfields,
'/').
'/',
'SELECT COUNT(*) as nbtotalofrecords', $sql);
233 $sqlforcount = preg_replace(
'/GROUP BY .*$/',
'', $sqlforcount);
234 $resql = $db->query($sqlforcount);
236 $objforcount = $db->fetch_object($resql);
237 $nbtotalofrecords = $objforcount->nbtotalofrecords;
242 if (($page * $limit) > $nbtotalofrecords) {
249$sql .= $db->order($sortfield, $sortorder);
253 $sql .= $db->plimit($limit + 1, $offset);
256$resql = $db->query($sql);
263$num = $db->num_rows($resql);
268llxHeader(
'', $title, $help_url,
'', 0, 0, $morejs, $morecss,
'',
'bodyforlist');
271if (!empty($contextpage) && $contextpage != $_SERVER[
"PHP_SELF"]) {
272 $param .=
'&contextpage='.urlencode($contextpage);
274if ($limit > 0 && $limit !=
$conf->liste_limit) {
275 $param .=
'&limit='.((int) $limit);
278 $param .=
'&search_ref='.urlencode($search_ref);
280if ($search_date_startday) {
281 $param .=
'&search_date_startday='.urlencode((
string) ($search_date_startday));
283if ($search_date_startmonth) {
284 $param .=
'&search_date_startmonth='.urlencode((
string) ($search_date_startmonth));
286if ($search_date_startyear) {
287 $param .=
'&search_date_startyear='.urlencode((
string) ($search_date_startyear));
289if ($search_date_endday) {
290 $param .=
'&search_date_endday='.urlencode((
string) ($search_date_endday));
292if ($search_date_endmonth) {
293 $param .=
'&search_date_endmonth='.urlencode((
string) ($search_date_endmonth));
295if ($search_date_endyear) {
296 $param .=
'&search_date_endyear='.urlencode((
string) ($search_date_endyear));
298if ($search_company) {
299 $param .=
'&search_company='.urlencode($search_company);
301if ($search_amount !=
'') {
302 $param .=
'&search_amount='.urlencode($search_amount);
304if ($search_paymenttype) {
305 $param .=
'&search_paymenttype='.urlencode($search_paymenttype);
307if ($search_account) {
308 $param .=
'&search_account='.urlencode((
string) ($search_account));
310if ($search_payment_num) {
311 $param .=
'&search_payment_num='.urlencode($search_payment_num);
313if ($optioncss !=
'') {
314 $param .=
'&optioncss='.urlencode($optioncss);
317print
'<form method="POST" action="'.$_SERVER[
"PHP_SELF"].
'">';
318if ($optioncss !=
'') {
319 print
'<input type="hidden" name="optioncss" value="'.$optioncss.
'">';
321print
'<input type="hidden" name="token" value="'.newToken().
'">';
322print
'<input type="hidden" name="action" value="list">';
323print
'<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
324print
'<input type="hidden" name="sortfield" value="'.$sortfield.
'">';
325print
'<input type="hidden" name="sortorder" value="'.$sortorder.
'">';
326print
'<input type="hidden" name="contextpage" value="'.$contextpage.
'">';
329print_barre_liste($langs->trans(
"DonationPayments"), $page, $_SERVER[
"PHP_SELF"], $param, $sortfield, $sortorder,
'', $num, $nbtotalofrecords,
'bill', 0,
'',
'', $limit, 0, 0, 1);
332 foreach ($fieldstosearchall as $key => $val) {
333 $fieldstosearchall[$key] = $langs->trans($val);
335 print
'<div class="divsearchfieldfilter">'.$langs->trans(
"FilterOnInto", $search_all).implode(
', ', $fieldstosearchall).
'</div>';
338$varpage = empty($contextpage) ? $_SERVER[
"PHP_SELF"] : $contextpage;
339$selectedfields = $form->multiSelectArrayWithCheckbox(
'selectedfields', $arrayfields, $varpage,
getDolGlobalString(
'MAIN_CHECKBOX_LEFT_COLUMN'));
340$massactionbutton =
'';
341if ($massactionbutton) {
342 $selectedfields .= $form->showCheckAddButtons(
'checkforselect', 1);
346print
'<div class="div-table-responsive">';
347print
'<table class="tagtable nobottomiftotal liste'.($moreforfilter ?
" listwithfilterbefore" :
'').
'">';
351print
'<tr class="liste_titre_filter">';
354 print
'<td class="liste_titre center maxwidthsearch">';
355 $searchpicto = $form->showFilterButtons(
'left');
361 print
'<td class="liste_titre">';
365if (!empty($arrayfields[
'pd.rowid'][
'checked'])) {
366 print
'<td class="liste_titre left">';
367 print
'<input class="flat" type="text" size="4" name="search_ref" value="'.dol_escape_htmltag($search_ref).
'">';
372if (!empty($arrayfields[
'pd.datep'][
'checked'])) {
373 print
'<td class="liste_titre">';
374 print
'<div class="nowrapfordate">';
375 print $form->selectDate($search_date_start ? $search_date_start : -1,
'search_date_start', 0, 0, 1,
'', 1, 0, 0,
'',
'',
'',
'', 1,
'', $langs->trans(
'From'));
377 print
'<div class="nowrapfordate">';
378 print $form->selectDate($search_date_end ? $search_date_end : -1,
'search_date_end', 0, 0, 1,
'', 1, 0, 0,
'',
'',
'',
'', 1,
'', $langs->trans(
'to'));
384if (!empty($arrayfields[
's.nom'][
'checked'])) {
385 print
'<td class="liste_titre">';
386 print
'<input class="flat" type="text" size="6" name="search_company" value="'.dol_escape_htmltag($search_company).
'">';
391if (!empty($arrayfields[
'c.code'][
'checked'])) {
392 print
'<td class="liste_titre">';
393 print $form->select_types_paiements($search_paymenttype,
'search_paymenttype',
'', 2, 1, 1, 0, 1,
'maxwidth100', 1);
398if (!empty($arrayfields[
'transaction'][
'checked'])) {
399 print
'<td class="liste_titre">';
400 print
'<input class="flat" type="text" size="4" name="search_payment_num" value="'.dol_escape_htmltag($search_payment_num).
'">';
405if (!empty($arrayfields[
'pd.num_paiement'][
'checked'])) {
406 print
'<td class="liste_titre">';
411if (!empty($arrayfields[
'ba.label'][
'checked'])) {
412 print
'<td class="liste_titre">';
413 $form->select_comptes($search_account,
'search_account', 0,
'', 1);
418if (!empty($arrayfields[
'pd.amount'][
'checked'])) {
419 print
'<td class="liste_titre right">';
420 print
'<input class="flat" type="text" size="6" name="search_amount" value="'.dol_escape_htmltag($search_amount).
'">';
425$parameters = array(
'arrayfields' => $arrayfields);
426$reshook = $hookmanager->executeHooks(
'printFieldListOption', $parameters, $object, $action);
427print $hookmanager->resPrint;
431 print
'<td class="liste_titre center maxwidthsearch">';
432 $searchpicto = $form->showFilterButtons();
439$totalarray = array();
440$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[
'pd.rowid'][
'checked'])) {
456 print_liste_field_titre($arrayfields[
'pd.rowid'][
'label'], $_SERVER[
"PHP_SELF"],
"pd.rowid",
'', $param,
'', $sortfield, $sortorder);
457 $totalarray[
'nbfield']++;
459if (!empty($arrayfields[
'pd.datep'][
'checked'])) {
460 print_liste_field_titre($arrayfields[
'pd.datep'][
'label'], $_SERVER[
"PHP_SELF"],
"pd.datep",
'', $param,
'', $sortfield, $sortorder);
461 $totalarray[
'nbfield']++;
463if (!empty($arrayfields[
's.nom'][
'checked'])) {
464 print_liste_field_titre($arrayfields[
's.nom'][
'label'], $_SERVER[
"PHP_SELF"],
"s.nom",
'', $param,
'', $sortfield, $sortorder);
465 $totalarray[
'nbfield']++;
467if (!empty($arrayfields[
'c.code'][
'checked'])) {
468 print_liste_field_titre($arrayfields[
'c.code'][
'label'], $_SERVER[
"PHP_SELF"],
"c.code",
'', $param,
'', $sortfield, $sortorder);
469 $totalarray[
'nbfield']++;
471if (!empty($arrayfields[
'pd.num_paiement'][
'checked'])) {
472 print_liste_field_titre($arrayfields[
'pd.num_paiement'][
'label'], $_SERVER[
"PHP_SELF"],
"pd.num_payment",
'', $param,
'', $sortfield, $sortorder,
'', $arrayfields[
'p.num_paiement'][
'tooltip']);
473 $totalarray[
'nbfield']++;
475if (!empty($arrayfields[
'transaction'][
'checked'])) {
476 print_liste_field_titre($arrayfields[
'transaction'][
'label'], $_SERVER[
"PHP_SELF"],
'',
'', $param,
'', $sortfield, $sortorder);
477 $totalarray[
'nbfield']++;
479if (!empty($arrayfields[
'ba.label'][
'checked'])) {
480 print_liste_field_titre($arrayfields[
'ba.label'][
'label'], $_SERVER[
"PHP_SELF"],
"ba.label",
'', $param,
'', $sortfield, $sortorder);
481 $totalarray[
'nbfield']++;
483if (!empty($arrayfields[
'pd.amount'][
'checked'])) {
484 print_liste_field_titre($arrayfields[
'pd.amount'][
'label'], $_SERVER[
"PHP_SELF"],
"pd.amount",
'', $param,
'', $sortfield, $sortorder,
'right ');
485 $totalarray[
'nbfield']++;
489include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_search_title.tpl.php';
491$parameters = array(
'arrayfields' => $arrayfields,
'param' => $param,
'sortfield' => $sortfield,
'sortorder' => $sortorder);
492$reshook = $hookmanager->executeHooks(
'printFieldListTitle', $parameters);
493print $hookmanager->resPrint;
496 print_liste_field_titre($selectedfields, $_SERVER[
"PHP_SELF"],
"",
'',
'',
'align="center"', $sortfield, $sortorder,
'maxwidthsearch ');
497 $totalarray[
'nbfield']++;
502$needToFetchEachLine = 0;
503if (isset($extrafields->attributes[
$object->table_element][
'computed']) && is_array($extrafields->attributes[
$object->table_element][
'computed']) && count($extrafields->attributes[
$object->table_element][
'computed']) > 0) {
504 foreach ($extrafields->attributes[
$object->table_element][
'computed'] as $key => $val) {
505 if (!is_null($val) && preg_match(
'/\$object/', $val)) {
506 $needToFetchEachLine++;
514$savnbfield = $totalarray[
'nbfield'];
515$totalarray = array();
516$totalarray[
'nbfield'] = 0;
517$imaxinloop = ($limit ? min($num, $limit) : $num);
518while ($i < $imaxinloop) {
519 $obj = $db->fetch_object($resql);
521 $companystatic->id = $obj->soc_id;
522 $companystatic->name = $obj->nom;
525 $result = $company->fetch($obj->socid);
527 print
'<tr class="oddeven">';
529 print
'<td class="nowrap center">';
530 if ($massactionbutton || $massaction) {
532 if (in_array($obj->id_paiement, $arrayofselected)) {
535 print
'<input id="cb'.$obj->id_paiement.
'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$obj->id_paiement.
'"'.($selected ?
' checked="checked"' :
'').
'>';
539 $totalarray[
'nbfield']++;
544 if (!empty($arrayfields[
'pd.rowid'][
'checked'])) {
545 print
'<td><a href="' . DOL_URL_ROOT .
'/don/payment/card.php?id=' . $obj->payment_id .
'">' .
img_object($langs->trans(
"Payment"),
"payment") .
' ' . $obj->payment_id .
'</a></td>';
547 $totalarray[
'nbfield']++;
552 if (!empty($arrayfields[
'pd.datep'][
'checked'])) {
553 $dateformatforpayment =
'dayhour';
554 print
'<td class="nowraponall">'.dol_print_date($db->jdate($obj->datep), $dateformatforpayment,
'tzuser').
'</td>';
556 $totalarray[
'nbfield']++;
561 if (!empty($arrayfields[
's.nom'][
'checked'])) {
562 print
'<td class="nowraponall">';
563 if ($obj->soc_id > 0) {
564 print $companystatic->getNomUrl(1,
'', 24);
566 print $donationstatic->societe = $obj->societe;
570 $totalarray[
'nbfield']++;
575 if (!empty($arrayfields[
'c.code'][
'checked'])) {
576 print
'<td>'.$langs->trans(
"PaymentTypeShort".$obj->paiement_code).
'</td>';
578 $totalarray[
'nbfield']++;
583 if (!empty($arrayfields[
'pd.num_paiement'][
'checked'])) {
584 print
'<td>'.$obj->num_payment.
'</td>';
586 $totalarray[
'nbfield']++;
591 if (!empty($arrayfields[
'transaction'][
'checked'])) {
592 print
'<td class="tdoverflowmax125">';
593 if ($obj->fk_bank > 0) {
594 $test = $bankline->fetch($obj->fk_bank);
595 print $bankline->getNomUrl(1, 0);
599 $totalarray[
'nbfield']++;
604 if (!empty($arrayfields[
'ba.label'][
'checked'])) {
607 $accountstatic->id = $obj->bid;
608 $accountstatic->ref = $obj->bref;
609 $accountstatic->label = $obj->blabel;
610 $accountstatic->number = $obj->number;
611 $accountstatic->account_number = $obj->account_number;
614 $accountingjournal->fetch($obj->accountancy_journal);
615 $accountstatic->accountancy_journal = $accountingjournal->code;
617 print $accountstatic->getNomUrl(1);
620 $totalarray[
'nbfield']++;
625 if (!empty($arrayfields[
'pd.amount'][
'checked'])) {
626 print
'<td class="right"><span class="amount">' .
price($obj->amount) .
'</span></td>';
628 $totalarray[
'nbfield']++;
629 $totalarray[
'pos'][$totalarray[
'nbfield']] =
'amount';
631 if (empty($totalarray[
'val'][
'amount'])) {
632 $totalarray[
'val'][
'amount'] = $obj->amount;
634 $totalarray[
'val'][
'amount'] += $obj->amount;
642include DOL_DOCUMENT_ROOT.
'/core/tpl/list_print_total.tpl.php';
647 foreach ($arrayfields as $key => $val) {
648 if (!empty($val[
'checked'])) {
652 print
'<tr><td colspan="'.$colspan.
'"><span class="opacitymedium">'.$langs->trans(
"NoRecordFound").
'</span></td></tr>';
657$parameters = array(
'arrayfields' => $arrayfields,
'sql' => $sql);
658$reshook = $hookmanager->executeHooks(
'printFieldListFooter', $parameters, $object, $action);
659print $hookmanager->resPrint;
661print
'</table>'.
"\n";
if( $user->socid > 0) if(! $user->hasRight('accounting', 'chartofaccount')) $object
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.
Class to manage bank accounts.
Class to manage bank transaction lines.
Class to manage accounting journals.
Class to manage donations.
Class to manage third parties objects (customers, suppliers, prospects...)
dol_mktime($hour, $minute, $second, $month, $day, $year, $gm='auto', $check=1)
Return a timestamp date built from detailed information (by default a local PHP server timestamp) Rep...
img_object($titlealt, $picto, $moreatt='', $pictoisfullpath=0, $srconly=0, $notitle=0)
Show a picto called object_picto (generic function)
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.
GETPOSTINT($paramname, $method=0)
Return the value of a $_GET or $_POST supervariable, converted into integer.
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...
price($amount, $form=0, $outlangs='', $trunc=1, $rounding=-1, $forcerounding=-1, $currency_code='')
Function to format a value into an amount for visual output Function used into PDF and HTML pages.
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 the value of a given key, which produces ascending (default) or descending out...
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.
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...
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.