mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-02-08 00:52:01 +01:00
FIX #11364
This commit is contained in:
@@ -1063,24 +1063,24 @@ if ($resql)
|
||||
{
|
||||
print '<td class="right">'.price($obj->total_ht)."</td>\n";
|
||||
if (! $i) $totalarray['nbfield']++;
|
||||
if (! $i) $totalarray['totalhtfield']=$totalarray['nbfield'];
|
||||
$totalarray['totalht'] += $obj->total_ht;
|
||||
if (! $i) $totalarray['pos'][$totalarray['nbfield']]='cf.total_ht';
|
||||
$totalarray['val']['cf.total_ht'] += $obj->total_ht;
|
||||
}
|
||||
// Amount VAT
|
||||
if (! empty($arrayfields['cf.total_vat']['checked']))
|
||||
{
|
||||
print '<td class="right">'.price($obj->total_tva)."</td>\n";
|
||||
if (! $i) $totalarray['nbfield']++;
|
||||
if (! $i) $totalarray['totalvatfield']=$totalarray['nbfield'];
|
||||
$totalarray['totalvat'] += $obj->total_tva;
|
||||
if (! $i) $totalarray['pos'][$totalarray['nbfield']]='cf.total_vat';
|
||||
$totalarray['val']['cf.total_vat'] += $obj->total_tva;
|
||||
}
|
||||
// Amount TTC
|
||||
if (! empty($arrayfields['cf.total_ttc']['checked']))
|
||||
{
|
||||
print '<td class="right">'.price($obj->total_ttc)."</td>\n";
|
||||
if (! $i) $totalarray['nbfield']++;
|
||||
if (! $i) $totalarray['totalttcfield']=$totalarray['nbfield'];
|
||||
$totalarray['totalttc'] += $obj->total_ttc;
|
||||
if (! $i) $totalarray['pos'][$totalarray['nbfield']]='cf.total_ttc';
|
||||
$totalarray['val']['cf.total_ttc'] += $obj->total_ttc;
|
||||
}
|
||||
|
||||
// Extra fields
|
||||
@@ -1134,28 +1134,9 @@ if ($resql)
|
||||
}
|
||||
|
||||
// Show total line
|
||||
if (isset($totalarray['totalhtfield']))
|
||||
{
|
||||
print '<tr class="liste_total">';
|
||||
$i=0;
|
||||
while ($i < $totalarray['nbfield'])
|
||||
{
|
||||
$i++;
|
||||
if ($i == 1)
|
||||
{
|
||||
if ($num < $limit) print '<td class="left">'.$langs->trans("Total").'</td>';
|
||||
else print '<td class="left">'.$langs->trans("Totalforthispage").'</td>';
|
||||
}
|
||||
elseif ($totalarray['totalhtfield'] == $i) print '<td class="right">'.price($totalarray['totalht']).'</td>';
|
||||
elseif ($totalarray['totalvatfield'] == $i) print '<td class="right">'.price($totalarray['totalvat']).'</td>';
|
||||
elseif ($totalarray['totalttcfield'] == $i) print '<td class="right">'.price($totalarray['totalttc']).'</td>';
|
||||
else print '<td></td>';
|
||||
}
|
||||
include DOL_DOCUMENT_ROOT.'/core/tpl/list_print_total.tpl.php';
|
||||
|
||||
|
||||
print '</tr>';
|
||||
}
|
||||
|
||||
$parameters=array('arrayfields'=>$arrayfields, 'sql'=>$sql);
|
||||
$reshook=$hookmanager->executeHooks('printFieldListFooter', $parameters); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
|
||||
Reference in New Issue
Block a user