Work on SSL and Host accounts

This commit is contained in:
Deon George
2020-02-20 22:54:28 +11:00
parent 8311bfc268
commit 9ab30086fc
17 changed files with 225 additions and 20 deletions

View File

@@ -151,4 +151,9 @@ class Adsl extends ProductType implements ProductSupplier
// @todo Tax shouldnt be hard coded
return ($this->product->base_cost+$this->allowance_cost())*1.1;
}
public function getSupplierAttribute()
{
return $this->getRelationValue('supplier');
}
}

View File

@@ -30,4 +30,9 @@ class Domain extends ProductType implements ProductSupplier
// N/A
return 0;
}
public function getSupplierAttribute()
{
return '';
}
}

View File

@@ -2,11 +2,11 @@
namespace App\Models\Product;
use App\Models\Base\ProductType;
use App\Traits\NextKey;
class Host extends \App\Models\Base\ProductType
class Host extends ProductType
{
use NextKey;
const RECORD_ID = '';
}

View File

@@ -32,4 +32,23 @@ class SSL extends ProductType implements ProductSupplier
// N/A
return 0;
}
public function getProductAttribute()
{
$o = new \stdClass();
$o->product_id = 'INT';
$o->setup_cost = 0;
$o->base_cost = 0;
$o->contract_term = 0; // @todo
return $o;
}
public function getSupplierAttribute()
{
$o = new \stdClass();
$o->name = 'Internal';
return $o;
}
}

View File

@@ -2,11 +2,11 @@
namespace App\Models\Product;
use App\Models\Base\ProductType;
use App\Traits\NextKey;
class Voip extends \App\Models\Base\ProductType
class Voip extends ProductType
{
use NextKey;
const RECORD_ID = '';
}