Firefly III: a personal finances manager
PHP accountingbudgetbudgetingbudgetscash-flowcashflowcredit-carddockerexpensesfinancefinancesfinanciallinuxmoneypaycheckpersonal-financephpphp7
Fix #3881
James Cole8eb6b5a36412
diff --git a/app/Http/Controllers/Budget/BudgetLimitController.php b/app/Http/Controllers/Budget/BudgetLimitController.phpindex e92bee059b..1193fa4ce9 100644--- a/app/Http/Controllers/Budget/BudgetLimitController.php+++ b/app/Http/Controllers/Budget/BudgetLimitController.php@@ -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) {diff --git a/app/Repositories/Budget/BudgetLimitRepository.php b/app/Repositories/Budget/BudgetLimitRepository.phpindex 3e58f9c256..ad98e0b2e6 100644--- a/app/Repositories/Budget/BudgetLimitRepository.php+++ b/app/Repositories/Budget/BudgetLimitRepository.php@@ -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();}/**diff --git a/resources/views/v1/budgets/index.twig b/resources/views/v1/budgets/index.twigindex 1e0b0fa08d..27a14a1a99 100644--- a/resources/views/v1/budgets/index.twig+++ b/resources/views/v1/budgets/index.twig@@ -436,17 +436,22 @@{% block scripts %}<script src="v1/js/lib/jquery-ui.min.js?v={{ FF_VERSION }}" type="text/javascript" nonce="{{ JS_NONCE }}"></script><script type="text/javascript" nonce="{{ JS_NONCE }}">++ // index route.var budgetIndexUri = "{{ route('budgets.index',['START','END']) }}";++ // create available budgets / editvar createAvailableBudgetUri = "{{ route('available-budgets.create', [start.format('Y-m-d'), end.format('Y-m-d')]) }}";var createAltAvailableBudgetUri = "{{ route('available-budgets.create-alternative', [start.format('Y-m-d'), end.format('Y-m-d')]) }}";var editAvailableBudgetUri = "{{ route('available-budgets.edit', ['REPLACEME', start.format('Y-m-d'), end.format('Y-m-d')]) }}";+ // budget limit create form.var createBudgetLimitUri = "{{ route('budget-limits.create', ['REPLACEME', start.format('Y-m-d'), end.format('Y-m-d')]) }}";var storeBudgetLimitUri = "{{ route('budget-limits.store') }}";var updateBudgetLimitUri = "{{ route('budget-limits.update', ['REPLACEME']) }}";var totalBudgetedUri = "{{ route('json.budget.total-budgeted', ['REPLACEME', start.format('Y-m-d'), end.format('Y-m-d')]) }}";- {#var budgetAmountUri = "{{ route('budgets.amount','REPLACE') }}";#}- {#var updateIncomeUri = "{{ route('budgets.income',[start.format('Y-m-d'),end.format('Y-m-d')]) }}";#}++ // period thing:var periodStart = "{{ start.format('Y-m-d') }}";var periodEnd = "{{ end.format('Y-m-d') }}";</script>