mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2024-12-29 10:21:25 -06:00
Fix for #1731
This commit is contained in:
parent
fea5510700
commit
f87a4c1e7c
@ -315,6 +315,7 @@ class BudgetRepository implements BudgetRepositoryInterface
|
||||
$set = BudgetLimit::leftJoin('budgets', 'budgets.id', '=', 'budget_limits.budget_id')
|
||||
->with(['budget'])
|
||||
->where('budgets.user_id', $this->user->id)
|
||||
->whereNull('budgets.deleted_at')
|
||||
->get(['budget_limits.*']);
|
||||
|
||||
return $set;
|
||||
@ -323,6 +324,7 @@ class BudgetRepository implements BudgetRepositoryInterface
|
||||
if (null === $start xor null === $end) {
|
||||
$query = BudgetLimit::leftJoin('budgets', 'budgets.id', '=', 'budget_limits.budget_id')
|
||||
->with(['budget'])
|
||||
->whereNull('budgets.deleted_at')
|
||||
->where('budgets.user_id', $this->user->id);
|
||||
if (null !== $end) {
|
||||
// end date must be before $end.
|
||||
@ -340,6 +342,7 @@ class BudgetRepository implements BudgetRepositoryInterface
|
||||
$set = BudgetLimit::leftJoin('budgets', 'budgets.id', '=', 'budget_limits.budget_id')
|
||||
->with(['budget'])
|
||||
->where('budgets.user_id', $this->user->id)
|
||||
->whereNull('budgets.deleted_at')
|
||||
->where(
|
||||
function (Builder $q5) use ($start, $end) {
|
||||
$q5->where(
|
||||
|
Loading…
Reference in New Issue
Block a user