Move user suppliers to account suppliers
This commit is contained in:
@@ -159,6 +159,15 @@ class Account extends Model implements IDs
|
||||
->active();
|
||||
}
|
||||
|
||||
/**
|
||||
* Supplier configuration for this account
|
||||
*/
|
||||
public function suppliers()
|
||||
{
|
||||
return $this->belongsToMany(Supplier::class)
|
||||
->withPivot('supplier_ref','created_at');
|
||||
}
|
||||
|
||||
/**
|
||||
* Taxes applicable for this account
|
||||
*/
|
||||
|
@@ -132,17 +132,6 @@ class User extends Authenticatable implements IDs
|
||||
return $this->hasOneThrough(Rtm::class,Account::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Supplier configuration for this user
|
||||
*
|
||||
* @deprecated To move to account->suppliers()
|
||||
*/
|
||||
public function suppliers()
|
||||
{
|
||||
return $this->belongsToMany(Supplier::class)
|
||||
->withPivot('id','created_at');
|
||||
}
|
||||
|
||||
/* ATTRIBUTES */
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user