Status updates, SSL updates
This commit is contained in:
@@ -32,7 +32,7 @@ class Controller_Reseller_Service extends Controller_Service {
|
||||
'service_name()'=>'Service',
|
||||
'recur_schedule'=>'Billing',
|
||||
'price(TRUE,TRUE)'=>'Price',
|
||||
'status(TRUE)'=>'Active',
|
||||
'status'=>'Active',
|
||||
'account->accnum()'=>'Cust ID',
|
||||
'account->name()'=>'Customer',
|
||||
))
|
||||
|
@@ -48,7 +48,7 @@ class Controller_User_Service extends Controller_Service {
|
||||
'service_name()'=>'Service',
|
||||
'recur_schedule'=>'Billing',
|
||||
'price(TRUE,TRUE)'=>'Price',
|
||||
'status(TRUE)'=>'Active',
|
||||
'status'=>'Active',
|
||||
))
|
||||
->prepend(array(
|
||||
'id'=>array('url'=>URL::link('user','service/view/')),
|
||||
|
@@ -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);
|
||||
|
||||
|
@@ -8,13 +8,13 @@
|
||||
<dd><?php printf('%s (%s)',$o->account->name(),$o->account->accnum()); ?></dd>
|
||||
|
||||
<dt>Service Active</dt>
|
||||
<dd><?php echo $o->label_bool('status',TRUE); ?></dd>
|
||||
<dd><?php echo $o->display('status'); ?></dd>
|
||||
|
||||
<dt>Billing Period</dt>
|
||||
<dd><?php echo $o->display('recur_schedule');?></dd>
|
||||
|
||||
<dt>Cost</dt>
|
||||
<dd><?php echo $o->price(TRUE,TRUE); if ($o->pending_change()) echo ' *'; ?></dd>
|
||||
<dd><?php echo (! is_null($o->price_override) ? sprintf('<strike>%s</strike> ',$o->price(TRUE,TRUE,TRUE)) : ''). $o->price(TRUE,TRUE); if ($o->pending_change()) echo ' *'; ?></dd>
|
||||
|
||||
<?php if (is_null($o->price) OR ($o->price<=$o->product->price($o->price_group,$o->recur_schedule,'price_base'))) : ?>
|
||||
<dt>Service</dt>
|
||||
@@ -28,7 +28,7 @@
|
||||
<dd><?php echo $o->paid_to(TRUE); ?></dd>
|
||||
|
||||
<dt>Date Next Invoice</dt>
|
||||
<dd><?php echo $o->display('date_next_invoice'); ?></dd>
|
||||
<dd><?php printf($o->suspend_billing ? '<strike>%s</strike>' : '%s',$o->display('date_next_invoice')); ?></dd>
|
||||
|
||||
<dt>Current Invoices Due</dt>
|
||||
<dd><?php echo $o->due(TRUE); ?></dd>
|
||||
|
Reference in New Issue
Block a user