Move user suppliers to account suppliers

This commit is contained in:
2024-07-23 22:17:09 +10:00
parent b145856ce9
commit 46075745d2
10 changed files with 236 additions and 118 deletions

View File

@@ -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
*/

View File

@@ -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 */
/**