Status updates, SSL updates
This commit is contained in:
@@ -39,11 +39,14 @@ class Model_Service extends ORM_OSB {
|
||||
'date_next_invoice'=>array(
|
||||
array('Config::date',array(':value')),
|
||||
),
|
||||
'price_override'=>array(
|
||||
array('Currency::display',array(':value')),
|
||||
),
|
||||
'recur_schedule'=>array(
|
||||
array('StaticList_RecurSchedule::get',array(':value')),
|
||||
),
|
||||
'status'=>array(
|
||||
array('StaticList_YesNo::get',array(':value')),
|
||||
array('StaticList_YesNo::get',array(':value',TRUE)),
|
||||
),
|
||||
);
|
||||
|
||||
@@ -226,12 +229,15 @@ class Model_Service extends ORM_OSB {
|
||||
/**
|
||||
* Return the service charge
|
||||
*/
|
||||
public function price($tax=FALSE,$format=FALSE) {
|
||||
public function price($tax=FALSE,$format=FALSE,$original=FALSE) {
|
||||
$x = $this->product->keyget('price_group',$this->recur_schedule);
|
||||
|
||||
// @todo This index shouldnt be hard coded.
|
||||
$p = ! is_null($this->price) ? $this->price : $x[$this->price_group]['price_base'];
|
||||
|
||||
if (! $original AND ! is_null($this->price_override))
|
||||
$p = $this->price_override;
|
||||
|
||||
if ($tax)
|
||||
$p = Tax::add($p);
|
||||
|
||||
|
Reference in New Issue
Block a user