Inuit sync of tax, product accounting, accounts and invoices

This commit is contained in:
Deon George
2023-05-12 20:09:51 +10:00
parent e2d8f8a096
commit ad2f6f3a7f
22 changed files with 707 additions and 144 deletions

View File

@@ -0,0 +1,16 @@
<?php
/**
* Get a provider reference ID
*/
namespace App\Traits;
use App\Models\ProviderOauth;
trait ProviderRef
{
public function provider_ref(ProviderOauth $poo): ?string
{
return (($x=$this->providers->where('pivot.provider_oauth_id',$poo->id))->count() === 1) ? $x->pop()->pivot->ref : NULL;
}
}