mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-26 13:36:15 +00:00
Moved all references.
This commit is contained in:
@@ -330,7 +330,7 @@ class Budget implements CUD, CommonDatabaseCalls, BudgetInterface
|
||||
$limit = $this->limitOnStartingOnDate($budget, $date);
|
||||
if (!$limit) {
|
||||
// create one!
|
||||
$limit = new \Limit;
|
||||
$limit = new \BudgetLimit;
|
||||
$limit->budget()->associate($budget);
|
||||
$limit->startdate = $date;
|
||||
$limit->amount = $amount;
|
||||
@@ -367,6 +367,6 @@ class Budget implements CUD, CommonDatabaseCalls, BudgetInterface
|
||||
*/
|
||||
public function limitOnStartingOnDate(\Budget $budget, Carbon $date)
|
||||
{
|
||||
return $budget->limits()->where('startdate', $date->format('Y-m-d'))->first();
|
||||
return $budget->budgetLimits()->where('startdate', $date->format('Y-m-d'))->first();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user