diff --git a/htdocs/compta/facture/list.php b/htdocs/compta/facture/list.php index a64a24c791fbf..8ea6fbf00715e 100644 --- a/htdocs/compta/facture/list.php +++ b/htdocs/compta/facture/list.php @@ -187,10 +187,10 @@ // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context $object = new Facture($db); -$hookmanager->initHooks(array('invoicelist')); +$hookmanager->initHooks(array($contextpage)); $extrafields = new ExtraFields($db); -// fetch optionals attributes and labels +// Fetch optionals attributes and labels $extrafields->fetch_name_optionals_label($object->table_element); $search_array_options = $extrafields->getOptionalsFromPost($object->table_element, '', 'search_'); @@ -609,6 +609,8 @@ $parameters = array(); $reshook = $hookmanager->executeHooks('printFieldListSelect', $parameters, $object, $action); // Note that $action and $object may have been modified by hook $sql .= $hookmanager->resPrint; +$sql = preg_replace('/,\s*$/', '', $sql); +//$sql .= ", COUNT(rc.rowid) as anotherfield"; $sqlfields = $sql; // $sql fields to remove for count total @@ -975,7 +977,10 @@ exit; } - llxHeader('', $langs->trans('CustomersInvoices'), 'EN:Customers_Invoices|FR:Factures_Clients|ES:Facturas_a_clientes'); + // Output page + // -------------------------------------------------------------------- + + llxHeader('', $title, 'EN:Customers_Invoices|FR:Factures_Clients|ES:Facturas_a_clientes'); if ($socid > 0) { $soc = new Societe($db); @@ -1209,7 +1214,6 @@ $i = 0; print '
'."\n"; - if ($optioncss != '') { print ''; } @@ -1310,13 +1314,14 @@ } print '
'; - print ''."\n"; + print '
'."\n"; - // Filters lines + // Fields title search + // -------------------------------------------------------------------- print ''; - if (!empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) { - // Action column + // Action column + if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { print ''; + if (!$i) { + $totalarray['nbfield']++; + } } // No if (!empty($conf->global->MAIN_VIEW_LINE_NUMBER_IN_LIST)) { print ''; + if (!$i) { + $totalarray['nbfield']++; + } } // Ref @@ -2355,6 +2366,9 @@ if (!empty($arrayfields['f.retained_warranty']['checked'])) { print ''; + if (!$i) { + $totalarray['nbfield']++; + } } if (!empty($arrayfields['dynamount_payed']['checked'])) {
'; $searchpicto = $form->showFilterButtons('left'); print $searchpicto; @@ -1959,11 +1964,17 @@ print ''; } print ''.(($offset * $limit) + $i).''.(!empty($obj->retained_warranty) ? price($obj->retained_warranty).'%' : ' ').'