Small various fixes.

This commit is contained in:
James Cole
2016-03-21 19:22:37 +01:00
parent 189d969ee6
commit c1b8d44209
3 changed files with 9 additions and 7 deletions

View File

@@ -47,7 +47,7 @@ class Amount
$result = $formatter->formatCurrency($float, $format->code);
if ($coloured === true) {
if ($amount == 0) {
if ($amount === 0.00) {
return '<span style="color:#999">' . $result . '</span>';
}
if ($amount > 0) {
@@ -76,7 +76,7 @@ class Amount
$currencyCode = $journal->transaction_currency_code ?? $journal->transactionCurrency->code;
$result = $formatter->formatCurrency($float, $currencyCode);
if ($coloured === true && $float == 0) {
if ($coloured === true && $float === 0.00) {
return '<span style="color:#999">' . $result . '</span>'; // always grey.
}
if (!$coloured) {