From bae79063e19729d394ab8524e36045ce9731f537 Mon Sep 17 00:00:00 2001 From: James Cole Date: Wed, 7 Mar 2018 20:21:51 +0100 Subject: [PATCH] Code to fix #1234 --- app/Repositories/Budget/BudgetRepository.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/Repositories/Budget/BudgetRepository.php b/app/Repositories/Budget/BudgetRepository.php index 98e91fc5af..0cd44c4407 100644 --- a/app/Repositories/Budget/BudgetRepository.php +++ b/app/Repositories/Budget/BudgetRepository.php @@ -317,8 +317,8 @@ class BudgetRepository implements BudgetRepositoryInterface $amount = '0'; $availableBudget = $this->user->availableBudgets() ->where('transaction_currency_id', $currency->id) - ->where('start_date', $start->format('Y-m-d')) - ->where('end_date', $end->format('Y-m-d'))->first(); + ->where('start_date', $start->format('Y-m-d 00:00:00')) + ->where('end_date', $end->format('Y-m-d 00:00:00'))->first(); if (null !== $availableBudget) { $amount = strval($availableBudget->amount); } @@ -492,8 +492,8 @@ class BudgetRepository implements BudgetRepositoryInterface { $availableBudget = $this->user->availableBudgets() ->where('transaction_currency_id', $currency->id) - ->where('start_date', $start->format('Y-m-d')) - ->where('end_date', $end->format('Y-m-d'))->first(); + ->where('start_date', $start->format('Y-m-d 00:00:00')) + ->where('end_date', $end->format('Y-m-d 00:00:00'))->first(); if (null === $availableBudget) { $availableBudget = new AvailableBudget; $availableBudget->user()->associate($this->user);