mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2026-01-06 14:12:15 +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;
|
||||
|
||||
@@ -171,9 +171,9 @@ interface BudgetRepositoryInterface
|
||||
* @param Carbon $start
|
||||
* @param Carbon $end
|
||||
*
|
||||
* @return mixed
|
||||
* @return string
|
||||
*/
|
||||
public function getWithoutBudgetSum(Carbon $start, Carbon $end);
|
||||
public function getWithoutBudgetSum(Carbon $start, Carbon $end): string;
|
||||
|
||||
/**
|
||||
* Returns an array with the following key:value pairs:
|
||||
|
||||
Reference in New Issue
Block a user