Fix in coloring negative amounts

This commit is contained in:
Laurent Destailleur 2010-08-21 17:42:41 +00:00
parent 8202d8ed35
commit 41319b6ef1

View File

@ -488,7 +488,7 @@ if ($account || $_GET["ref"])
while ($i < $num)
{
$objp = $db->fetch_object($result);
$total = $total + $objp->amount;
$total = $total + price2num($objp->amount,'MT');
if ($i >= ($nbline - $viewline))
{
$var=!$var;
@ -636,7 +636,7 @@ if ($account || $_GET["ref"])
// Balance
if ($action != 'search')
{
if (price2num($total,'MT') >= 0)
if ($total >= 0)
{
print '<td align="right" nowrap>&nbsp;'.price($total).'</td>';
}