This is a partial fix for issue #151. It does not filter on account selection.

This commit is contained in:
James Cole
2016-02-24 17:37:08 +01:00
parent 8e42e71528
commit ecefcfabc0
4 changed files with 18 additions and 15 deletions

View File

@@ -463,7 +463,7 @@ class BudgetRepository extends ComponentRepository implements BudgetRepositoryIn
*
* @return string
*/
public function getWithoutBudgetSum(Carbon $start, Carbon $end)
public function getWithoutBudgetSum(Carbon $start, Carbon $end): string
{
$entry = Auth::user()
->transactionjournals()
@@ -488,7 +488,7 @@ class BudgetRepository extends ComponentRepository implements BudgetRepositoryIn
->transactionTypes([TransactionType::WITHDRAWAL])
->first([DB::raw('SUM(`transactions`.`amount`) as `journalAmount`')]);
if (is_null($entry->journalAmount)) {
return '';
return '0';
}
return $entry->journalAmount;