Fix wrong number of td

This commit is contained in:
Laurent Destailleur 2022-09-09 00:29:45 +02:00
parent 36b798e9a8
commit fa64be5e82

View File

@ -1520,15 +1520,17 @@ $hookmanager->initHooks(array('externalbalance'));
$reshook = $hookmanager->executeHooks('addBalanceLine', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
print $hookmanager->resPrint;
// Total
print '<tr>';
print '<td colspan="4">&nbsp;</td>';
print '<td colspan="'.($modecompta == 'BOOKKEEPING' ? 3 : 4).'">&nbsp;</td>';
print '</tr>';
print '<tr class="liste_total"><td class="left" colspan="2">'.$langs->trans("Income").'</td>';
if ($modecompta == 'CREANCES-DETTES') {
print '<td class="liste_total right">'.price(price2num($total_ht_income, 'MT')).'</td>';
} else {
} elseif ($modecompta == 'RECETTES-DEPENSES') {
print '<td></td>';
}
print '<td class="liste_total right">'.price(price2num($total_ttc_income, 'MT')).'</td>';
@ -1536,7 +1538,7 @@ print '</tr>';
print '<tr class="liste_total"><td class="left" colspan="2">'.$langs->trans("Outcome").'</td>';
if ($modecompta == 'CREANCES-DETTES') {
print '<td class="liste_total right">'.price(price2num(-$total_ht_outcome, 'MT')).'</td>';
} else {
} elseif ($modecompta == 'RECETTES-DEPENSES') {
print '<td></td>';
}
print '<td class="liste_total right">'.price(price2num(-$total_ttc_outcome, 'MT')).'</td>';
@ -1544,7 +1546,7 @@ print '</tr>';
print '<tr class="liste_total"><td class="left" colspan="2">'.$langs->trans("Profit").'</td>';
if ($modecompta == 'CREANCES-DETTES') {
print '<td class="liste_total right">'.price(price2num($total_ht, 'MT')).'</td>';
} else {
} elseif ($modecompta == 'RECETTES-DEPENSES') {
print '<td></td>';
}
print '<td class="liste_total right">'.price(price2num($total_ttc, 'MT')).'</td>';