apply demeter law for transaction type calls

- adds contants for transaction type names
- demeter law = never speaks with strangers
This commit is contained in:
Antonio Spinelli
2015-12-09 22:39:50 -02:00
parent 90e696f82c
commit b3d99cd210
23 changed files with 196 additions and 118 deletions

View File

@@ -100,13 +100,13 @@ class Amount
$symbol = $journal->symbol;
}
if ($journal->transactionType->type == 'Transfer' && $coloured) {
if ($journal->isTransfer() && $coloured) {
$txt = '<span class="text-info">' . $this->formatWithSymbol($symbol, $journal->amount_positive, false) . '</span>';
$cache->store($txt);
return $txt;
}
if ($journal->transactionType->type == 'Transfer' && !$coloured) {
if ($journal->isTransfer() && !$coloured) {
$txt = $this->formatWithSymbol($symbol, $journal->amount_positive, false);
$cache->store($txt);