37require
'../../main.inc.php';
38require_once DOL_DOCUMENT_ROOT.
'/fourn/class/paiementfourn.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(
'companies',
'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';
52$socid =
GETPOST(
'socid',
'int');
54$search_ref =
GETPOST(
'search_ref',
'alpha');
55$search_date_startday =
GETPOST(
'search_date_startday',
'int');
56$search_date_startmonth =
GETPOST(
'search_date_startmonth',
'int');
57$search_date_startyear =
GETPOST(
'search_date_startyear',
'int');
58$search_date_endday =
GETPOST(
'search_date_endday',
'int');
59$search_date_endmonth =
GETPOST(
'search_date_endmonth',
'int');
60$search_date_endyear =
GETPOST(
'search_date_endyear',
'int');
61$search_date_start =
dol_mktime(0, 0, 0, $search_date_startmonth, $search_date_startday, $search_date_startyear);
62$search_date_end =
dol_mktime(23, 59, 59, $search_date_endmonth, $search_date_endday, $search_date_endyear);
63$search_company =
GETPOST(
'search_company',
'alpha');
64$search_payment_type =
GETPOST(
'search_payment_type');
65$search_cheque_num =
GETPOST(
'search_cheque_num',
'alpha');
66$search_bank_account =
GETPOST(
'search_bank_account',
'int');
67$search_amount =
GETPOST(
'search_amount',
'alpha');
68$search_sale =
GETPOST(
'search_sale',
'int');
70$limit =
GETPOST(
'limit',
'int') ?
GETPOST(
'limit',
'int') : $conf->liste_limit;
71$sortfield =
GETPOST(
'sortfield',
'aZ09comma');
72$sortorder =
GETPOST(
'sortorder',
'aZ09comma');
73$page = GETPOSTISSET(
'pageplusone') ? (
GETPOST(
'pageplusone') - 1) :
GETPOST(
'page',
'int');
75if (empty($page) || $page == -1) {
78$offset = $limit * $page;
86 $sortfield =
"p.datep";
89$search_all = trim(GETPOSTISSET(
"search_all") ?
GETPOST(
"search_all",
'alpha') :
GETPOST(
'sall'));
92$fieldstosearchall = array(
93 'p.ref'=>
"RefPayment",
94 's.nom'=>
"ThirdParty",
95 'p.num_paiement'=>
"Numero",
100 'p.ref' =>array(
'label'=>
"RefPayment",
'checked'=>1,
'position'=>10),
101 'p.datep' =>array(
'label'=>
"Date",
'checked'=>1,
'position'=>20),
102 's.nom' =>array(
'label'=>
"ThirdParty",
'checked'=>1,
'position'=>30),
103 'c.libelle' =>array(
'label'=>
"Type",
'checked'=>1,
'position'=>40),
104 'p.num_paiement' =>array(
'label'=>
"Numero",
'checked'=>1,
'position'=>50,
'tooltip'=>
"ChequeOrTransferNumber"),
105 'ba.label' =>array(
'label'=>
"Account",
'checked'=>1,
'position'=>60,
'enable'=>(isModEnabled(
"banque"))),
106 'p.amount' =>array(
'label'=>
"Amount",
'checked'=>1,
'position'=>70),
111$hookmanager->initHooks(array(
'paymentsupplierlist'));
114if (!$user->hasRight(
'societe',
'client',
'voir')) {
115 $search_sale = $user->id;
120 $socid = $user->socid;
129if (!isModEnabled(
'supplier_invoice')) {
132if ((!$user->hasRight(
"fournisseur",
"facture",
"lire") && !
getDolGlobalString(
'MAIN_USE_NEW_SUPPLIERMOD'))
133 || (!$user->hasRight(
"supplier_invoice",
"lire") &&
getDolGlobalString(
'MAIN_USE_NEW_SUPPLIERMOD'))) {
142$parameters = array(
'socid'=>$socid);
143$reshook = $hookmanager->executeHooks(
'doActions', $parameters, $object, $action);
148if (empty($reshook)) {
149 include DOL_DOCUMENT_ROOT.
'/core/actions_changeselectedfields.inc.php';
151 if (
GETPOST(
'button_removefilter_x',
'alpha') ||
GETPOST(
'button_removefilter.x',
'alpha') ||
GETPOST(
'button_removefilter',
'alpha')) {
153 $search_date_startday =
'';
154 $search_date_startmonth =
'';
155 $search_date_startyear =
'';
156 $search_date_endday =
'';
157 $search_date_endmonth =
'';
158 $search_date_endyear =
'';
159 $search_date_start =
'';
160 $search_date_end =
'';
161 $search_company =
'';
162 $search_payment_type =
'';
163 $search_cheque_num =
'';
164 $search_bank_account =
'';
168 $search_array_options = array();
176llxHeader(
'', $langs->trans(
'ListPayment'));
178$form =
new Form($db);
180$accountstatic =
new Account($db);
181$companystatic =
new Societe($db);
184$sql =
'SELECT p.rowid, p.ref, p.datep, p.fk_bank, p.statut, p.num_paiement as num_payment, p.amount';
185$sql .=
', c.code as paiement_type, c.libelle as paiement_libelle';
186$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';
187$sql .=
', s.rowid as socid, s.nom as name, s.email';
190$sql .=
", SUM(pf.amount) as totalamount, COUNT(f.rowid) as nbinvoices";
194$sql .=
' FROM '.MAIN_DB_PREFIX.
'paiementfourn AS p';
195$sql .=
' LEFT JOIN '.MAIN_DB_PREFIX.
'c_paiement AS c ON p.fk_paiement = c.id';
196$sql .=
' LEFT JOIN '.MAIN_DB_PREFIX.
'bank as b ON p.fk_bank = b.rowid';
197$sql .=
' LEFT JOIN '.MAIN_DB_PREFIX.
'bank_account as ba ON b.fk_account = ba.rowid';
199$sql .=
' LEFT JOIN '.MAIN_DB_PREFIX.
'paiementfourn_facturefourn AS pf ON p.rowid = pf.fk_paiementfourn';
200$sql .=
' LEFT JOIN '.MAIN_DB_PREFIX.
'facture_fourn AS f ON f.rowid = pf.fk_facturefourn';
201$sql .=
' LEFT JOIN '.MAIN_DB_PREFIX.
'societe AS s ON s.rowid = f.fk_soc';
203$sql .=
' WHERE f.entity IN ('.getEntity(
'supplier_invoice').
')';
205 $sql .=
" AND EXISTS (SELECT f.fk_soc FROM ".MAIN_DB_PREFIX.
"facture_fourn as f, ".MAIN_DB_PREFIX.
"paiementfourn_facturefourn as pf";
206 $sql .=
" WHERE p.rowid = pf.fk_paiementfourn AND pf.fk_facturefourn = f.rowid AND f.fk_soc = ".((int) $socid).
")";
213if ($search_date_start) {
214 $sql .=
" AND p.datep >= '" . $db->idate($search_date_start) .
"'";
216if ($search_date_end) {
217 $sql .=
" AND p.datep <= '" . $db->idate($search_date_end) .
"'";
220if ($search_company) {
223if ($search_payment_type !=
'') {
224 $sql .=
" AND c.code = '".$db->escape($search_payment_type).
"'";
226if ($search_cheque_num !=
'') {
230 $sql .=
" AND (".natural_search(
'p.amount', $search_amount, 1, 1);
235if ($search_bank_account > 0) {
236 $sql .=
' AND b.fk_account = '.((int) $search_bank_account);
239 $sql .=
natural_search(array_keys($fieldstosearchall), $search_all);
242if ($search_sale && $search_sale !=
'-1') {
243 if ($search_sale == -2) {
244 $sql .=
" AND NOT EXISTS (SELECT sc.fk_soc FROM ".MAIN_DB_PREFIX.
"societe_commerciaux as sc WHERE sc.fk_soc = f.fk_soc)";
245 } elseif ($search_sale > 0) {
246 $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).
")";
251include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_search_sql.tpl.php';
253$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,';
254$sql .=
' ba.rowid, ba.ref, ba.label, ba.number, ba.account_number, ba.iban_prefix, ba.bic, ba.currency_code, ba.fk_accountancy_journal';
257$nbtotalofrecords =
'';
260 $sqlforcount = preg_replace(
'/^'.preg_quote($sqlfields,
'/').
'/',
'SELECT COUNT(DISTINCT p.rowid) as nbtotalofrecords', $sql);
261 $sqlforcount = preg_replace(
'/GROUP BY .*$/',
'', $sqlforcount);
262 $resql = $db->query($sqlforcount);
264 $objforcount = $db->fetch_object($resql);
265 $nbtotalofrecords = $objforcount->nbtotalofrecords;
270 if (($page * $limit) > $nbtotalofrecords) {
278$sql .= $db->order($sortfield, $sortorder);
280 $sql .= $db->plimit($limit + 1, $offset);
284$resql = $db->query($sql);
292$num = $db->num_rows($resql);
296if (!empty($contextpage) && $contextpage != $_SERVER[
"PHP_SELF"]) {
297 $param .=
'&contextpage='.urlencode($contextpage);
299if ($limit > 0 && $limit != $conf->liste_limit) {
300 $param .=
'&limit='.((int) $limit);
302if ($optioncss !=
'') {
303 $param .=
'&optioncss='.urlencode($optioncss);
307 $param .=
'&search_ref='.urlencode($search_ref);
309if ($search_date_startday) {
310 $param .=
'&search_date_startday='.urlencode($search_date_startday);
312if ($search_date_startmonth) {
313 $param .=
'&search_date_startmonth='.urlencode($search_date_startmonth);
315if ($search_date_startyear) {
316 $param .=
'&search_date_startyear='.urlencode($search_date_startyear);
318if ($search_date_endday) {
319 $param .=
'&search_date_endday='.urlencode($search_date_endday);
321if ($search_date_endmonth) {
322 $param .=
'&search_date_endmonth='.urlencode($search_date_endmonth);
324if ($search_date_endyear) {
325 $param .=
'&search_date_endyear='.urlencode($search_date_endyear);
327if ($search_company) {
328 $param .=
'&search_company='.urlencode($search_company);
330if ($search_payment_type) {
331 $param .=
'&search_company='.urlencode($search_payment_type);
333if ($search_cheque_num) {
334 $param .=
'&search_cheque_num='.urlencode($search_cheque_num);
337 $param .=
'&search_amount='.urlencode($search_amount);
341include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_search_param.tpl.php';
343print
'<form method="POST" action="'.$_SERVER[
"PHP_SELF"].
'">';
344if ($optioncss !=
'') {
345 print
'<input type="hidden" name="optioncss" value="'.$optioncss.
'">';
347print
'<input type="hidden" name="token" value="'.newToken().
'">';
348print
'<input type="hidden" name="action" value="list">';
349print
'<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
350print
'<input type="hidden" name="sortfield" value="'.$sortfield.
'">';
351print
'<input type="hidden" name="sortorder" value="'.$sortorder.
'">';
352print
'<input type="hidden" name="contextpage" value="'.$contextpage.
'">';
354print_barre_liste($langs->trans(
'SupplierPayments'), $page, $_SERVER[
'PHP_SELF'], $param, $sortfield, $sortorder,
'', $num, $nbtotalofrecords,
'supplier_invoice', 0,
'',
'', $limit, 0, 0, 1);
357 foreach ($fieldstosearchall as $key => $val) {
358 $fieldstosearchall[$key] = $langs->trans($val);
360 print
'<div class="divsearchfieldfilter">'.$langs->trans(
"FilterOnInto", $search_all).join(
', ', $fieldstosearchall).
'</div>';
365$parameters = array();
366$reshook = $hookmanager->executeHooks(
'printFieldPreListTitle', $parameters);
367if (empty($reshook)) {
368 $moreforfilter .= $hookmanager->resPrint;
370 $moreforfilter = $hookmanager->resPrint;
374 print
'<div class="liste_titre liste_titre_bydiv centpercent">';
375 print $moreforfilter;
379$varpage = empty($contextpage) ? $_SERVER[
"PHP_SELF"] : $contextpage;
380$selectedfields = $form->multiSelectArrayWithCheckbox(
'selectedfields', $arrayfields, $varpage,
getDolGlobalString(
'MAIN_CHECKBOX_LEFT_COLUMN',
''));
381if (!empty($massactionbutton)) {
382 $selectedfields .= $form->showCheckAddButtons(
'checkforselect', 1);
385print
'<div class="div-table-responsive">';
386print
'<table class="tagtable nobottomiftotal liste'.($moreforfilter ?
" listwithfilterbefore" :
'').
'">';
390print
'<tr class="liste_titre_filter">';
394 print
'<td class="liste_titre center maxwidthsearch">';
395 $searchpicto = $form->showFilterButtons(
'left');
402 print
'<td class="liste_titre">';
407if (!empty($arrayfields[
'p.ref'][
'checked'])) {
408 print
'<td class="liste_titre left">';
409 print
'<input class="flat" type="text" size="4" name="search_ref" value="'.dol_escape_htmltag($search_ref).
'">';
414if (!empty($arrayfields[
'p.datep'][
'checked'])) {
415 print
'<td class="liste_titre center">';
416 print
'<div class="nowrapfordate">';
417 print $form->selectDate($search_date_start ? $search_date_start : -1,
'search_date_start', 0, 0, 1,
'', 1, 0, 0,
'',
'',
'',
'', 1,
'', $langs->trans(
'From'));
419 print
'<div class="nowrapfordate">';
420 print $form->selectDate($search_date_end ? $search_date_end : -1,
'search_date_end', 0, 0, 1,
'', 1, 0, 0,
'',
'',
'',
'', 1,
'', $langs->trans(
'to'));
426if (!empty($arrayfields[
's.nom'][
'checked'])) {
427 print
'<td class="liste_titre">';
428 print
'<input class="flat" type="text" size="6" name="search_company" value="'.dol_escape_htmltag($search_company).
'">';
433if (!empty($arrayfields[
'c.libelle'][
'checked'])) {
434 print
'<td class="liste_titre">';
435 $form->select_types_paiements($search_payment_type,
'search_payment_type',
'', 2, 1, 1);
440if (!empty($arrayfields[
'p.num_paiement'][
'checked'])) {
441 print
'<td class="liste_titre">';
442 print
'<input class="flat" type="text" size="4" name="search_cheque_num" value="'.dol_escape_htmltag($search_cheque_num).
'">';
447if (!empty($arrayfields[
'ba.label'][
'checked'])) {
448 print
'<td class="liste_titre">';
449 $form->select_comptes($search_bank_account,
'search_bank_account', 0,
'', 1);
454if (!empty($arrayfields[
'p.amount'][
'checked'])) {
455 print
'<td class="liste_titre right">';
456 print
'<input class="flat" type="text" size="4" name="search_amount" value="'.dol_escape_htmltag($search_amount).
'">';
461$parameters = array(
'arrayfields'=>$arrayfields);
462$reshook = $hookmanager->executeHooks(
'printFieldListOption', $parameters, $object, $action);
463print $hookmanager->resPrint;
467 print
'<td class="liste_titre center maxwidthsearch">';
468 $searchpicto = $form->showFilterButtons();
475$totalarray = array();
476$totalarray[
'nbfield'] = 0;
480print
'<tr class="liste_titre">';
483 print
getTitleFieldOfList($selectedfields, 0, $_SERVER[
"PHP_SELF"],
'',
'',
'',
'', $sortfield, $sortorder,
'center maxwidthsearch ').
"\n";
484 $totalarray[
'nbfield']++;
488 $totalarray[
'nbfield']++;
490if (!empty($arrayfields[
'p.ref'][
'checked'])) {
491 print_liste_field_titre($arrayfields[
'p.ref'][
'label'], $_SERVER[
"PHP_SELF"],
'p.rowid',
'', $param,
'', $sortfield, $sortorder);
492 $totalarray[
'nbfield']++;
494if (!empty($arrayfields[
'p.datep'][
'checked'])) {
495 print_liste_field_titre($arrayfields[
'p.datep'][
'label'], $_SERVER[
"PHP_SELF"],
'p.datep',
'', $param,
'', $sortfield, $sortorder,
'center ');
496 $totalarray[
'nbfield']++;
498if (!empty($arrayfields[
's.nom'][
'checked'])) {
499 print_liste_field_titre($arrayfields[
's.nom'][
'label'], $_SERVER[
"PHP_SELF"],
's.nom',
'', $param,
'', $sortfield, $sortorder);
500 $totalarray[
'nbfield']++;
502if (!empty($arrayfields[
'c.libelle'][
'checked'])) {
503 print_liste_field_titre($arrayfields[
'c.libelle'][
'label'], $_SERVER[
"PHP_SELF"],
'c.libelle',
'', $param,
'', $sortfield, $sortorder);
504 $totalarray[
'nbfield']++;
506if (!empty($arrayfields[
'p.num_paiement'][
'checked'])) {
507 print_liste_field_titre($arrayfields[
'p.num_paiement'][
'label'], $_SERVER[
"PHP_SELF"],
"p.num_paiement",
'', $param,
'', $sortfield, $sortorder,
'', $arrayfields[
'p.num_paiement'][
'tooltip']);
508 $totalarray[
'nbfield']++;
510if (!empty($arrayfields[
'ba.label'][
'checked'])) {
511 print_liste_field_titre($arrayfields[
'ba.label'][
'label'], $_SERVER[
"PHP_SELF"],
'ba.label',
'', $param,
'', $sortfield, $sortorder);
512 $totalarray[
'nbfield']++;
514if (!empty($arrayfields[
'p.amount'][
'checked'])) {
515 print_liste_field_titre($arrayfields[
'p.amount'][
'label'], $_SERVER[
"PHP_SELF"],
'p.amount',
'', $param,
'', $sortfield, $sortorder,
'right ');
516 $totalarray[
'nbfield']++;
520$parameters = array(
'arrayfields'=>$arrayfields,
'param'=>$param,
'sortfield'=>$sortfield,
'sortorder'=>$sortorder);
521$reshook = $hookmanager->executeHooks(
'printFieldListTitle', $parameters);
522print $hookmanager->resPrint;
526 print
getTitleFieldOfList($selectedfields, 0, $_SERVER[
"PHP_SELF"],
'',
'',
'',
'', $sortfield, $sortorder,
'center maxwidthsearch ').
"\n";
527 $totalarray[
'nbfield']++;
534$needToFetchEachLine = 0;
535if (isset($extrafields->attributes[$object->table_element][
'computed']) && is_array($extrafields->attributes[$object->table_element][
'computed']) && count($extrafields->attributes[$object->table_element][
'computed']) > 0) {
536 foreach ($extrafields->attributes[$object->table_element][
'computed'] as $key => $val) {
537 if (!is_null($val) && preg_match(
'/\$object/', $val)) {
538 $needToFetchEachLine++;
547$savnbfield = $totalarray[
'nbfield'];
548$totalarray = array();
549$totalarray[
'nbfield'] = 0;
550$imaxinloop = ($limit ? min($num, $limit) : $num);
551while ($i < $imaxinloop) {
552 $objp = $db->fetch_object($resql);
557 $paymentfournstatic->id = $objp->rowid;
558 $paymentfournstatic->ref = $objp->ref;
559 $paymentfournstatic->datepaye = $db->jdate($objp->datep);
560 $paymentfournstatic->amount = $objp->amount;
562 $companystatic->id = $objp->socid;
563 $companystatic->name = $objp->name;
564 $companystatic->email = $objp->email;
566 if ($mode ==
'kanban') {
568 print
'<tr class="trkanban"><td colspan="'.$savnbfield.
'">';
569 print
'<div class="box-flex-container kanban">';
573 if ($massactionbutton || $massaction) {
575 if (in_array($object->id, $arrayofselected)) {
580 print $object->getKanbanView(
'', array(
'selected' => $selected));
581 if ($i == ($imaxinloop - 1)) {
588 print
'<tr data-rowid="'.$object->id.
'" class="oddeven">';
592 print
'<td class="nowrap center">';
593 if ($massactionbutton || $massaction) {
595 if (in_array($object->id, $arrayofselected)) {
598 print
'<input id="cb'.$object->id.
'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$object->id.
'"'.($selected ?
' checked="checked"' :
'').
'>';
602 $totalarray[
'nbfield']++;
608 print
'<td class="nowraponall">'.(($offset * $limit) + $i).
'</td>';
610 $totalarray[
'nbfield']++;
615 if (!empty($arrayfields[
'p.ref'][
'checked'])) {
616 print
'<td class="nowraponall">'.$paymentfournstatic->getNomUrl(1).
'</td>';
618 $totalarray[
'nbfield']++;
623 if (!empty($arrayfields[
'p.datep'][
'checked'])) {
624 $dateformatforpayment =
'dayhour';
625 print
'<td class="nowraponall center">'.dol_print_date($db->jdate($objp->datep), $dateformatforpayment).
'</td>';
627 $totalarray[
'nbfield']++;
632 if (!empty($arrayfields[
's.nom'][
'checked'])) {
633 print
'<td class="tdoverflowmax125">';
634 if ($objp->socid > 0) {
635 print $companystatic->getNomUrl(1,
'', 24);
639 $totalarray[
'nbfield']++;
644 if (!empty($arrayfields[
'c.libelle'][
'checked'])) {
645 $payment_type = $langs->trans(
"PaymentType".$objp->paiement_type) !=
"PaymentType".$objp->paiement_type ? $langs->trans(
"PaymentType".$objp->paiement_type) : $objp->paiement_libelle;
646 print
'<td>'.$payment_type.
' '.
dol_trunc($objp->num_payment, 32).
'</td>';
648 $totalarray[
'nbfield']++;
653 if (!empty($arrayfields[
'p.num_paiement'][
'checked'])) {
654 print
'<td>'.$objp->num_payment.
'</td>';
656 $totalarray[
'nbfield']++;
661 if (!empty($arrayfields[
'ba.label'][
'checked'])) {
662 print
'<td class="tdoverflowmax125">';
664 $accountstatic->id = $objp->bid;
665 $accountstatic->ref = $objp->bref;
666 $accountstatic->label = $objp->blabel;
667 $accountstatic->number = $objp->number;
668 $accountstatic->iban = $objp->iban_prefix;
669 $accountstatic->bic = $objp->bic;
670 $accountstatic->currency_code = $objp->currency_code;
671 $accountstatic->account_number = $objp->account_number;
674 $accountingjournal->fetch($objp->accountancy_journal);
675 $accountstatic->accountancy_journal = $accountingjournal->code;
677 print $accountstatic->getNomUrl(1);
681 $totalarray[
'nbfield']++;
686 if (!empty($arrayfields[
'p.amount'][
'checked'])) {
687 print
'<td class="right">';
688 if ($objp->nbinvoices > 1 || ($objp->totalamount && $objp->amount != $objp->totalamount)) {
689 print $form->textwithpicto(
'', $langs->trans(
"PaymentMadeForSeveralInvoices"));
691 print
'<span class="amount">'.price($objp->amount).
'</span>';
694 $totalarray[
'nbfield']++;
695 $totalarray[
'pos'][$totalarray[
'nbfield']] =
'amount';
697 if (empty($totalarray[
'val'][
'amount'])) {
698 $totalarray[
'val'][
'amount'] = $objp->amount;
700 $totalarray[
'val'][
'amount'] += $objp->amount;
705 print
'<td class="nowrap center">';
706 if ($massactionbutton || $massaction) {
708 if (in_array($object->id, $arrayofselected)) {
711 print
'<input id="cb'.$object->id.
'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$object->id.
'"'.($selected ?
' checked="checked"' :
'').
'>';
715 $totalarray[
'nbfield']++;
725include DOL_DOCUMENT_ROOT.
'/core/tpl/list_print_total.tpl.php';
730 foreach ($arrayfields as $key => $val) {
731 if (!empty($val[
'checked'])) {
735 print
'<tr><td colspan="'.$colspan.
'"><span class="opacitymedium">'.$langs->trans(
"NoRecordFound").
'</span></td></tr>';
740$parameters = array(
'arrayfields' => $arrayfields,
'sql' => $sql);
741$reshook = $hookmanager->executeHooks(
'printFieldListFooter', $parameters, $object, $action);
742print $hookmanager->resPrint;
744print
'</table>'.
"\n";
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 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...
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 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.
getTitleFieldOfList($name, $thead=0, $file="", $field="", $begin="", $moreparam="", $moreattrib="", $sortfield="", $sortorder="", $prefix="", $disablesortlink=0, $tooltip='', $forcenowrapcolumntitle=0)
Get 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.