Integration with Intuit - get accounting details for products

This commit is contained in:
Deon George
2023-05-10 12:59:42 +09:00
parent dde11f73f5
commit 17ebbb71e8
8 changed files with 147 additions and 17 deletions

View File

@@ -18,8 +18,15 @@ class ProviderOauth extends Model
public function accounts()
{
return $this->belongsToMany(Account::class,'account_provider')
->where('account_provider.site_id',$this->site_id)
return $this->belongsToMany(Account::class,'account__provider')
->where('account__provider.site_id',$this->site_id)
->withPivot('ref','synctoken','created_at','updated_at');
}
public function products()
{
return $this->belongsToMany(Product::class,'product__provider')
->where('product__provider.site_id',$this->site_id)
->withPivot('ref','synctoken','created_at','updated_at');
}