From d3682a6727eb8d4b1bec70279fe97ba455cff241 Mon Sep 17 00:00:00 2001 From: James Cole Date: Wed, 2 Dec 2015 08:46:03 +0100 Subject: [PATCH] Another fix in reports. --- app/Helpers/Report/ReportHelper.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/Helpers/Report/ReportHelper.php b/app/Helpers/Report/ReportHelper.php index ae9bd4ca1a..f0d660d173 100644 --- a/app/Helpers/Report/ReportHelper.php +++ b/app/Helpers/Report/ReportHelper.php @@ -154,6 +154,7 @@ class ReportHelper implements ReportHelperInterface // then a new line for without budget. // and one for the tags: + // and one for "left unbalanced". $empty = new BalanceLine; $tags = new BalanceLine; $diffLine = new BalanceLine; @@ -162,7 +163,7 @@ class ReportHelper implements ReportHelperInterface $diffLine->setRole(BalanceLine::ROLE_DIFFROLE); foreach ($accounts as $account) { - $spent = $this->query->spentNoBudget($account, $start, $end); + $spent = $this->query->spentNoBudget($account, $start, $end) * -1; $left = $tagRepository->coveredByBalancingActs($account, $start, $end); bcscale(2); $diff = bcsub($spent, $left);