mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 23:45:10 +00:00
Add sum.
This commit is contained in:
@@ -52,7 +52,7 @@ class General extends Twig_Extension
|
||||
$this->getCurrencySymbol(),
|
||||
$this->phpdate(),
|
||||
$this->env(),
|
||||
|
||||
$this->getAmountFromJournal(),
|
||||
$this->activeRouteStrict(),
|
||||
$this->activeRoutePartial(),
|
||||
$this->activeRoutePartialWhat(),
|
||||
@@ -306,4 +306,16 @@ class General extends Twig_Extension
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Twig_SimpleFunction
|
||||
*/
|
||||
private function getAmountFromJournal()
|
||||
{
|
||||
return new Twig_SimpleFunction(
|
||||
'getAmount', function (TransactionJournal $journal) : string {
|
||||
return TransactionJournal::amount($journal);
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user