30require
'../../main.inc.php';
31require_once DOL_DOCUMENT_ROOT.
'/don/class/don.class.php';
32require_once DOL_DOCUMENT_ROOT.
'/compta/bank/class/account.class.php';
33require_once DOL_DOCUMENT_ROOT.
'/compta/paiement/class/paiement.class.php';
34require_once DOL_DOCUMENT_ROOT.
'/accountancy/class/accountingjournal.class.php';
37$langs->loadLangs(array(
'companies',
'donations'));
39$action =
GETPOST(
'action',
'aZ09') ?
GETPOST(
'action',
'aZ09') :
'view';
40$massaction =
GETPOST(
'massaction',
'alpha');
41$contextpage =
GETPOST(
'contextpage',
'aZ') ?
GETPOST(
'contextpage',
'aZ') :
'sclist';
42$mode =
GETPOST(
'mode',
'alpha');
46$search_ref =
GETPOST(
"search_ref",
"alpha");
47$search_date_startday =
GETPOSTINT(
'search_date_startday');
48$search_date_startmonth =
GETPOSTINT(
'search_date_startmonth');
49$search_date_startyear =
GETPOSTINT(
'search_date_startyear');
50$search_date_endday =
GETPOSTINT(
'search_date_endday');
51$search_date_endmonth =
GETPOSTINT(
'search_date_endmonth');
52$search_date_endyear =
GETPOSTINT(
'search_date_endyear');
53$search_date_start =
dol_mktime(0, 0, 0, $search_date_startmonth, $search_date_startday, $search_date_startyear);
54$search_date_end =
dol_mktime(23, 59, 59, $search_date_endmonth, $search_date_endday, $search_date_endyear);
55$search_company =
GETPOST(
"search_company",
'alpha');
56$search_paymenttype =
GETPOST(
"search_paymenttype",
"intcomma");
57$search_account =
GETPOST(
"search_account",
'alpha');
58$search_payment_num =
GETPOST(
'search_payment_num',
'alpha');
59$search_amount =
GETPOST(
"search_amount",
'alpha');
60$search_status =
GETPOST(
'search_status',
'intcomma');
63$sortfield =
GETPOST(
'sortfield',
'aZ09comma');
64$sortorder =
GETPOST(
'sortorder',
'aZ09comma');
66if (empty($page) || $page == -1) {
69$offset = $limit * $page;
76 $sortfield =
"pd.rowid";
79$search_all = trim(GETPOSTISSET(
"search_all") ?
GETPOST(
"search_all",
'alpha') :
GETPOST(
'sall'));
82$fieldstosearchall = array(
83 'pd.rowid' =>
"RefPayment",
84 's.nom' =>
"ThirdParty",
85 'pd.num_paiement' =>
"Numero",
86 'pd.amount' =>
"Amount",
90 'pd.rowid' => array(
'label' =>
"RefPayment",
'checked' => 1,
'position' => 10),
91 'pd.datep' => array(
'label' =>
"Date",
'checked' => 1,
'position' => 20),
92 's.nom' => array(
'label' =>
"ThirdParty",
'checked' => 1,
'position' => 30),
93 'c.code' => array(
'label' =>
"Type",
'checked' => 1,
'position' => 40),
94 'pd.num_paiement' => array(
'label' =>
"Numero",
'checked' => 1,
'position' => 50,
'tooltip' =>
"ChequeOrTransferNumber"),
95 'transaction' => array(
'label' =>
"BankTransactionLine",
'checked' => 1,
'position' => 60,
'enabled' => (isModEnabled(
"bank"))),
96 'ba.label' => array(
'label' =>
"BankAccount",
'checked' => 1,
'position' => 70,
'enabled' => (isModEnabled(
"bank"))),
97 'pd.amount' => array(
'label' =>
"Amount",
'checked' => 1,
'position' => 80),
100'@phan-var-force array<string,array{label:string,checked?:int<0,1>,position?:int,help?:string}> $arrayfields';
102$optioncss =
GETPOST(
'optioncss',
'alpha');
103$moreforfilter =
GETPOST(
'moreforfilter',
'alpha');
106$hookmanager->initHooks(array(
'donationlist'));
111$permissiontoread = $user->hasRight(
'don',
'read');
112$permissiontoadd = $user->hasRight(
'don',
'write');
113$permissiontodelete = $user->hasRight(
'don',
'delete');
119$parameters = array(
'socid' => $paiementid);
120$reshook = $hookmanager->executeHooks(
'doActions', $parameters, $object, $action);
125if (empty($reshook)) {
126 include DOL_DOCUMENT_ROOT.
'/core/actions_changeselectedfields.inc.php';
129 if (
GETPOST(
'button_removefilter_x',
'alpha') ||
GETPOST(
'button_removefilter.x',
'alpha') ||
GETPOST(
'button_removefilter',
'alpha')) {
131 $search_date_startday =
'';
132 $search_date_startmonth =
'';
133 $search_date_startyear =
'';
134 $search_date_endday =
'';
135 $search_date_endmonth =
'';
136 $search_date_endyear =
'';
137 $search_date_start =
'';
138 $search_date_end =
'';
139 $search_account =
'';
141 $search_paymenttype =
'';
142 $search_payment_num =
'';
143 $search_company =
'';
146 $search_array_options = array();
154$form =
new Form($db);
155$donationstatic =
new Don($db);
156$companystatic =
new Societe($db);
158$accountstatic =
new Account($db);
160$title = $langs->trans(
"Donations");
161$help_url =
'EN:Module_Donations|FR:Module_Dons|ES:Módulo_Donaciones|DE:Modul_Spenden';
165$sql =
"SELECT pd.rowid as payment_id, pd.amount, pd.datep, pd.fk_typepayment, pd.num_payment, pd.amount, pd.fk_bank, ";
166$sql .=
' s.rowid as soc_id, s.nom, ';
167$sql .=
' d.societe, ';
168$sql .=
' c.code as paiement_code, ';
169$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 ';
172$parameters = array();
173$reshook = $hookmanager->executeHooks(
'printFieldListSelect', $parameters);
174$sql .= $hookmanager->resPrint;
178$sql .=
" FROM ".MAIN_DB_PREFIX.
"payment_donation as pd";
179$sql .=
" LEFT JOIN ".MAIN_DB_PREFIX.
"don as d ON (d.rowid = pd.fk_donation)";
180$sql .=
" LEFT JOIN ".MAIN_DB_PREFIX.
"bank as b ON (b.rowid = pd.fk_bank)";
181$sql .=
" LEFT JOIN ".MAIN_DB_PREFIX.
"bank_account as ba ON (ba.rowid = b.fk_account)";
182$sql .=
" LEFT JOIN ".MAIN_DB_PREFIX.
"societe as s ON (s.rowid = d.fk_soc)";
183$sql .=
" LEFT JOIN ".MAIN_DB_PREFIX.
"c_paiement as c ON (c.id = pd.fk_typepayment)";
184$sql .=
" WHERE d.entity IN (".getEntity(
'donation').
")";
189if ($search_date_start) {
190 $sql .=
" AND pd.datep >= '" . $db->idate($search_date_start) .
"'";
192if ($search_date_end) {
193 $sql .=
" AND pd.datep <= '" . $db->idate($search_date_end) .
"'";
195if ($search_account > 0) {
196 $sql .=
" AND b.fk_account=".((int) $search_account);
198if ($search_paymenttype !=
'') {
199 $sql .=
" AND c.code='".$db->escape($search_paymenttype).
"'";
201if ($search_payment_num !=
'') {
207if ($search_company) {
211 $sql .=
natural_search(array_keys($fieldstosearchall), $search_all);
215$parameters = array();
216$reshook = $hookmanager->executeHooks(
'printFieldListWhere', $parameters);
217$sql .= $hookmanager->resPrint;
220$nbtotalofrecords =
'';
223 $sqlforcount = preg_replace(
'/^'.preg_quote($sqlfields,
'/').
'/',
'SELECT COUNT(*) as nbtotalofrecords', $sql);
224 $sqlforcount = preg_replace(
'/GROUP BY .*$/',
'', $sqlforcount);
225 $resql = $db->query($sqlforcount);
227 $objforcount = $db->fetch_object($resql);
228 $nbtotalofrecords = $objforcount->nbtotalofrecords;
233 if (($page * $limit) > $nbtotalofrecords) {
240$sql .= $db->order($sortfield, $sortorder);
244 $sql .= $db->plimit($limit + 1, $offset);
247$resql = $db->query($sql);
254$num = $db->num_rows($resql);
259llxHeader(
'', $title, $help_url,
'', 0, 0, $morejs, $morecss,
'',
'bodyforlist');
262if (!empty($contextpage) && $contextpage != $_SERVER[
"PHP_SELF"]) {
263 $param .=
'&contextpage='.urlencode($contextpage);
265if ($limit > 0 && $limit != $conf->liste_limit) {
266 $param .=
'&limit='.((int) $limit);
269 $param .=
'&search_ref='.urlencode($search_ref);
271if ($search_date_startday) {
272 $param .=
'&search_date_startday='.urlencode((
string) ($search_date_startday));
274if ($search_date_startmonth) {
275 $param .=
'&search_date_startmonth='.urlencode((
string) ($search_date_startmonth));
277if ($search_date_startyear) {
278 $param .=
'&search_date_startyear='.urlencode((
string) ($search_date_startyear));
280if ($search_date_endday) {
281 $param .=
'&search_date_endday='.urlencode((
string) ($search_date_endday));
283if ($search_date_endmonth) {
284 $param .=
'&search_date_endmonth='.urlencode((
string) ($search_date_endmonth));
286if ($search_date_endyear) {
287 $param .=
'&search_date_endyear='.urlencode((
string) ($search_date_endyear));
289if ($search_company) {
290 $param .=
'&search_company='.urlencode($search_company);
292if ($search_amount !=
'') {
293 $param .=
'&search_amount='.urlencode($search_amount);
295if ($search_paymenttype) {
296 $param .=
'&search_paymenttype='.urlencode($search_paymenttype);
298if ($search_account) {
299 $param .=
'&search_account='.urlencode((
string) ($search_account));
301if ($search_payment_num) {
302 $param .=
'&search_payment_num='.urlencode($search_payment_num);
304if ($optioncss !=
'') {
305 $param .=
'&optioncss='.urlencode($optioncss);
308print
'<form method="POST" action="'.$_SERVER[
"PHP_SELF"].
'">';
309if ($optioncss !=
'') {
310 print
'<input type="hidden" name="optioncss" value="'.$optioncss.
'">';
312print
'<input type="hidden" name="token" value="'.newToken().
'">';
313print
'<input type="hidden" name="action" value="list">';
314print
'<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
315print
'<input type="hidden" name="sortfield" value="'.$sortfield.
'">';
316print
'<input type="hidden" name="sortorder" value="'.$sortorder.
'">';
317print
'<input type="hidden" name="contextpage" value="'.$contextpage.
'">';
320print_barre_liste($langs->trans(
"DonationPayments"), $page, $_SERVER[
"PHP_SELF"], $param, $sortfield, $sortorder,
'', $num, $nbtotalofrecords,
'bill', 0,
'',
'', $limit, 0, 0, 1);
323 foreach ($fieldstosearchall as $key => $val) {
324 $fieldstosearchall[$key] = $langs->trans($val);
326 print
'<div class="divsearchfieldfilter">'.$langs->trans(
"FilterOnInto", $search_all).implode(
', ', $fieldstosearchall).
'</div>';
329$varpage = empty($contextpage) ? $_SERVER[
"PHP_SELF"] : $contextpage;
330$selectedfields = $form->multiSelectArrayWithCheckbox(
'selectedfields', $arrayfields, $varpage,
getDolGlobalString(
'MAIN_CHECKBOX_LEFT_COLUMN'));
331$massactionbutton =
'';
332if ($massactionbutton) {
333 $selectedfields .= $form->showCheckAddButtons(
'checkforselect', 1);
337print
'<div class="div-table-responsive">';
338print
'<table class="tagtable nobottomiftotal liste'.($moreforfilter ?
" listwithfilterbefore" :
'').
'">';
342print
'<tr class="liste_titre_filter">';
345 print
'<td class="liste_titre center maxwidthsearch">';
346 $searchpicto = $form->showFilterButtons(
'left');
352 print
'<td class="liste_titre">';
356if (!empty($arrayfields[
'pd.rowid'][
'checked'])) {
357 print
'<td class="liste_titre left">';
358 print
'<input class="flat" type="text" size="4" name="search_ref" value="'.dol_escape_htmltag($search_ref).
'">';
363if (!empty($arrayfields[
'pd.datep'][
'checked'])) {
364 print
'<td class="liste_titre">';
365 print
'<div class="nowrapfordate">';
366 print $form->selectDate($search_date_start ? $search_date_start : -1,
'search_date_start', 0, 0, 1,
'', 1, 0, 0,
'',
'',
'',
'', 1,
'', $langs->trans(
'From'));
368 print
'<div class="nowrapfordate">';
369 print $form->selectDate($search_date_end ? $search_date_end : -1,
'search_date_end', 0, 0, 1,
'', 1, 0, 0,
'',
'',
'',
'', 1,
'', $langs->trans(
'to'));
375if (!empty($arrayfields[
's.nom'][
'checked'])) {
376 print
'<td class="liste_titre">';
377 print
'<input class="flat" type="text" size="6" name="search_company" value="'.dol_escape_htmltag($search_company).
'">';
382if (!empty($arrayfields[
'c.code'][
'checked'])) {
383 print
'<td class="liste_titre">';
384 print $form->select_types_paiements($search_paymenttype,
'search_paymenttype',
'', 2, 1, 1, 0, 1,
'maxwidth100', 1);
389if (!empty($arrayfields[
'transaction'][
'checked'])) {
390 print
'<td class="liste_titre">';
391 print
'<input class="flat" type="text" size="4" name="search_payment_num" value="'.dol_escape_htmltag($search_payment_num).
'">';
396if (!empty($arrayfields[
'pd.num_paiement'][
'checked'])) {
397 print
'<td class="liste_titre">';
402if (!empty($arrayfields[
'ba.label'][
'checked'])) {
403 print
'<td class="liste_titre">';
404 $form->select_comptes($search_account,
'search_account', 0,
'', 1);
409if (!empty($arrayfields[
'pd.amount'][
'checked'])) {
410 print
'<td class="liste_titre right">';
411 print
'<input class="flat" type="text" size="6" name="search_amount" value="'.dol_escape_htmltag($search_amount).
'">';
416$parameters = array(
'arrayfields' => $arrayfields);
417$reshook = $hookmanager->executeHooks(
'printFieldListOption', $parameters, $object, $action);
418print $hookmanager->resPrint;
422 print
'<td class="liste_titre center maxwidthsearch">';
423 $searchpicto = $form->showFilterButtons();
430$totalarray = array();
431$totalarray[
'nbfield'] = 0;
435print
'<tr class="liste_titre">';
438 print_liste_field_titre($selectedfields, $_SERVER[
"PHP_SELF"],
"",
'',
'',
'align="center"', $sortfield, $sortorder,
'maxwidthsearch ');
439 $totalarray[
'nbfield']++;
443 $totalarray[
'nbfield']++;
445if (!empty($arrayfields[
'pd.rowid'][
'checked'])) {
447 print_liste_field_titre($arrayfields[
'pd.rowid'][
'label'], $_SERVER[
"PHP_SELF"],
"pd.rowid",
'', $param,
'', $sortfield, $sortorder);
448 $totalarray[
'nbfield']++;
450if (!empty($arrayfields[
'pd.datep'][
'checked'])) {
451 print_liste_field_titre($arrayfields[
'pd.datep'][
'label'], $_SERVER[
"PHP_SELF"],
"pd.datep",
'', $param,
'', $sortfield, $sortorder);
452 $totalarray[
'nbfield']++;
454if (!empty($arrayfields[
's.nom'][
'checked'])) {
455 print_liste_field_titre($arrayfields[
's.nom'][
'label'], $_SERVER[
"PHP_SELF"],
"s.nom",
'', $param,
'', $sortfield, $sortorder);
456 $totalarray[
'nbfield']++;
458if (!empty($arrayfields[
'c.code'][
'checked'])) {
459 print_liste_field_titre($arrayfields[
'c.code'][
'label'], $_SERVER[
"PHP_SELF"],
"c.code",
'', $param,
'', $sortfield, $sortorder);
460 $totalarray[
'nbfield']++;
462if (!empty($arrayfields[
'pd.num_paiement'][
'checked'])) {
463 print_liste_field_titre($arrayfields[
'pd.num_paiement'][
'label'], $_SERVER[
"PHP_SELF"],
"pd.num_payment",
'', $param,
'', $sortfield, $sortorder,
'', $arrayfields[
'p.num_paiement'][
'tooltip']);
464 $totalarray[
'nbfield']++;
466if (!empty($arrayfields[
'transaction'][
'checked'])) {
467 print_liste_field_titre($arrayfields[
'transaction'][
'label'], $_SERVER[
"PHP_SELF"],
'',
'', $param,
'', $sortfield, $sortorder);
468 $totalarray[
'nbfield']++;
470if (!empty($arrayfields[
'ba.label'][
'checked'])) {
471 print_liste_field_titre($arrayfields[
'ba.label'][
'label'], $_SERVER[
"PHP_SELF"],
"ba.label",
'', $param,
'', $sortfield, $sortorder);
472 $totalarray[
'nbfield']++;
474if (!empty($arrayfields[
'pd.amount'][
'checked'])) {
475 print_liste_field_titre($arrayfields[
'pd.amount'][
'label'], $_SERVER[
"PHP_SELF"],
"pd.amount",
'', $param,
'', $sortfield, $sortorder,
'right ');
476 $totalarray[
'nbfield']++;
480include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_search_title.tpl.php';
482$parameters = array(
'arrayfields' => $arrayfields,
'param' => $param,
'sortfield' => $sortfield,
'sortorder' => $sortorder);
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']++;
493$needToFetchEachLine = 0;
494if (isset($extrafields->attributes[
$object->table_element][
'computed']) && is_array($extrafields->attributes[
$object->table_element][
'computed']) && count($extrafields->attributes[
$object->table_element][
'computed']) > 0) {
495 foreach ($extrafields->attributes[
$object->table_element][
'computed'] as $key => $val) {
496 if (!is_null($val) && preg_match(
'/\$object/', $val)) {
497 $needToFetchEachLine++;
505$savnbfield = $totalarray[
'nbfield'];
506$totalarray = array();
507$totalarray[
'nbfield'] = 0;
508$imaxinloop = ($limit ? min($num, $limit) : $num);
509while ($i < $imaxinloop) {
510 $obj = $db->fetch_object($resql);
512 $companystatic->id = $obj->soc_id;
513 $companystatic->name = $obj->nom;
516 $result = $company->fetch($obj->socid);
518 print
'<tr class="oddeven">';
520 print
'<td class="nowrap center">';
521 if ($massactionbutton || $massaction) {
523 if (in_array($obj->id_paiement, $arrayofselected)) {
526 print
'<input id="cb'.$obj->id_paiement.
'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$obj->id_paiement.
'"'.($selected ?
' checked="checked"' :
'').
'>';
530 $totalarray[
'nbfield']++;
535 if (!empty($arrayfields[
'pd.rowid'][
'checked'])) {
536 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>';
538 $totalarray[
'nbfield']++;
543 if (!empty($arrayfields[
'pd.datep'][
'checked'])) {
544 $dateformatforpayment =
'dayhour';
545 print
'<td class="nowraponall">'.dol_print_date($db->jdate($obj->datep), $dateformatforpayment,
'tzuser').
'</td>';
547 $totalarray[
'nbfield']++;
552 if (!empty($arrayfields[
's.nom'][
'checked'])) {
553 print
'<td class="nowraponall">';
554 if ($obj->soc_id > 0) {
555 print $companystatic->getNomUrl(1,
'', 24);
557 print $donationstatic->societe = $obj->societe;
561 $totalarray[
'nbfield']++;
566 if (!empty($arrayfields[
'c.code'][
'checked'])) {
567 print
'<td>'.$langs->trans(
"PaymentTypeShort".$obj->paiement_code).
'</td>';
569 $totalarray[
'nbfield']++;
574 if (!empty($arrayfields[
'pd.num_paiement'][
'checked'])) {
575 print
'<td>'.$obj->num_payment.
'</td>';
577 $totalarray[
'nbfield']++;
582 if (!empty($arrayfields[
'transaction'][
'checked'])) {
583 print
'<td class="tdoverflowmax125">';
584 if ($obj->fk_bank > 0) {
585 $test = $bankline->fetch($obj->fk_bank);
586 print $bankline->getNomUrl(1, 0);
590 $totalarray[
'nbfield']++;
595 if (!empty($arrayfields[
'ba.label'][
'checked'])) {
598 $accountstatic->id = $obj->bid;
599 $accountstatic->ref = $obj->bref;
600 $accountstatic->label = $obj->blabel;
601 $accountstatic->number = $obj->number;
602 $accountstatic->account_number = $obj->account_number;
605 $accountingjournal->fetch($obj->accountancy_journal);
606 $accountstatic->accountancy_journal = $accountingjournal->code;
608 print $accountstatic->getNomUrl(1);
611 $totalarray[
'nbfield']++;
616 if (!empty($arrayfields[
'pd.amount'][
'checked'])) {
617 print
'<td class="right"><span class="amount">' .
price($obj->amount) .
'</span></td>';
619 $totalarray[
'nbfield']++;
620 $totalarray[
'pos'][$totalarray[
'nbfield']] =
'amount';
622 if (empty($totalarray[
'val'][
'amount'])) {
623 $totalarray[
'val'][
'amount'] = $obj->amount;
625 $totalarray[
'val'][
'amount'] += $obj->amount;
633include DOL_DOCUMENT_ROOT.
'/core/tpl/list_print_total.tpl.php';
638 foreach ($arrayfields as $key => $val) {
639 if (!empty($val[
'checked'])) {
643 print
'<tr><td colspan="'.$colspan.
'"><span class="opacitymedium">'.$langs->trans(
"NoRecordFound").
'</span></td></tr>';
648$parameters = array(
'arrayfields' => $arrayfields,
'sql' => $sql);
649$reshook = $hookmanager->executeHooks(
'printFieldListFooter', $parameters, $object, $action);
650print $hookmanager->resPrint;
652print
'</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.
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.
print_barre_liste($title, $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.
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.
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.