mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-14 08:11:20 +00:00
Fix #3309
This commit is contained in:
@@ -132,6 +132,7 @@ class BudgetLimitController extends Controller
|
|||||||
*/
|
*/
|
||||||
public function store(Request $request)
|
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.
|
// first search for existing one and update it if necessary.
|
||||||
$currency = $this->currencyRepos->find((int) $request->get('transaction_currency_id'));
|
$currency = $this->currencyRepos->find((int) $request->get('transaction_currency_id'));
|
||||||
$budget = $this->repository->findNull((int) $request->get('budget_id'));
|
$budget = $this->repository->findNull((int) $request->get('budget_id'));
|
||||||
@@ -143,7 +144,6 @@ class BudgetLimitController extends Controller
|
|||||||
$start->startOfDay();
|
$start->startOfDay();
|
||||||
$end->endOfDay();
|
$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')));
|
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);
|
$limit = $this->blRepository->find($budget, $currency, $start, $end);
|
||||||
|
@@ -330,7 +330,7 @@ class BudgetRepository implements BudgetRepositoryInterface
|
|||||||
// create initial budget limit.
|
// create initial budget limit.
|
||||||
$today = new Carbon;
|
$today = new Carbon;
|
||||||
$start = app('navigation')->startOfPeriod($today, $autoBudget->period);
|
$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 = app(BudgetLimitRepositoryInterface::class);
|
||||||
$limitRepos->setUser($this->user);
|
$limitRepos->setUser($this->user);
|
||||||
|
Reference in New Issue
Block a user