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