Code optimalisations.

This commit is contained in:
James Cole
2018-07-05 21:18:53 +02:00
parent 1675a0d442
commit c99b7e927d
26 changed files with 216 additions and 150 deletions

View File

@@ -104,7 +104,9 @@ class TransactionJournal extends Twig_Extension
if (TransactionType::WITHDRAWAL === $type) {
$total['amount'] = bcmul($total['amount'], '-1');
}
$array[] = app('amount')->formatAnything($total['currency'], $total['amount']);
if (null !== $total['currency']) {
$array[] = app('amount')->formatAnything($total['currency'], $total['amount']);
}
}
return implode(' / ', $array);