These budget charts are the worst, I'm telling you.

This commit is contained in:
James Cole
2016-05-05 21:25:20 +02:00
parent 4e1ff8c4a3
commit dd8b500efd
11 changed files with 379 additions and 312 deletions

View File

@@ -124,8 +124,8 @@ class BudgetReportHelper implements BudgetReportHelperInterface
$set = new Collection;
/** @var Budget $budget */
foreach ($budgets as $budget) {
$expenses = $repository->getExpensesPerDay($budget, $start, $end, $accounts);
$total = strval($expenses->sum('dailyAmount'));
$expenses = $repository->spentPerDay($budget, $start, $end, $accounts);
$total = strval(array_sum($expenses));
if (bccomp($total, '0') === -1) {
$set->push($budget);
}