mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-01-01 11:47:14 -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')
|
$set = BudgetLimit::leftJoin('budgets', 'budgets.id', '=', 'budget_limits.budget_id')
|
||||||
->with(['budget'])
|
->with(['budget'])
|
||||||
->where('budgets.user_id', $this->user->id)
|
->where('budgets.user_id', $this->user->id)
|
||||||
|
->whereNull('budgets.deleted_at')
|
||||||
->get(['budget_limits.*']);
|
->get(['budget_limits.*']);
|
||||||
|
|
||||||
return $set;
|
return $set;
|
||||||
@ -323,6 +324,7 @@ class BudgetRepository implements BudgetRepositoryInterface
|
|||||||
if (null === $start xor null === $end) {
|
if (null === $start xor null === $end) {
|
||||||
$query = BudgetLimit::leftJoin('budgets', 'budgets.id', '=', 'budget_limits.budget_id')
|
$query = BudgetLimit::leftJoin('budgets', 'budgets.id', '=', 'budget_limits.budget_id')
|
||||||
->with(['budget'])
|
->with(['budget'])
|
||||||
|
->whereNull('budgets.deleted_at')
|
||||||
->where('budgets.user_id', $this->user->id);
|
->where('budgets.user_id', $this->user->id);
|
||||||
if (null !== $end) {
|
if (null !== $end) {
|
||||||
// end date must be before $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')
|
$set = BudgetLimit::leftJoin('budgets', 'budgets.id', '=', 'budget_limits.budget_id')
|
||||||
->with(['budget'])
|
->with(['budget'])
|
||||||
->where('budgets.user_id', $this->user->id)
|
->where('budgets.user_id', $this->user->id)
|
||||||
|
->whereNull('budgets.deleted_at')
|
||||||
->where(
|
->where(
|
||||||
function (Builder $q5) use ($start, $end) {
|
function (Builder $q5) use ($start, $end) {
|
||||||
$q5->where(
|
$q5->where(
|
||||||
|
Loading…
Reference in New Issue
Block a user