Skip to content

Commit

Permalink
Debug v18
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy committed Jun 1, 2023
1 parent 29ad591 commit 5fcbf14
Showing 1 changed file with 22 additions and 8 deletions.
30 changes: 22 additions & 8 deletions htdocs/compta/facture/list.php
Original file line number Diff line number Diff line change
Expand Up @@ -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_');
Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -1209,7 +1214,6 @@

$i = 0;
print '<form method="POST" name="searchFormList" action="'.$_SERVER["PHP_SELF"].'">'."\n";

if ($optioncss != '') {
print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
}
Expand Down Expand Up @@ -1310,13 +1314,14 @@
}

print '<div class="div-table-responsive">';
print '<table class="tagtable liste'.($moreforfilter ? " listwithfilterbefore" : "").'">'."\n";
print '<table class="tagtable nobottomiftotal liste'.($moreforfilter ? " listwithfilterbefore" : "").'">'."\n";

// Filters lines
// Fields title search
// --------------------------------------------------------------------
print '<tr class="liste_titre_filter">';

if (!empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) {
// Action column
// Action column
if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
print '<td class="liste_titre center actioncolumn">';
$searchpicto = $form->showFilterButtons('left');
print $searchpicto;
Expand Down Expand Up @@ -1959,11 +1964,17 @@
print '<input id="cb'.$obj->id.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$obj->id.'"'.($selected ? ' checked="checked"' : '').'>';
}
print '</td>';
if (!$i) {
$totalarray['nbfield']++;
}
}

// No
if (!empty($conf->global->MAIN_VIEW_LINE_NUMBER_IN_LIST)) {
print '<td>'.(($offset * $limit) + $i).'</td>';
if (!$i) {
$totalarray['nbfield']++;
}
}

// Ref
Expand Down Expand Up @@ -2355,6 +2366,9 @@

if (!empty($arrayfields['f.retained_warranty']['checked'])) {
print '<td align="right">'.(!empty($obj->retained_warranty) ? price($obj->retained_warranty).'%' : '&nbsp;').'</td>';
if (!$i) {
$totalarray['nbfield']++;
}
}

if (!empty($arrayfields['dynamount_payed']['checked'])) {
Expand Down

0 comments on commit 5fcbf14

Please sign in to comment.