Different budget query [skip ci]

This commit is contained in:
James Cole 2015-05-14 08:08:25 +02:00
parent 0e068d4ccf
commit 3603eb94cc

View File

@ -246,13 +246,12 @@ class BudgetRepository implements BudgetRepositoryInterface
->whereNotNull('budget_transaction_journal.budget_id'); ->whereNotNull('budget_transaction_journal.budget_id');
} }
) )
->before($end)
->after($start) ->after($start)
->before($end)
->lessThan(0) ->lessThan(0)
->transactionTypes(['Withdrawal']) ->transactionTypes(['Withdrawal'])
->get(); ->sum('transactions.amount');
return floatval($noBudgetSet) * -1;
return floatval($noBudgetSet->sum('amount')) * -1;
} }
/** /**