Fix: Error in total

This commit is contained in:
Laurent Destailleur 2010-03-17 01:46:18 +00:00
parent e2eb6a5c18
commit 46a5d637aa

View File

@ -136,20 +136,24 @@ if ($conf->service->enabled)
$statServices.= '<td><a href="liste.php?type=1&amp;envente=1">'.$langs->trans("ServicesOnSell").'</a></td><td align="right">'.round($prodser[1][1]).'</td>';
$statServices.= "</tr>";
}
$total=0;
if ($type == '0')
{
print $statProducts;
$total=round($prodser[0][0])+round($prodser[0][1]);
}
else if ($type == '1')
{
print $statServices;
$total=round($prodser[1][0])+round($prodser[1][1]);
}
else
{
print $statProducts.$statServices;
$total=round($prodser[1][0])+round($prodser[1][1])+round($prodser[0][0])+round($prodser[0][1]);
}
print '<tr class="liste_total"><td>'.$langs->trans("Total").'</td><td align="right">';
print round($prodser[1][0])+round($prodser[1][1])+round($prodser[0][0])+round($prodser[0][1]);
print $total;
print '</td></tr>';
print '</table>';