More exact search for available budgets. #7853

This commit is contained in:
James Cole
2023-08-15 18:37:47 +02:00
parent e3c4dde4ff
commit f67ff98d78
3 changed files with 26 additions and 1 deletions

View File

@@ -82,7 +82,7 @@ class BoxController extends Controller
$currency = app('amount')->getDefaultCurrency();
app('log')->debug(sprintf('Default currency is %s', $currency->code));
$availableBudgets = $abRepository->getAvailableBudgetsByDate($start, $end);
$availableBudgets = $abRepository->getAvailableBudgetsByExactDate($start, $end);
app('log')->debug(sprintf('Found %d available budget(s)', $availableBudgets->count()));
$availableBudgets = $availableBudgets->filter(
static function (AvailableBudget $availableBudget) use ($currency) {