This commit is contained in:
James Cole
2020-10-01 18:43:41 +02:00
parent d03ca0ec36
commit 8eb6b5a364
3 changed files with 11 additions and 6 deletions

View File

@@ -138,9 +138,9 @@ class BudgetLimitController extends Controller
$start = Carbon::createFromFormat('Y-m-d', $request->get('start'));
$end = Carbon::createFromFormat('Y-m-d', $request->get('end'));
$start->startOfDay();
$end->endOfDay();
$end->startOfDay();
Log::debug(sprintf('Start: %s, end: %s', $start->format('Y-m-d H:i:s'), $end->format('Y-m-d H:i:s')));
Log::debug(sprintf('Start: %s, end: %s', $start->format('Y-m-d'), $end->format('Y-m-d')));
$limit = $this->blRepository->find($budget, $currency, $start, $end);
if (null !== $limit) {

View File

@@ -133,8 +133,8 @@ class BudgetLimitRepository implements BudgetLimitRepositoryInterface
{
return $budget->budgetlimits()
->where('transaction_currency_id', $currency->id)
->where('start_date', $start->format('Y-m-d 00:00:00'))
->where('end_date', $end->format('Y-m-d 23:59:59'))->first();
->where('start_date', $start->format('Y-m-d'))
->where('end_date', $end->format('Y-m-d'))->first();
}
/**