';
+
+// Filter: Ref
+if (!empty($arrayfields['p.ref']['checked'])) {
+ print '| ';
+ print '';
+ print ' | ';
+}
+
+// Filter: Date
+if (!empty($arrayfields['p.datep']['checked'])) {
+ print '';
+ if (!empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) print '';
+ print '';
+ $formother->select_year($search_year ? $search_year : -1, 'search_year', 1, 20, 5);
+ print ' | ';
+}
+
+// Filter: Thirdparty
+if (!empty($arrayfields['s.nom']['checked'])) {
+ print '';
+ print '';
+ print ' | ';
+}
+
+// Filter: Payment type
+if (!empty($arrayfields['c.libelle']['checked'])) {
+ print '';
+ $form->select_types_paiements($search_payment_type, 'search_payment_type', '', 2, 1, 1);
+ print ' | ';
+}
+
+// Filter: Cheque number (fund transfer)
+if (!empty($arrayfields['p.num_paiement']['checked'])) {
+ print '';
+ print '';
+ print ' | ';
+}
+
+// Filter: Bank account
+if (!empty($arrayfields['ba.label']['checked'])) {
+ print '';
+ $form->select_comptes($search_bank_account, 'search_bank_account', 0, '', 1);
+ print ' | ';
+}
+
+// Filter: Amount
+if (!empty($arrayfields['p.amount']['checked'])) {
+ print '';
+ print '';
+ print ' | ';
+}
+
+// Fields from hook
+$parameters = array('arrayfields'=>$arrayfields);
+$reshook = $hookmanager->executeHooks('printFieldListOption', $parameters); // Note that $action and $object may have been modified by hook
+print $hookmanager->resPrint;
+
+// Buttons
+print '';
+print $form->showFilterAndCheckAddButtons(0);
+print ' | ';
+
+print '
';
+
+print '';
+
+ // No
+ if (!empty($conf->global->MAIN_VIEW_LINE_NUMBER_IN_LIST)) {
+ print '| '.(($offset * $limit) + $i).' | ';
+ if (!$i) $totalarray['nbfield']++;
+ }
+
+ // Ref
+ if (!empty($arrayfields['p.ref']['checked'])) {
+ print ''.$paymentfournstatic->getNomUrl(1).' | ';
+ if (!$i) $totalarray['nbfield']++;
+ }
+
+ // Date
+ if (!empty($arrayfields['p.datep']['checked'])) {
+ $dateformatforpayment = 'day';
+ if (!empty($conf->global->INVOICE_USE_HOURS_FOR_PAYMENT)) $dateformatforpayment = 'dayhour';
+ print ''.dol_print_date($db->jdate($objp->datep), $dateformatforpayment).' | ';
+ if (!$i) $totalarray['nbfield']++;
+ }
+
+ // Thirdparty
+ if (!empty($arrayfields['s.nom']['checked'])) {
+ print '';
+ if ($objp->socid > 0) {
+ print $companystatic->getNomUrl(1, '', 24);
+ }
+ print ' | ';
+ if (!$i) $totalarray['nbfield']++;
+ }
+
+ // Pyament type
+ if (!empty($arrayfields['c.libelle']['checked'])) {
+ $payment_type = $langs->trans("PaymentType".$objp->paiement_type) != ("PaymentType".$objp->paiement_type) ? $langs->trans("PaymentType".$objp->paiement_type) : $objp->paiement_libelle;
+ print ''.$payment_type.' '.dol_trunc($objp->num_paiement, 32).' | ';
+ if (!$i) $totalarray['nbfield']++;
+ }
+
+ // Cheque number (fund transfer)
+ if (!empty($arrayfields['p.num_paiement']['checked'])) {
+ print ''.$objp->num_paiement.' | ';
+ if (!$i) $totalarray['nbfield']++;
+ }
+
+ // Account
+ if (!empty($arrayfields['ba.label']['checked']))
+ {
+ print '';
+ if ($objp->bid) print ''.img_object($langs->trans("ShowAccount"), 'account').' '.dol_trunc($objp->label, 24).'';
+ else print ' ';
+ print ' | ';
+ if (!$i) $totalarray['nbfield']++;
+ }
+
+ // Amount
+ if (!empty($arrayfields['p.amount']['checked'])) {
+ print ''.price($objp->pamount).' | ';
+ if (!$i) $totalarray['nbfield']++;
+ $totalarray['pos'][$checkedCount] = 'amount';
+ $totalarray['val']['amount'] += $objp->pamount;
+ }
+
+ // Buttons
+ print ' | ';
+ if (!$i) $totalarray['nbfield']++;
+
+ print '
';
+ $i++;
+}
+
+// Show total line
+include DOL_DOCUMENT_ROOT.'/core/tpl/list_print_total.tpl.php';
+
+print '