Some cosmetic fixes to reports

This commit is contained in:
James Cole 2015-12-02 08:44:23 +01:00
parent a8a28f442f
commit 371bbd9508
3 changed files with 3 additions and 2 deletions

View File

@ -113,7 +113,7 @@ class BalanceLine
$start = $this->getRepetition() ? $this->getRepetition()->amount : 0;
/** @var BalanceEntry $balanceEntry */
foreach ($this->getBalanceEntries() as $balanceEntry) {
$start += $balanceEntry->getSpent();
$start -= $balanceEntry->getSpent();
}
return $start;

View File

@ -134,6 +134,7 @@ class ReportHelper implements ReportHelperInterface
// get budget amount for current period:
$rep = $repository->getCurrentRepetition($budget, $start, $end);
// could be null?
$line->setRepetition($rep);
// loop accounts:

View File

@ -35,7 +35,7 @@
{% for balanceEntry in balanceLine.getBalanceEntries %}
<td>
{% if balanceEntry.getSpent != 0 %}
<span class="text-danger">{{ (balanceEntry.getSpent*-1)|formatAmountPlain }}</span>
<span class="text-danger">{{ (balanceEntry.getSpent)|formatAmountPlain }}</span>
{% endif %}
{% if balanceEntry.getLeft != 0 %}
<span class="text-success">{{ (balanceEntry.getLeft)|formatAmountPlain }}</span>