mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-01-24 23:36:34 -06:00
Fix #3309
This commit is contained in:
parent
c2e542004d
commit
0783500eaa
@ -132,6 +132,7 @@ class BudgetLimitController extends Controller
|
||||
*/
|
||||
public function store(Request $request)
|
||||
{
|
||||
Log::debug('Going to store new budget-limit.', $request->all());
|
||||
// first search for existing one and update it if necessary.
|
||||
$currency = $this->currencyRepos->find((int) $request->get('transaction_currency_id'));
|
||||
$budget = $this->repository->findNull((int) $request->get('budget_id'));
|
||||
@ -143,7 +144,6 @@ class BudgetLimitController extends Controller
|
||||
$start->startOfDay();
|
||||
$end->endOfDay();
|
||||
|
||||
|
||||
Log::debug(sprintf('Start: %s, end: %s', $start->format('Y-m-d H:i:s'), $end->format('Y-m-d H:i:s')));
|
||||
|
||||
$limit = $this->blRepository->find($budget, $currency, $start, $end);
|
||||
|
@ -330,7 +330,7 @@ class BudgetRepository implements BudgetRepositoryInterface
|
||||
// create initial budget limit.
|
||||
$today = new Carbon;
|
||||
$start = app('navigation')->startOfPeriod($today, $autoBudget->period);
|
||||
$end = app('navigation')->startOfPeriod($start, $autoBudget->period);
|
||||
$end = app('navigation')->endOfPeriod($start, $autoBudget->period);
|
||||
|
||||
$limitRepos = app(BudgetLimitRepositoryInterface::class);
|
||||
$limitRepos->setUser($this->user);
|
||||
|
Loading…
Reference in New Issue
Block a user