';
+// Ref
+print '| ';
+print '';
+print ' | ';
+// Employee
+print '';
+print '';
+print ' | ';
+// Label
+print ' | ';
+// Date
+print '';
+print ' ';
+print $form->selectDate($search_date_start ? $search_date_start : -1, 'search_date_start', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('From'));
+print ' ';
+print '';
+print $form->selectDate($search_date_end ? $search_date_end : -1, 'search_date_end', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('to'));
+print ' ';
+print ' | ';
+// Type
+print '';
+$form->select_types_paiements($search_type_id, 'search_type_id', '', 0, 1, 1, 16);
+print ' | ';
+// Account
+if (!empty($conf->banque->enabled))
+{
print '';
- print '';
- print ' | ';
- // Label
- print ' | ';
- // Date
- print '';
- print ' ';
- print $form->selectDate($search_date_start ? $search_date_start : -1, 'search_date_start', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('From'));
- print ' ';
- print '';
- print $form->selectDate($search_date_end ? $search_date_end : -1, 'search_date_end', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('to'));
- print ' ';
+ $form->select_comptes($search_account, 'search_account', 0, '', 1);
print ' | ';
+}
+// Amount
+print ' | ';
+
+// Extra fields
+include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_input.tpl.php';
+
+// Fields from hook
+$parameters = array('arrayfields'=>$arrayfields);
+$reshook = $hookmanager->executeHooks('printFieldListOption', $parameters, $object); // Note that $action and $object may have been modified by hook
+print $hookmanager->resPrint;
+// Action column
+print '';
+$searchpicto = $form->showFilterButtons();
+print $searchpicto;
+print ' | ';
+print '
'."\n";
+
+
+// Fields title label
+// --------------------------------------------------------------------
+print '';
+
+ $userstatic->id = $obj->uid;
+ $userstatic->lastname = $obj->lastname;
+ $userstatic->firstname = $obj->firstname;
+ $userstatic->admin = $obj->admin;
+ $userstatic->login = $obj->login;
+ $userstatic->email = $obj->email;
+ $userstatic->socid = $obj->fk_soc;
+ $userstatic->statut = $obj->status;
+
+ $salstatic->id = $obj->rowid;
+ $salstatic->ref = $obj->rowid;
+
+ // Ref
+ print "| ".$salstatic->getNomUrl(1)." | \n";
+ if (!$i) $totalarray['nbfield']++;
+
+ // Employee
+ print "".$userstatic->getNomUrl(1)." | \n";
+ if (!$i) $totalarray['nbfield']++;
+
+ // Label payment
+ print "".dol_trunc($obj->label, 40)." | \n";
+ if (!$i) $totalarray['nbfield']++;
+
+ // Date payment
+ print ''.dol_print_date($db->jdate($obj->datep), 'day')." | \n";
+ if (!$i) $totalarray['nbfield']++;
+
// Type
- print '';
- $form->select_types_paiements($typeid, 'typeid', '', 0, 1, 1, 16);
- print ' | ';
+ print ''.$langs->trans("PaymentTypeShort".$obj->payment_code).' '.$obj->num_payment.' | ';
+ if (!$i) $totalarray['nbfield']++;
+
// Account
if (!empty($conf->banque->enabled))
{
- print '';
- $form->select_comptes($search_account, 'search_account', 0, '', 1);
- print ' | ';
- }
- // Amount
- print ' | ';
-
- print '';
- $searchpicto = $form->showFilterAndCheckAddButtons(0);
- print $searchpicto;
- print ' | ';
-
- print '
';
-
- $userstatic->id = $obj->uid;
- $userstatic->lastname = $obj->lastname;
- $userstatic->firstname = $obj->firstname;
- $userstatic->admin = $obj->admin;
- $userstatic->login = $obj->login;
- $userstatic->email = $obj->email;
- $userstatic->socid = $obj->fk_soc;
- $userstatic->statut = $obj->status;
-
- $salstatic->id = $obj->rowid;
- $salstatic->ref = $obj->rowid;
-
- // Ref
- print "| ".$salstatic->getNomUrl(1)." | \n";
- if (!$i) $totalarray['nbfield']++;
-
- // Employee
- print "".$userstatic->getNomUrl(1)." | \n";
- if (!$i) $totalarray['nbfield']++;
-
- // Label payment
- print "".dol_trunc($obj->label, 40)." | \n";
- if (!$i) $totalarray['nbfield']++;
-
- // Date payment
- print ''.dol_print_date($db->jdate($obj->datep), 'day')." | \n";
- if (!$i) $totalarray['nbfield']++;
-
- // Type
- print ''.$langs->trans("PaymentTypeShort".$obj->payment_code).' '.$obj->num_payment.' | ';
- if (!$i) $totalarray['nbfield']++;
-
- // Account
- if (!empty($conf->banque->enabled))
+ print '';
+ if ($obj->fk_bank > 0)
{
- print ' | ';
- if ($obj->fk_bank > 0)
+ //$accountstatic->fetch($obj->fk_bank);
+ $accountstatic->id = $obj->bid;
+ $accountstatic->ref = $obj->bref;
+ $accountstatic->number = $obj->bnumber;
+
+ if (!empty($conf->accounting->enabled))
{
- //$accountstatic->fetch($obj->fk_bank);
- $accountstatic->id = $obj->bid;
- $accountstatic->ref = $obj->bref;
- $accountstatic->number = $obj->bnumber;
+ $accountstatic->account_number = $obj->account_number;
- if (!empty($conf->accounting->enabled))
- {
- $accountstatic->account_number = $obj->account_number;
+ $accountingjournal = new AccountingJournal($db);
+ $accountingjournal->fetch($obj->fk_accountancy_journal);
- $accountingjournal = new AccountingJournal($db);
- $accountingjournal->fetch($obj->fk_accountancy_journal);
-
- $accountstatic->accountancy_journal = $accountingjournal->getNomUrl(0, 1, 1, '', 1);
- }
- $accountstatic->label = $obj->blabel;
- print $accountstatic->getNomUrl(1);
- } else print ' ';
- print ' | ';
- if (!$i) $totalarray['nbfield']++;
- }
-
- // Amount
- print ''.price($obj->amount).' | ';
+ $accountstatic->accountancy_journal = $accountingjournal->getNomUrl(0, 1, 1, '', 1);
+ }
+ $accountstatic->label = $obj->blabel;
+ print $accountstatic->getNomUrl(1);
+ } else print ' ';
+ print '';
if (!$i) $totalarray['nbfield']++;
- if (!$i) $totalarray['pos'][$totalarray['nbfield']] = 'totalttcfield';
- $totalarray['val']['totalttcfield'] += $obj->amount;
-
- print ' | ';
-
- if (!$i) $totalarray['nbfield']++;
-
- print "
\n";
-
- $i++;
}
- // Show total line
- include DOL_DOCUMENT_ROOT.'/core/tpl/list_print_total.tpl.php';
+ // Amount
+ print '