Fix balance report [skip ci]

This commit is contained in:
James Cole 2015-06-16 18:34:19 +02:00
parent a280a326b9
commit 1bb0508ddf
2 changed files with 2 additions and 2 deletions

View File

@ -163,7 +163,7 @@ class BalanceLine
bcscale(2);
/** @var BalanceEntry $balanceEntry */
foreach ($this->getBalanceEntries() as $balanceEntry) {
$sum = bcsub($sum, $balanceEntry->getLeft());
$sum = bcadd($sum, $balanceEntry->getLeft());
}
return $sum;

View File

@ -164,7 +164,7 @@ class ReportHelper implements ReportHelperInterface
$spent = $this->query->spentNoBudget($account, $start, $end);
$left = $tagRepository->coveredByBalancingActs($account, $start, $end);
bcscale(2);
$diff = bcadd($spent, $left);
$diff = bcsub($spent, $left);
// budget
$budgetEntry = new BalanceEntry;