Work on SSL and Host accounts
This commit is contained in:
@@ -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');
|
||||
}
|
||||
}
|
@@ -30,4 +30,9 @@ class Domain extends ProductType implements ProductSupplier
|
||||
// N/A
|
||||
return 0;
|
||||
}
|
||||
|
||||
public function getSupplierAttribute()
|
||||
{
|
||||
return '';
|
||||
}
|
||||
}
|
@@ -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 = '';
|
||||
}
|
@@ -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;
|
||||
}
|
||||
}
|
@@ -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 = '';
|
||||
}
|
Reference in New Issue
Block a user