mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Removed references to components.
This commit is contained in:
@@ -13,7 +13,7 @@ class BudgetLimit extends Eloquent
|
||||
use ValidatingTrait;
|
||||
public static $rules
|
||||
= [
|
||||
'component_id' => 'required|exists:components,id',
|
||||
'budget_id' => 'required|exists:budgets,id',
|
||||
'startdate' => 'required|date',
|
||||
'amount' => 'numeric|required|min:0.01',
|
||||
'repeats' => 'required|boolean',
|
||||
@@ -27,7 +27,7 @@ class BudgetLimit extends Eloquent
|
||||
*/
|
||||
public function budget()
|
||||
{
|
||||
return $this->belongsTo('Budget', 'component_id');
|
||||
return $this->belongsTo('Budget', 'budget_id');
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -27,29 +27,6 @@ class Transaction extends Eloquent
|
||||
return $this->belongsTo('Account');
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \Illuminate\Database\Eloquent\Relations\BelongsToMany
|
||||
*/
|
||||
public function budgets()
|
||||
{
|
||||
return $this->belongsToMany('Budget', 'component_transaction', 'transaction_id', 'component_id');
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \Illuminate\Database\Eloquent\Relations\BelongsToMany
|
||||
*/
|
||||
public function categories()
|
||||
{
|
||||
return $this->belongsToMany('Category', 'component_transaction', 'transaction_id', 'component_id');
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \Illuminate\Database\Eloquent\Relations\BelongsToMany
|
||||
*/
|
||||
public function components()
|
||||
{
|
||||
return $this->belongsToMany('Component');
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
|
||||
|
||||
@@ -42,13 +42,6 @@ class TransactionJournal extends Eloquent
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \Illuminate\Database\Eloquent\Relations\BelongsToMany
|
||||
*/
|
||||
public function components()
|
||||
{
|
||||
return $this->belongsToMany('Component');
|
||||
}
|
||||
|
||||
/**
|
||||
* TODO remove this method in favour of something in the FireflyIII libraries.
|
||||
@@ -208,9 +201,7 @@ class TransactionJournal extends Eloquent
|
||||
$query->with(
|
||||
['transactions' => function ($q) {
|
||||
$q->orderBy('amount', 'ASC');
|
||||
}, 'transactiontype', 'components' => function ($q) {
|
||||
$q->orderBy('class');
|
||||
}, 'transactions.account.accounttype', 'recurringTransaction', 'budgets', 'categories']
|
||||
}, 'transactiontype', 'budgets','categories', 'transactions.account.accounttype', 'recurringTransaction', 'budgets', 'categories']
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -51,14 +51,6 @@ class User extends Eloquent implements UserInterface, RemindableInterface
|
||||
return $this->hasMany('Category');
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \Illuminate\Database\Eloquent\Relations\HasMany
|
||||
*/
|
||||
public function components()
|
||||
{
|
||||
return $this->hasMany('Component');
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \Illuminate\Database\Eloquent\Relations\HasManyThrough
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user