38require
'../../main.inc.php';
39require_once DOL_DOCUMENT_ROOT.
'/fourn/class/paiementfourn.class.php';
40require_once DOL_DOCUMENT_ROOT.
'/compta/bank/class/account.class.php';
41require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formother.class.php';
42require_once DOL_DOCUMENT_ROOT.
'/core/lib/date.lib.php';
43require_once DOL_DOCUMENT_ROOT.
'/accountancy/class/accountingjournal.class.php';
46$langs->loadLangs(array(
'companies',
'bills',
'banks',
'compta'));
48$action =
GETPOST(
'action',
'alpha');
49$massaction =
GETPOST(
'massaction',
'alpha');
50$optioncss =
GETPOST(
'optioncss',
'alpha');
51$contextpage =
GETPOST(
'contextpage',
'aZ') ?
GETPOST(
'contextpage',
'aZ') :
'vendorpaymentlist';
56$search_ref =
GETPOST(
'search_ref',
'alpha');
57$search_date_startday =
GETPOSTINT(
'search_date_startday');
58$search_date_startmonth =
GETPOSTINT(
'search_date_startmonth');
59$search_date_startyear =
GETPOSTINT(
'search_date_startyear');
60$search_date_endday =
GETPOSTINT(
'search_date_endday');
61$search_date_endmonth =
GETPOSTINT(
'search_date_endmonth');
62$search_date_endyear =
GETPOSTINT(
'search_date_endyear');
63$search_date_start =
dol_mktime(0, 0, 0, $search_date_startmonth, $search_date_startday, $search_date_startyear);
64$search_date_end =
dol_mktime(23, 59, 59, $search_date_endmonth, $search_date_endday, $search_date_endyear);
65$search_company =
GETPOST(
'search_company',
'alpha');
66$search_payment_type =
GETPOST(
'search_payment_type',
'alpha');
67$search_cheque_num =
GETPOST(
'search_cheque_num',
'alpha');
68$search_bank_account =
GETPOST(
'search_bank_account',
'int');
69$search_amount =
GETPOST(
'search_amount',
'alpha');
73$sortfield =
GETPOST(
'sortfield',
'aZ09comma');
74$sortorder =
GETPOST(
'sortorder',
'aZ09comma');
75$page = GETPOSTISSET(
'pageplusone') ? (
GETPOST(
'pageplusone') - 1) :
GETPOSTINT(
'page');
77if (empty($page) || $page == -1) {
80$offset = $limit * $page;
88 $sortfield =
"p.datep";
91$search_all = trim(GETPOSTISSET(
"search_all") ?
GETPOST(
"search_all",
'alpha') :
GETPOST(
'sall'));
94$fieldstosearchall = array(
95 'p.ref' =>
"RefPayment",
96 's.nom' =>
"ThirdParty",
97 'p.num_paiement' =>
"Numero",
98 'p.amount' =>
"Amount",
102 'p.ref' => array(
'label' =>
"RefPayment",
'checked' => 1,
'position' => 10),
103 'p.datep' => array(
'label' =>
"Date",
'checked' => 1,
'position' => 20),
104 's.nom' => array(
'label' =>
"ThirdParty",
'checked' => 1,
'position' => 30),
105 'c.libelle' => array(
'label' =>
"Type",
'checked' => 1,
'position' => 40),
106 'p.num_paiement' => array(
'label' =>
"Numero",
'checked' => 1,
'position' => 50,
'tooltip' =>
"ChequeOrTransferNumber"),
107 'ba.label' => array(
'label' =>
"BankAccount",
'checked' => 1,
'position' => 60,
'enable' => (isModEnabled(
"bank"))),
108 'p.amount' => array(
'label' =>
"Amount",
'checked' => 1,
'position' => 70),
111'@phan-var-force array<string,array{label:string,checked?:int<0,1>,position?:int,help?:string}> $arrayfields';
114$hookmanager->initHooks(array(
'paymentsupplierlist'));
117if (!$user->hasRight(
'societe',
'client',
'voir')) {
118 $search_sale = $user->id;
123 $socid = $user->socid;
132if (!isModEnabled(
'supplier_invoice')) {
135if ((!$user->hasRight(
"fournisseur",
"facture",
"lire") && !
getDolGlobalString(
'MAIN_USE_NEW_SUPPLIERMOD'))
136 || (!$user->hasRight(
"supplier_invoice",
"lire") &&
getDolGlobalString(
'MAIN_USE_NEW_SUPPLIERMOD'))) {
145$parameters = array(
'socid' => $socid);
146$reshook = $hookmanager->executeHooks(
'doActions', $parameters, $object, $action);
151if (empty($reshook)) {
152 include DOL_DOCUMENT_ROOT.
'/core/actions_changeselectedfields.inc.php';
154 if (
GETPOST(
'button_removefilter_x',
'alpha') ||
GETPOST(
'button_removefilter.x',
'alpha') ||
GETPOST(
'button_removefilter',
'alpha')) {
156 $search_date_startday =
'';
157 $search_date_startmonth =
'';
158 $search_date_startyear =
'';
159 $search_date_endday =
'';
160 $search_date_endmonth =
'';
161 $search_date_endyear =
'';
162 $search_date_start =
'';
163 $search_date_end =
'';
164 $search_company =
'';
165 $search_payment_type =
'';
166 $search_cheque_num =
'';
167 $search_bank_account =
'';
171 $search_array_options = array();
178$title = $langs->trans(
'ListPayment');
181llxHeader(
'', $title, $help_url,
'', 0, 0,
'',
'',
'',
'bodyforlist');
183$form =
new Form($db);
185$accountstatic =
new Account($db);
186$companystatic =
new Societe($db);
189$sql =
'SELECT p.rowid, p.ref, p.datep, p.fk_bank, p.statut, p.num_paiement as num_payment, p.amount';
190$sql .=
', c.code as paiement_type, c.libelle as paiement_libelle';
191$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';
192$sql .=
', s.rowid as socid, s.nom as name, s.email';
195$sql .=
", SUM(pf.amount) as totalamount, COUNT(f.rowid) as nbinvoices";
199$sql .=
' FROM '.MAIN_DB_PREFIX.
'paiementfourn AS p';
200$sql .=
' LEFT JOIN '.MAIN_DB_PREFIX.
'c_paiement AS c ON p.fk_paiement = c.id';
201$sql .=
' LEFT JOIN '.MAIN_DB_PREFIX.
'bank as b ON p.fk_bank = b.rowid';
202$sql .=
' LEFT JOIN '.MAIN_DB_PREFIX.
'bank_account as ba ON b.fk_account = ba.rowid';
204$sql .=
' LEFT JOIN '.MAIN_DB_PREFIX.
'paiementfourn_facturefourn AS pf ON p.rowid = pf.fk_paiementfourn';
205$sql .=
' LEFT JOIN '.MAIN_DB_PREFIX.
'facture_fourn AS f ON f.rowid = pf.fk_facturefourn';
206$sql .=
' LEFT JOIN '.MAIN_DB_PREFIX.
'societe AS s ON s.rowid = f.fk_soc';
208$sql .=
' WHERE f.entity IN ('.getEntity(
'supplier_invoice').
')';
210 $sql .=
" AND EXISTS (SELECT f.fk_soc FROM ".MAIN_DB_PREFIX.
"facture_fourn as f, ".MAIN_DB_PREFIX.
"paiementfourn_facturefourn as pf";
211 $sql .=
" WHERE p.rowid = pf.fk_paiementfourn AND pf.fk_facturefourn = f.rowid AND f.fk_soc = ".((int) $socid).
")";
218if ($search_date_start) {
219 $sql .=
" AND p.datep >= '" . $db->idate($search_date_start) .
"'";
221if ($search_date_end) {
222 $sql .=
" AND p.datep <= '" . $db->idate($search_date_end) .
"'";
225if ($search_company) {
228if ($search_payment_type !=
'') {
229 $sql .=
" AND c.code = '".$db->escape($search_payment_type).
"'";
231if ($search_cheque_num !=
'') {
235 $sql .=
" AND (".natural_search(
'p.amount', $search_amount, 1, 1);
240if ($search_bank_account > 0) {
241 $sql .=
' AND b.fk_account = '.((int) $search_bank_account);
244 $sql .=
natural_search(array_keys($fieldstosearchall), $search_all);
247if ($search_sale && $search_sale !=
'-1') {
248 if ($search_sale == -2) {
249 $sql .=
" AND NOT EXISTS (SELECT sc.fk_soc FROM ".MAIN_DB_PREFIX.
"societe_commerciaux as sc WHERE sc.fk_soc = f.fk_soc)";
250 } elseif ($search_sale > 0) {
251 $sql .=
" AND EXISTS (SELECT sc.fk_soc FROM ".MAIN_DB_PREFIX.
"societe_commerciaux as sc WHERE sc.fk_soc = f.fk_soc AND sc.fk_user = ".((int) $search_sale).
")";
256include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_search_sql.tpl.php';
258$sql .=
' GROUP BY p.rowid, p.ref, p.datep, p.fk_bank, p.statut, p.num_paiement, p.amount, s.rowid, s.nom, s.email, c.code, c.libelle,';
259$sql .=
' ba.rowid, ba.ref, ba.label, ba.number, ba.account_number, ba.iban_prefix, ba.bic, ba.currency_code, ba.fk_accountancy_journal';
262$nbtotalofrecords =
'';
265 $sqlforcount = preg_replace(
'/^'.preg_quote($sqlfields,
'/').
'/',
'SELECT COUNT(DISTINCT p.rowid) as nbtotalofrecords', $sql);
266 $sqlforcount = preg_replace(
'/GROUP BY .*$/',
'', $sqlforcount);
267 $resql = $db->query($sqlforcount);
269 $objforcount = $db->fetch_object($resql);
270 $nbtotalofrecords = $objforcount->nbtotalofrecords;
275 if (($page * $limit) > $nbtotalofrecords) {
283$sql .= $db->order($sortfield, $sortorder);
285 $sql .= $db->plimit($limit + 1, $offset);
289$resql = $db->query($sql);
297$num = $db->num_rows($resql);
301if (!empty($contextpage) && $contextpage != $_SERVER[
"PHP_SELF"]) {
302 $param .=
'&contextpage='.urlencode($contextpage);
304if ($limit > 0 && $limit != $conf->liste_limit) {
305 $param .=
'&limit='.((int) $limit);
307if ($optioncss !=
'') {
308 $param .=
'&optioncss='.urlencode($optioncss);
312 $param .=
'&search_ref='.urlencode($search_ref);
314if ($search_date_startday) {
315 $param .=
'&search_date_startday='.urlencode((
string) ($search_date_startday));
317if ($search_date_startmonth) {
318 $param .=
'&search_date_startmonth='.urlencode((
string) ($search_date_startmonth));
320if ($search_date_startyear) {
321 $param .=
'&search_date_startyear='.urlencode((
string) ($search_date_startyear));
323if ($search_date_endday) {
324 $param .=
'&search_date_endday='.urlencode((
string) ($search_date_endday));
326if ($search_date_endmonth) {
327 $param .=
'&search_date_endmonth='.urlencode((
string) ($search_date_endmonth));
329if ($search_date_endyear) {
330 $param .=
'&search_date_endyear='.urlencode((
string) ($search_date_endyear));
332if ($search_company) {
333 $param .=
'&search_company='.urlencode($search_company);
335if ($search_payment_type) {
336 $param .=
'&search_company='.urlencode($search_payment_type);
338if ($search_cheque_num) {
339 $param .=
'&search_cheque_num='.urlencode($search_cheque_num);
342 $param .=
'&search_amount='.urlencode($search_amount);
346include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_search_param.tpl.php';
348print
'<form method="POST" action="'.$_SERVER[
"PHP_SELF"].
'">';
349if ($optioncss !=
'') {
350 print
'<input type="hidden" name="optioncss" value="'.$optioncss.
'">';
352print
'<input type="hidden" name="token" value="'.newToken().
'">';
353print
'<input type="hidden" name="action" value="list">';
354print
'<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
355print
'<input type="hidden" name="sortfield" value="'.$sortfield.
'">';
356print
'<input type="hidden" name="sortorder" value="'.$sortorder.
'">';
357print
'<input type="hidden" name="contextpage" value="'.$contextpage.
'">';
360print_barre_liste($langs->trans(
'SupplierPayments'), $page, $_SERVER[
'PHP_SELF'], $param, $sortfield, $sortorder,
'', $num, $nbtotalofrecords,
'supplier_invoice', 0,
'',
'', $limit, 0, 0, 1);
363 foreach ($fieldstosearchall as $key => $val) {
364 $fieldstosearchall[$key] = $langs->trans($val);
366 print
'<div class="divsearchfieldfilter">'.$langs->trans(
"FilterOnInto", $search_all).implode(
', ', $fieldstosearchall).
'</div>';
371$parameters = array();
372$reshook = $hookmanager->executeHooks(
'printFieldPreListTitle', $parameters, $object, $action);
373if (empty($reshook)) {
374 $moreforfilter .= $hookmanager->resPrint;
376 $moreforfilter = $hookmanager->resPrint;
380 print
'<div class="liste_titre liste_titre_bydiv centpercent">';
381 print $moreforfilter;
385$varpage = empty($contextpage) ? $_SERVER[
"PHP_SELF"] : $contextpage;
386$selectedfields = $form->multiSelectArrayWithCheckbox(
'selectedfields', $arrayfields, $varpage,
getDolGlobalString(
'MAIN_CHECKBOX_LEFT_COLUMN'));
387if (!empty($massactionbutton)) {
388 $selectedfields .= $form->showCheckAddButtons(
'checkforselect', 1);
391print
'<div class="div-table-responsive">';
392print
'<table class="tagtable nobottomiftotal liste'.($moreforfilter ?
" listwithfilterbefore" :
'').
'">';
396print
'<tr class="liste_titre_filter">';
400 print
'<td class="liste_titre center maxwidthsearch">';
401 $searchpicto = $form->showFilterButtons(
'left');
408 print
'<td class="liste_titre">';
413if (!empty($arrayfields[
'p.ref'][
'checked'])) {
414 print
'<td class="liste_titre left">';
415 print
'<input class="flat" type="text" size="4" name="search_ref" value="'.dol_escape_htmltag($search_ref).
'">';
420if (!empty($arrayfields[
'p.datep'][
'checked'])) {
421 print
'<td class="liste_titre center">';
422 print
'<div class="nowrapfordate">';
423 print $form->selectDate($search_date_start ? $search_date_start : -1,
'search_date_start', 0, 0, 1,
'', 1, 0, 0,
'',
'',
'',
'', 1,
'', $langs->trans(
'From'));
425 print
'<div class="nowrapfordate">';
426 print $form->selectDate($search_date_end ? $search_date_end : -1,
'search_date_end', 0, 0, 1,
'', 1, 0, 0,
'',
'',
'',
'', 1,
'', $langs->trans(
'to'));
432if (!empty($arrayfields[
's.nom'][
'checked'])) {
433 print
'<td class="liste_titre">';
434 print
'<input class="flat" type="text" size="6" name="search_company" value="'.dol_escape_htmltag($search_company).
'">';
439if (!empty($arrayfields[
'c.libelle'][
'checked'])) {
440 print
'<td class="liste_titre">';
441 $form->select_types_paiements($search_payment_type,
'search_payment_type',
'', 2, 1, 1);
446if (!empty($arrayfields[
'p.num_paiement'][
'checked'])) {
447 print
'<td class="liste_titre">';
448 print
'<input class="flat" type="text" size="4" name="search_cheque_num" value="'.dol_escape_htmltag($search_cheque_num).
'">';
453if (!empty($arrayfields[
'ba.label'][
'checked'])) {
454 print
'<td class="liste_titre">';
455 $form->select_comptes($search_bank_account,
'search_bank_account', 0,
'', 1);
460if (!empty($arrayfields[
'p.amount'][
'checked'])) {
461 print
'<td class="liste_titre right">';
462 print
'<input class="flat" type="text" size="4" name="search_amount" value="'.dol_escape_htmltag($search_amount).
'">';
467$parameters = array(
'arrayfields' => $arrayfields);
468$reshook = $hookmanager->executeHooks(
'printFieldListOption', $parameters, $object, $action);
469print $hookmanager->resPrint;
473 print
'<td class="liste_titre center maxwidthsearch">';
474 $searchpicto = $form->showFilterButtons();
481$totalarray = array();
482$totalarray[
'nbfield'] = 0;
486print
'<tr class="liste_titre">';
489 print
getTitleFieldOfList($selectedfields, 0, $_SERVER[
"PHP_SELF"],
'',
'',
'',
'', $sortfield, $sortorder,
'center maxwidthsearch ').
"\n";
490 $totalarray[
'nbfield']++;
494 $totalarray[
'nbfield']++;
496if (!empty($arrayfields[
'p.ref'][
'checked'])) {
497 print_liste_field_titre($arrayfields[
'p.ref'][
'label'], $_SERVER[
"PHP_SELF"],
'p.rowid',
'', $param,
'', $sortfield, $sortorder);
498 $totalarray[
'nbfield']++;
500if (!empty($arrayfields[
'p.datep'][
'checked'])) {
501 print_liste_field_titre($arrayfields[
'p.datep'][
'label'], $_SERVER[
"PHP_SELF"],
'p.datep',
'', $param,
'', $sortfield, $sortorder,
'center ');
502 $totalarray[
'nbfield']++;
504if (!empty($arrayfields[
's.nom'][
'checked'])) {
505 print_liste_field_titre($arrayfields[
's.nom'][
'label'], $_SERVER[
"PHP_SELF"],
's.nom',
'', $param,
'', $sortfield, $sortorder);
506 $totalarray[
'nbfield']++;
508if (!empty($arrayfields[
'c.libelle'][
'checked'])) {
509 print_liste_field_titre($arrayfields[
'c.libelle'][
'label'], $_SERVER[
"PHP_SELF"],
'c.libelle',
'', $param,
'', $sortfield, $sortorder);
510 $totalarray[
'nbfield']++;
512if (!empty($arrayfields[
'p.num_paiement'][
'checked'])) {
513 print_liste_field_titre($arrayfields[
'p.num_paiement'][
'label'], $_SERVER[
"PHP_SELF"],
"p.num_paiement",
'', $param,
'', $sortfield, $sortorder,
'', $arrayfields[
'p.num_paiement'][
'tooltip']);
514 $totalarray[
'nbfield']++;
516if (!empty($arrayfields[
'ba.label'][
'checked'])) {
517 print_liste_field_titre($arrayfields[
'ba.label'][
'label'], $_SERVER[
"PHP_SELF"],
'ba.label',
'', $param,
'', $sortfield, $sortorder);
518 $totalarray[
'nbfield']++;
520if (!empty($arrayfields[
'p.amount'][
'checked'])) {
521 print_liste_field_titre($arrayfields[
'p.amount'][
'label'], $_SERVER[
"PHP_SELF"],
'p.amount',
'', $param,
'', $sortfield, $sortorder,
'right ');
522 $totalarray[
'nbfield']++;
526$parameters = array(
'arrayfields' => $arrayfields,
'param' => $param,
'sortfield' => $sortfield,
'sortorder' => $sortorder);
527$reshook = $hookmanager->executeHooks(
'printFieldListTitle', $parameters);
528print $hookmanager->resPrint;
532 print
getTitleFieldOfList($selectedfields, 0, $_SERVER[
"PHP_SELF"],
'',
'',
'',
'', $sortfield, $sortorder,
'center maxwidthsearch ').
"\n";
533 $totalarray[
'nbfield']++;
540$needToFetchEachLine = 0;
541if (isset($extrafields->attributes[
$object->table_element][
'computed']) && is_array($extrafields->attributes[
$object->table_element][
'computed']) && count($extrafields->attributes[
$object->table_element][
'computed']) > 0) {
542 foreach ($extrafields->attributes[
$object->table_element][
'computed'] as $key => $val) {
543 if (!is_null($val) && preg_match(
'/\$object/', $val)) {
544 $needToFetchEachLine++;
553$savnbfield = $totalarray[
'nbfield'];
554$totalarray = array();
555$totalarray[
'nbfield'] = 0;
556$imaxinloop = ($limit ? min($num, $limit) : $num);
557while ($i < $imaxinloop) {
558 $objp = $db->fetch_object($resql);
563 $paymentfournstatic->id = $objp->rowid;
564 $paymentfournstatic->ref = $objp->ref;
565 $paymentfournstatic->datepaye = $db->jdate($objp->datep);
566 $paymentfournstatic->amount = $objp->amount;
568 $companystatic->id = $objp->socid;
569 $companystatic->name = $objp->name;
570 $companystatic->email = $objp->email;
572 if ($mode ==
'kanban') {
574 print
'<tr class="trkanban"><td colspan="'.$savnbfield.
'">';
575 print
'<div class="box-flex-container kanban">';
579 if ($massactionbutton || $massaction) {
581 if (in_array(
$object->id, $arrayofselected)) {
586 print
$object->getKanbanView(
'', array(
'selected' => $selected));
587 if ($i == ($imaxinloop - 1)) {
594 print
'<tr data-rowid="'.$object->id.
'" class="oddeven">';
598 print
'<td class="nowrap center">';
599 if ($massactionbutton || $massaction) {
601 if (in_array(
$object->id, $arrayofselected)) {
604 print
'<input id="cb'.$object->id.
'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.
$object->id.
'"'.($selected ?
' checked="checked"' :
'').
'>';
608 $totalarray[
'nbfield']++;
614 print
'<td class="nowraponall">'.(($offset * $limit) + $i).
'</td>';
616 $totalarray[
'nbfield']++;
621 if (!empty($arrayfields[
'p.ref'][
'checked'])) {
622 print
'<td class="nowraponall">'.$paymentfournstatic->getNomUrl(1).
'</td>';
624 $totalarray[
'nbfield']++;
629 if (!empty($arrayfields[
'p.datep'][
'checked'])) {
630 $dateformatforpayment =
'dayhour';
631 print
'<td class="nowraponall center">'.dol_print_date($db->jdate($objp->datep), $dateformatforpayment).
'</td>';
633 $totalarray[
'nbfield']++;
638 if (!empty($arrayfields[
's.nom'][
'checked'])) {
639 print
'<td class="tdoverflowmax125">';
640 if ($objp->socid > 0) {
641 print $companystatic->getNomUrl(1,
'', 24);
645 $totalarray[
'nbfield']++;
650 if (!empty($arrayfields[
'c.libelle'][
'checked'])) {
651 $payment_type = $langs->trans(
"PaymentType".$objp->paiement_type) !=
"PaymentType".$objp->paiement_type ? $langs->trans(
"PaymentType".$objp->paiement_type) : $objp->paiement_libelle;
652 print
'<td>'.$payment_type.
' '.
dol_trunc($objp->num_payment, 32).
'</td>';
654 $totalarray[
'nbfield']++;
659 if (!empty($arrayfields[
'p.num_paiement'][
'checked'])) {
660 print
'<td>'.$objp->num_payment.
'</td>';
662 $totalarray[
'nbfield']++;
667 if (!empty($arrayfields[
'ba.label'][
'checked'])) {
668 print
'<td class="tdoverflowmax125">';
670 $accountstatic->id = $objp->bid;
671 $accountstatic->ref = $objp->bref;
672 $accountstatic->label = $objp->blabel;
673 $accountstatic->number = $objp->number;
674 $accountstatic->iban = $objp->iban_prefix;
675 $accountstatic->bic = $objp->bic;
676 $accountstatic->currency_code = $objp->currency_code;
677 $accountstatic->account_number = $objp->account_number;
680 $accountingjournal->fetch($objp->accountancy_journal);
681 $accountstatic->accountancy_journal = $accountingjournal->code;
683 print $accountstatic->getNomUrl(1);
687 $totalarray[
'nbfield']++;
692 if (!empty($arrayfields[
'p.amount'][
'checked'])) {
693 print
'<td class="right">';
694 if ($objp->nbinvoices > 1 || ($objp->totalamount && $objp->amount != $objp->totalamount)) {
695 print $form->textwithpicto(
'', $langs->trans(
"PaymentMadeForSeveralInvoices"));
697 print
'<span class="amount">'.price($objp->amount).
'</span>';
700 $totalarray[
'nbfield']++;
701 $totalarray[
'pos'][$totalarray[
'nbfield']] =
'amount';
703 if (empty($totalarray[
'val'][
'amount'])) {
704 $totalarray[
'val'][
'amount'] = $objp->amount;
706 $totalarray[
'val'][
'amount'] += $objp->amount;
711 print
'<td class="nowrap center">';
712 if ($massactionbutton || $massaction) {
714 if (in_array(
$object->id, $arrayofselected)) {
717 print
'<input id="cb'.$object->id.
'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.
$object->id.
'"'.($selected ?
' checked="checked"' :
'').
'>';
721 $totalarray[
'nbfield']++;
731include DOL_DOCUMENT_ROOT.
'/core/tpl/list_print_total.tpl.php';
736 foreach ($arrayfields as $key => $val) {
737 if (!empty($val[
'checked'])) {
741 print
'<tr><td colspan="'.$colspan.
'"><span class="opacitymedium">'.$langs->trans(
"NoRecordFound").
'</span></td></tr>';
746$parameters = array(
'arrayfields' => $arrayfields,
'sql' => $sql);
747$reshook = $hookmanager->executeHooks(
'printFieldListFooter', $parameters, $object, $action);
748print $hookmanager->resPrint;
750print
'</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()
Empty header.
Class to manage bank accounts.
Class to manage accounting journals.
Class to manage payments for supplier invoices.
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...
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...
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.
getTitleFieldOfList($name, $thead=0, $file="", $field="", $begin="", $moreparam="", $moreattrib="", $sortfield="", $sortorder="", $prefix="", $disablesortlink=0, $tooltip='', $forcenowrapcolumntitle=0)
Get 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.
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='', $noduplicate=0)
Set event messages in dol_events session object.
dol_print_error($db=null, $error='', $errors=null)
Displays error message system with all the information to facilitate the diagnosis and the escalation...
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.