Various cleanup in transaction and journal display code.

This commit is contained in:
James Cole
2017-11-04 07:10:21 +01:00
parent b4dc70244a
commit bb46d034cd
25 changed files with 885 additions and 543 deletions

View File

@@ -59,9 +59,6 @@ class AmountFormat extends Twig_Extension
return [
$this->formatAmountByAccount(),
$this->formatAmountBySymbol(),
$this->transactionAmount(),
$this->journalAmount(),
$this->journalTotalAmount(),
$this->formatDestinationAfter(),
$this->formatDestinationBefore(),
$this->formatSourceAfter(),
@@ -274,43 +271,4 @@ class AmountFormat extends Twig_Extension
);
}
/**
* @return Twig_SimpleFunction
*/
protected function journalAmount(): Twig_SimpleFunction
{
return new Twig_SimpleFunction(
'journalAmount', function (TransactionJournal $journal): string {
return app('amount')->journalAmount($journal, true);
}, ['is_safe' => ['html']]
);
}
/**
* @return Twig_SimpleFunction
*/
protected function journalTotalAmount(): Twig_SimpleFunction
{
return new Twig_SimpleFunction(
'journalTotalAmount', function (TransactionJournal $journal): string {
return app('amount')->journalTotalAmount($journal, true);
}, ['is_safe' => ['html']]
);
}
/**
* @return Twig_SimpleFunction
*/
protected function transactionAmount(): Twig_SimpleFunction
{
return new Twig_SimpleFunction(
'transactionAmount', function (TransactionModel $transaction): string {
return app('amount')->transactionAmount($transaction, true);
}, ['is_safe' => ['html']]
);
}
}