address feedback + tooltip + reduce indent
This commit is contained in:
parent
8447817f8c
commit
33b7d06bb9
@ -63,16 +63,18 @@ $search_account = GETPOST("search_account", "int");
|
|||||||
$search_paymenttype = GETPOST("search_paymenttype");
|
$search_paymenttype = GETPOST("search_paymenttype");
|
||||||
$search_amount = GETPOST("search_amount", 'alpha'); // alpha because we must be able to search on "< x"
|
$search_amount = GETPOST("search_amount", 'alpha'); // alpha because we must be able to search on "< x"
|
||||||
$search_company = GETPOST("search_company", 'alpha');
|
$search_company = GETPOST("search_company", 'alpha');
|
||||||
|
$search_payment_num = GETPOST('search_payment_num', 'alpha');
|
||||||
|
|
||||||
$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit;
|
$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit;
|
||||||
$sortfield = GETPOST("sortfield", 'alpha');
|
$sortfield = GETPOST("sortfield", 'alpha');
|
||||||
$sortorder = GETPOST("sortorder", 'alpha');
|
$sortorder = GETPOST("sortorder", 'alpha');
|
||||||
$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int');
|
$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int');
|
||||||
|
|
||||||
if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1
|
if (empty($page) || $page == -1) $page = 0; // If $page is not defined, or '' or -1
|
||||||
$offset = $limit * $page;
|
$offset = $limit * $page;
|
||||||
$pageprev = $page - 1;
|
$pageprev = $page - 1;
|
||||||
$pagenext = $page + 1;
|
$pagenext = $page + 1;
|
||||||
|
|
||||||
if (!$sortorder) $sortorder = "DESC";
|
if (!$sortorder) $sortorder = "DESC";
|
||||||
if (!$sortfield) $sortfield = "p.rowid";
|
if (!$sortfield) $sortfield = "p.rowid";
|
||||||
|
|
||||||
@ -88,8 +90,9 @@ $arrayfields = array(
|
|||||||
'c.libelle' => array('label'=>"Type", 'checked'=>1, 'position'=>40),
|
'c.libelle' => array('label'=>"Type", 'checked'=>1, 'position'=>40),
|
||||||
'transaction' => array('label'=>"BankTransactionLine", 'checked'=>1, 'position'=>50, 'enabled'=>(!empty($conf->banque->enabled))),
|
'transaction' => array('label'=>"BankTransactionLine", 'checked'=>1, 'position'=>50, 'enabled'=>(!empty($conf->banque->enabled))),
|
||||||
'ba.label' => array('label'=>"Account", 'checked'=>1, 'position'=>60, 'enabled'=>(!empty($conf->banque->enabled))),
|
'ba.label' => array('label'=>"Account", 'checked'=>1, 'position'=>60, 'enabled'=>(!empty($conf->banque->enabled))),
|
||||||
'p.amount'=>array('label'=>"Amount", 'checked'=>1, 'position'=>70),
|
'p.num_payment' => array('label'=>"Numero", 'checked'=>1, 'position'=>70, 'tooltip'=>"ChequeOrTransferNumber"),
|
||||||
'p.statut'=>array('label'=>"Status", 'checked'=>1, 'position'=>80, 'enabled'=>(!empty($conf->global->BILL_ADD_PAYMENT_VALIDATION))),
|
'p.amount' => array('label'=>"Amount", 'checked'=>1, 'position'=>80),
|
||||||
|
'p.statut' => array('label'=>"Status", 'checked'=>1, 'position'=>90, 'enabled'=>(!empty($conf->global->BILL_ADD_PAYMENT_VALIDATION))),
|
||||||
);
|
);
|
||||||
|
|
||||||
$arrayfields = dol_sort_array($arrayfields, 'position');
|
$arrayfields = dol_sort_array($arrayfields, 'position');
|
||||||
@ -103,20 +106,22 @@ $reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action
|
|||||||
if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
|
if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
|
||||||
|
|
||||||
|
|
||||||
if(empty($reshook))
|
if(empty($reshook)) {
|
||||||
{
|
|
||||||
include DOL_DOCUMENT_ROOT.'/core/actions_changeselectedfields.inc.php';
|
include DOL_DOCUMENT_ROOT.'/core/actions_changeselectedfields.inc.php';
|
||||||
|
|
||||||
if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x', 'alpha') || GETPOST('button_removefilter', 'alpha')) // All tests are required to be compatible with all browsers
|
// All tests are required to be compatible with all browsers
|
||||||
{
|
if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x', 'alpha') || GETPOST('button_removefilter', 'alpha')) {
|
||||||
$search_ref = "";
|
$search_ref = '';
|
||||||
$search_account = "";
|
$search_account = '';
|
||||||
$search_amount = "";
|
$search_amount = '';
|
||||||
$search_paymenttype = "";
|
$search_paymenttype = '';
|
||||||
$search_company = "";
|
$search_payment_num = '';
|
||||||
|
$search_company = '';
|
||||||
$day = '';
|
$day = '';
|
||||||
$year = '';
|
$year = '';
|
||||||
$month = '';
|
$month = '';
|
||||||
|
$option = '';
|
||||||
|
$toselect = '';
|
||||||
$search_array_options = array();
|
$search_array_options = array();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -133,11 +138,11 @@ $bankline = new AccountLine($db);
|
|||||||
|
|
||||||
llxHeader('', $langs->trans('ListPayment'));
|
llxHeader('', $langs->trans('ListPayment'));
|
||||||
|
|
||||||
if (GETPOST("orphelins", "alpha"))
|
if (GETPOST("orphelins", "alpha")) {
|
||||||
{
|
|
||||||
// Payments not linked to an invoice. Should not happend. For debug only.
|
// Payments not linked to an invoice. Should not happend. For debug only.
|
||||||
$sql = "SELECT p.rowid, p.ref, p.datep, p.fk_bank, p.amount, p.statut";
|
$sql = "SELECT p.rowid, p.ref, p.datep, p.amount, p.statut, p.num_paiement as num_payment";
|
||||||
$sql .= ", c.code as paiement_code";
|
$sql .= ", c.code as paiement_code";
|
||||||
|
|
||||||
// Add fields from hooks
|
// Add fields from hooks
|
||||||
$parameters = array();
|
$parameters = array();
|
||||||
$reshook = $hookmanager->executeHooks('printFieldListSelect', $parameters); // Note that $action and $object may have been modified by hook
|
$reshook = $hookmanager->executeHooks('printFieldListSelect', $parameters); // Note that $action and $object may have been modified by hook
|
||||||
@ -146,18 +151,18 @@ if (GETPOST("orphelins", "alpha"))
|
|||||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."paiement_facture as pf ON p.rowid = pf.fk_paiement";
|
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."paiement_facture as pf ON p.rowid = pf.fk_paiement";
|
||||||
$sql .= " WHERE p.entity IN (".getEntity('invoice').")";
|
$sql .= " WHERE p.entity IN (".getEntity('invoice').")";
|
||||||
$sql .= " AND pf.fk_facture IS NULL";
|
$sql .= " AND pf.fk_facture IS NULL";
|
||||||
|
|
||||||
// Add where from hooks
|
// Add where from hooks
|
||||||
$parameters = array();
|
$parameters = array();
|
||||||
$reshook = $hookmanager->executeHooks('printFieldListWhere', $parameters); // Note that $action and $object may have been modified by hook
|
$reshook = $hookmanager->executeHooks('printFieldListWhere', $parameters); // Note that $action and $object may have been modified by hook
|
||||||
$sql .= $hookmanager->resPrint;
|
$sql .= $hookmanager->resPrint;
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
// DISTINCT is to avoid duplicate when there is a link to sales representatives
|
// DISTINCT is to avoid duplicate when there is a link to sales representatives
|
||||||
$sql = "SELECT DISTINCT p.rowid, p.ref, p.datep, p.fk_bank, p.amount, p.statut";
|
$sql = "SELECT DISTINCT p.rowid, p.ref, p.datep, p.fk_bank, p.amount, p.statut, p.num_paiement as num_payment";
|
||||||
$sql .= ", c.code as paiement_code";
|
$sql .= ", c.code as paiement_code";
|
||||||
$sql .= ", ba.rowid as bid, ba.ref as bref, ba.label as blabel, ba.number, ba.account_number as account_number, ba.fk_accountancy_journal as accountancy_journal";
|
$sql .= ", ba.rowid as bid, ba.ref as bref, ba.label as blabel, ba.number, ba.account_number as account_number, ba.fk_accountancy_journal as accountancy_journal";
|
||||||
$sql .= ", s.rowid as socid, s.nom as name, s.email";
|
$sql .= ", s.rowid as socid, s.nom as name, s.email";
|
||||||
|
|
||||||
// Add fields from hooks
|
// Add fields from hooks
|
||||||
$parameters = array();
|
$parameters = array();
|
||||||
$reshook = $hookmanager->executeHooks('printFieldListSelect', $parameters); // Note that $action and $object may have been modified by hook
|
$reshook = $hookmanager->executeHooks('printFieldListSelect', $parameters); // Note that $action and $object may have been modified by hook
|
||||||
@ -169,28 +174,30 @@ else
|
|||||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."paiement_facture as pf ON p.rowid = pf.fk_paiement";
|
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."paiement_facture as pf ON p.rowid = pf.fk_paiement";
|
||||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."facture as f ON pf.fk_facture = f.rowid";
|
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."facture as f ON pf.fk_facture = f.rowid";
|
||||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON f.fk_soc = s.rowid";
|
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON f.fk_soc = s.rowid";
|
||||||
if (!$user->rights->societe->client->voir && !$socid)
|
if (!$user->rights->societe->client->voir && !$socid) {
|
||||||
{
|
|
||||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON s.rowid = sc.fk_soc";
|
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON s.rowid = sc.fk_soc";
|
||||||
}
|
}
|
||||||
$sql .= " WHERE p.entity IN (".getEntity('invoice').")";
|
$sql .= " WHERE p.entity IN (".getEntity('invoice').")";
|
||||||
if (!$user->rights->societe->client->voir && !$socid)
|
if (!$user->rights->societe->client->voir && !$socid) {
|
||||||
{
|
|
||||||
$sql .= " AND sc.fk_user = ".$user->id;
|
$sql .= " AND sc.fk_user = ".$user->id;
|
||||||
}
|
}
|
||||||
if ($socid > 0) $sql .= " AND f.fk_soc = ".$socid;
|
if ($socid > 0) {
|
||||||
if ($userid)
|
$sql .= " AND f.fk_soc = ".$socid;
|
||||||
{
|
}
|
||||||
|
if ($userid) {
|
||||||
if ($userid == -1) $sql .= " AND f.fk_user_author IS NULL";
|
if ($userid == -1) $sql .= " AND f.fk_user_author IS NULL";
|
||||||
else $sql .= " AND f.fk_user_author = ".$userid;
|
else $sql .= " AND f.fk_user_author = ".$userid;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Search criteria
|
// Search criteria
|
||||||
$sql .= dolSqlDateFilter("p.datep", $day, $month, $year);
|
$sql .= dolSqlDateFilter("p.datep", $day, $month, $year);
|
||||||
if ($search_ref) $sql .= natural_search('p.ref', $search_ref);
|
if ($search_ref) $sql .= natural_search('p.ref', $search_ref);
|
||||||
if ($search_account > 0) $sql .= " AND b.fk_account=".$search_account;
|
if ($search_account > 0) $sql .= " AND b.fk_account=".$search_account;
|
||||||
if ($search_paymenttype != "") $sql .= " AND c.code='".$db->escape($search_paymenttype)."'";
|
if ($search_paymenttype != '') $sql .= " AND c.code='".$db->escape($search_paymenttype)."'";
|
||||||
|
if ($search_payment_num != '') $sql .= natural_search('p.num_paiement', $search_payment_num);
|
||||||
if ($search_amount) $sql .= natural_search('p.amount', $search_amount, 1);
|
if ($search_amount) $sql .= natural_search('p.amount', $search_amount, 1);
|
||||||
if ($search_company) $sql .= natural_search('s.nom', $search_company);
|
if ($search_company) $sql .= natural_search('s.nom', $search_company);
|
||||||
|
|
||||||
// Add where from hooks
|
// Add where from hooks
|
||||||
$parameters = array();
|
$parameters = array();
|
||||||
$reshook = $hookmanager->executeHooks('printFieldListWhere', $parameters); // Note that $action and $object may have been modified by hook
|
$reshook = $hookmanager->executeHooks('printFieldListWhere', $parameters); // Note that $action and $object may have been modified by hook
|
||||||
@ -199,12 +206,12 @@ else
|
|||||||
$sql .= $db->order($sortfield, $sortorder);
|
$sql .= $db->order($sortfield, $sortorder);
|
||||||
|
|
||||||
$nbtotalofrecords = '';
|
$nbtotalofrecords = '';
|
||||||
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
|
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) {
|
||||||
{
|
|
||||||
$result = $db->query($sql);
|
$result = $db->query($sql);
|
||||||
$nbtotalofrecords = $db->num_rows($result);
|
$nbtotalofrecords = $db->num_rows($result);
|
||||||
if (($page * $limit) > $nbtotalofrecords) // if total resultset is smaller then paging size (filtering), goto and load page 0
|
|
||||||
{
|
// if total resultset is smaller then paging size (filtering), goto and load page 0
|
||||||
|
if (($page * $limit) > $nbtotalofrecords) {
|
||||||
$page = 0;
|
$page = 0;
|
||||||
$offset = 0;
|
$offset = 0;
|
||||||
}
|
}
|
||||||
@ -213,17 +220,23 @@ if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
|
|||||||
$sql .= $db->plimit($limit + 1, $offset);
|
$sql .= $db->plimit($limit + 1, $offset);
|
||||||
|
|
||||||
$resql = $db->query($sql);
|
$resql = $db->query($sql);
|
||||||
if ($resql)
|
if (!$resql) {
|
||||||
{
|
dol_print_error($db);
|
||||||
|
llxFooter();
|
||||||
|
$db->close();
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
$num = $db->num_rows($resql);
|
$num = $db->num_rows($resql);
|
||||||
|
|
||||||
$param = '';
|
$param = '';
|
||||||
if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param .= '&contextpage='.urlencode($contextpage);
|
if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param .= '&contextpage='.urlencode($contextpage);
|
||||||
if ($limit > 0 && $limit != $conf->liste_limit) $param .= '&limit='.urlencode($limit);
|
if ($limit > 0 && $limit != $conf->liste_limit) $param .= '&limit='.urlencode($limit);
|
||||||
$param .= (GETPOST("orphelins") ? "&orphelins=1" : "");
|
$param .= (GETPOST("orphelins") ? "&orphelins=1" : '');
|
||||||
$param .= ($search_ref ? "&search_ref=".urlencode($search_ref) : "");
|
$param .= ($search_ref ? "&search_ref=".urlencode($search_ref) : '');
|
||||||
$param .= ($search_company ? "&search_company=".urlencode($search_company) : "");
|
$param .= ($search_company ? "&search_company=".urlencode($search_company) : '');
|
||||||
$param .= ($search_amount ? "&search_amount=".urlencode($search_amount) : "");
|
$param .= ($search_amount ? "&search_amount=".urlencode($search_amount) : '');
|
||||||
|
$param .= ($search_payment_num ? "&search_payment_num=".urlencode($search_payment_num) : '');
|
||||||
if ($optioncss != '') $param .= '&optioncss='.urlencode($optioncss);
|
if ($optioncss != '') $param .= '&optioncss='.urlencode($optioncss);
|
||||||
|
|
||||||
print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">';
|
print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">';
|
||||||
@ -243,7 +256,7 @@ if ($resql)
|
|||||||
if ($massactionbutton) $selectedfields .= $form->showCheckAddButtons('checkforselect', 1);
|
if ($massactionbutton) $selectedfields .= $form->showCheckAddButtons('checkforselect', 1);
|
||||||
|
|
||||||
print '<div class="div-table-responsive">';
|
print '<div class="div-table-responsive">';
|
||||||
print '<table class="tagtable liste'.($moreforfilter ? " listwithfilterbefore" : "").'">';
|
print '<table class="tagtable liste'.($moreforfilter ? " listwithfilterbefore" : '').'">';
|
||||||
|
|
||||||
print '<tr class="liste_titre_filter">';
|
print '<tr class="liste_titre_filter">';
|
||||||
|
|
||||||
@ -286,6 +299,13 @@ if ($resql)
|
|||||||
|
|
||||||
// Filter: Bank transaction number
|
// Filter: Bank transaction number
|
||||||
if (!empty($arrayfields['transaction']['checked'])) {
|
if (!empty($arrayfields['transaction']['checked'])) {
|
||||||
|
print '<td class="liste_titre">';
|
||||||
|
print '<input class="flat" type="text" size="4" name="search_payment_num" value="'.dol_escape_htmltag($search_payment_num).'">';
|
||||||
|
print '</td>';
|
||||||
|
}
|
||||||
|
|
||||||
|
// Filter: Cheque number (fund transfer)
|
||||||
|
if (!empty($arrayfields['p.num_payment']['checked'])) {
|
||||||
print '<td class="liste_titre">';
|
print '<td class="liste_titre">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
@ -323,28 +343,27 @@ if ($resql)
|
|||||||
|
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
if (!empty($conf->global->MAIN_VIEW_LINE_NUMBER_IN_LIST)) print_liste_field_titre('#', $_SERVER['PHP_SELF'], '', '', $param, '', $sortfield, $sortorder);
|
if (!empty($conf->global->MAIN_VIEW_LINE_NUMBER_IN_LIST)) print_liste_field_titre('#', $_SERVER['PHP_SELF'], '', '', $param, '', $sortfield, $sortorder);
|
||||||
if (!empty($arrayfields['p.rowid']['checked'])) print_liste_field_titre($arrayfields['p.rowid']['label'], $_SERVER["PHP_SELF"], "p.rowid", "", $param, "", $sortfield, $sortorder);
|
if (!empty($arrayfields['p.rowid']['checked'])) print_liste_field_titre($arrayfields['p.rowid']['label'], $_SERVER["PHP_SELF"], "p.rowid", '', $param, '', $sortfield, $sortorder);
|
||||||
if (!empty($arrayfields['p.datep']['checked'])) print_liste_field_titre($arrayfields['p.datep']['label'], $_SERVER["PHP_SELF"], "p.datep", "", $param, '', $sortfield, $sortorder, 'center ');
|
if (!empty($arrayfields['p.datep']['checked'])) print_liste_field_titre($arrayfields['p.datep']['label'], $_SERVER["PHP_SELF"], "p.datep", '', $param, '', $sortfield, $sortorder, 'center ');
|
||||||
if (!empty($arrayfields['s.nom']['checked'])) print_liste_field_titre($arrayfields['s.nom']['label'], $_SERVER["PHP_SELF"], "s.nom", "", $param, "", $sortfield, $sortorder);
|
if (!empty($arrayfields['s.nom']['checked'])) print_liste_field_titre($arrayfields['s.nom']['label'], $_SERVER["PHP_SELF"], "s.nom", '', $param, '', $sortfield, $sortorder);
|
||||||
if (!empty($arrayfields['c.libelle']['checked'])) print_liste_field_titre($arrayfields['c.libelle']['label'], $_SERVER["PHP_SELF"], "c.libelle", "", $param, "", $sortfield, $sortorder);
|
if (!empty($arrayfields['c.libelle']['checked'])) print_liste_field_titre($arrayfields['c.libelle']['label'], $_SERVER["PHP_SELF"], "c.libelle", '', $param, '', $sortfield, $sortorder);
|
||||||
if (!empty($arrayfields['transaction']['checked'])) print_liste_field_titre($arrayfields['transaction']['label'], $_SERVER["PHP_SELF"], "", "", $param, "", $sortfield, $sortorder);
|
if (!empty($arrayfields['p.num_payment']['checked'])) print_liste_field_titre($arrayfields['p.num_payment']['label'], $_SERVER["PHP_SELF"], "p.num_payment", '', $param, '', $sortfield, $sortorder, '', $arrayfields['p.num_payment']['tooltip']);
|
||||||
if (!empty($arrayfields['ba.label']['checked'])) print_liste_field_titre($arrayfields['ba.label']['label'], $_SERVER["PHP_SELF"], "ba.label", "", $param, "", $sortfield, $sortorder);
|
if (!empty($arrayfields['transaction']['checked'])) print_liste_field_titre($arrayfields['transaction']['label'], $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder);
|
||||||
if (!empty($arrayfields['p.amount']['checked'])) print_liste_field_titre($arrayfields['p.amount']['label'], $_SERVER["PHP_SELF"], "p.amount", "", $param, 'class="right"', $sortfield, $sortorder);
|
if (!empty($arrayfields['ba.label']['checked'])) print_liste_field_titre($arrayfields['ba.label']['label'], $_SERVER["PHP_SELF"], "ba.label", '', $param, '', $sortfield, $sortorder);
|
||||||
if (!empty($arrayfields['p.statut']['checked'])) print_liste_field_titre($arrayfields['p.statut']['label'], $_SERVER["PHP_SELF"], "p.statut", "", $param, 'class="right"', $sortfield, $sortorder);
|
if (!empty($arrayfields['p.amount']['checked'])) print_liste_field_titre($arrayfields['p.amount']['label'], $_SERVER["PHP_SELF"], "p.amount", '', $param, 'class="right"', $sortfield, $sortorder);
|
||||||
|
if (!empty($arrayfields['p.statut']['checked'])) print_liste_field_titre($arrayfields['p.statut']['label'], $_SERVER["PHP_SELF"], "p.statut", '', $param, 'class="right"', $sortfield, $sortorder);
|
||||||
|
|
||||||
// Hook fields
|
// Hook fields
|
||||||
$parameters = array('arrayfields'=>$arrayfields, 'param'=>$param, 'sortfield'=>$sortfield, 'sortorder'=>$sortorder);
|
$parameters = array('arrayfields'=>$arrayfields, 'param'=>$param, 'sortfield'=>$sortfield, 'sortorder'=>$sortorder);
|
||||||
$reshook = $hookmanager->executeHooks('printFieldListTitle', $parameters); // Note that $action and $object may have been modified by hook
|
$reshook = $hookmanager->executeHooks('printFieldListTitle', $parameters); // Note that $action and $object may have been modified by hook
|
||||||
print $hookmanager->resPrint;
|
print $hookmanager->resPrint;
|
||||||
|
|
||||||
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', 'align="center"', $sortfield, $sortorder, 'maxwidthsearch ');
|
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], '', '', '', 'align="center"', $sortfield, $sortorder, 'maxwidthsearch ');
|
||||||
|
|
||||||
print "</tr>";
|
print "</tr>";
|
||||||
|
|
||||||
$i = 0;
|
$i = 0;
|
||||||
$totalarray = array();
|
$totalarray = array();
|
||||||
while ($i < min($num, $limit))
|
while ($i < min($num, $limit)) {
|
||||||
{
|
|
||||||
$objp = $db->fetch_object($resql);
|
$objp = $db->fetch_object($resql);
|
||||||
|
|
||||||
$object->id = $objp->rowid;
|
$object->id = $objp->rowid;
|
||||||
@ -359,11 +378,12 @@ if ($resql)
|
|||||||
// No
|
// No
|
||||||
if (!empty($conf->global->MAIN_VIEW_LINE_NUMBER_IN_LIST)) {
|
if (!empty($conf->global->MAIN_VIEW_LINE_NUMBER_IN_LIST)) {
|
||||||
print '<td>'.(($offset * $limit) + $i).'</td>';
|
print '<td>'.(($offset * $limit) + $i).'</td>';
|
||||||
|
if (!$i) $totalarray['nbfield']++;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Ref
|
// Ref
|
||||||
if (!empty($arrayfields['p.rowid']['checked'])) {
|
if (!empty($arrayfields['p.rowid']['checked'])) {
|
||||||
print '<td>'.print $object->getNomUrl(1).'</td>';
|
print '<td>'.$object->getNomUrl(1).'</td>';
|
||||||
if (!$i) $totalarray['nbfield']++;
|
if (!$i) $totalarray['nbfield']++;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -378,8 +398,7 @@ if ($resql)
|
|||||||
// Thirdparty
|
// Thirdparty
|
||||||
if (!empty($arrayfields['s.nom']['checked'])) {
|
if (!empty($arrayfields['s.nom']['checked'])) {
|
||||||
print '<td>';
|
print '<td>';
|
||||||
if ($objp->socid > 0)
|
if ($objp->socid > 0) {
|
||||||
{
|
|
||||||
print $companystatic->getNomUrl(1, '', 24);
|
print $companystatic->getNomUrl(1, '', 24);
|
||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
@ -392,6 +411,12 @@ if ($resql)
|
|||||||
if (!$i) $totalarray['nbfield']++;
|
if (!$i) $totalarray['nbfield']++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Filter: Cheque number (fund transfer)
|
||||||
|
if (!empty($arrayfields['p.num_payment']['checked'])) {
|
||||||
|
print '<td>'.$objp->num_payment.'</td>';
|
||||||
|
if (!$i) $totalarray['nbfield']++;
|
||||||
|
}
|
||||||
|
|
||||||
// Bank transaction
|
// Bank transaction
|
||||||
if (!empty($arrayfields['transaction']['checked'])) {
|
if (!empty($arrayfields['transaction']['checked'])) {
|
||||||
$bankline->fetch($objp->fk_bank);
|
$bankline->fetch($objp->fk_bank);
|
||||||
@ -402,8 +427,7 @@ if ($resql)
|
|||||||
// Bank account
|
// Bank account
|
||||||
if (!empty($arrayfields['ba.label']['checked'])) {
|
if (!empty($arrayfields['ba.label']['checked'])) {
|
||||||
print '<td>';
|
print '<td>';
|
||||||
if ($objp->bid > 0)
|
if ($objp->bid > 0) {
|
||||||
{
|
|
||||||
$accountstatic->id = $objp->bid;
|
$accountstatic->id = $objp->bid;
|
||||||
$accountstatic->ref = $objp->bref;
|
$accountstatic->ref = $objp->bref;
|
||||||
$accountstatic->label = $objp->blabel;
|
$accountstatic->label = $objp->blabel;
|
||||||
@ -424,7 +448,7 @@ if ($resql)
|
|||||||
if (!empty($arrayfields['p.amount']['checked'])) {
|
if (!empty($arrayfields['p.amount']['checked'])) {
|
||||||
print '<td class="right">'.price($objp->amount).'</td>';
|
print '<td class="right">'.price($objp->amount).'</td>';
|
||||||
if (!$i) $totalarray['nbfield']++;
|
if (!$i) $totalarray['nbfield']++;
|
||||||
$totalarray['pos'][7] = 'amount';
|
$totalarray['pos'][8] = 'amount';
|
||||||
$totalarray['val']['amount'] += $objp->amount;
|
$totalarray['val']['amount'] += $objp->amount;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -450,15 +474,9 @@ if ($resql)
|
|||||||
// Show total line
|
// Show total line
|
||||||
include DOL_DOCUMENT_ROOT.'/core/tpl/list_print_total.tpl.php';
|
include DOL_DOCUMENT_ROOT.'/core/tpl/list_print_total.tpl.php';
|
||||||
|
|
||||||
|
|
||||||
print "</table>";
|
print "</table>";
|
||||||
print "</div>";
|
print "</div>";
|
||||||
print "</form>";
|
print "</form>";
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
dol_print_error($db);
|
|
||||||
}
|
|
||||||
|
|
||||||
// End of page
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user