mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-03 03:00:14 +00:00
This is a partial fix for issue #151. It does not filter on account selection.
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user