Start work on updating services

This commit is contained in:
Deon George
2022-04-19 17:07:39 +10:00
parent ebf08ea414
commit 621a132e35
63 changed files with 1038 additions and 612 deletions

View File

@@ -8,6 +8,7 @@ use Illuminate\Support\Collection;
use App\Interfaces\SupplierItem;
use App\Models\Product\Broadband as ProductBroadband;
// @todo does this need to extend Type? Perhaps have a SupplierType consistent with ServiceType.
class Broadband extends Type implements SupplierItem
{
protected $casts = [
@@ -37,7 +38,7 @@ class Broadband extends Type implements SupplierItem
public function types()
{
return $this->belongsToMany(ProductBroadband::class,$this->table,'id','id','id',$this->table.'_id');
return $this->belongsToMany(ProductBroadband::class,$this->table,'id','id','id','supplier_item_id');
}
public function getBillingIntervalAttribute(): int