Multi enhancements, including auto serialization, product editing
This commit is contained in:
@@ -28,6 +28,10 @@ class Model_Product_Plugin_ADSL extends Model_Product_Plugin {
|
||||
),
|
||||
);
|
||||
|
||||
public function admin_update() {
|
||||
return '';
|
||||
}
|
||||
|
||||
// Our required abstract methods
|
||||
public function feature_summary() {
|
||||
// @todo This view should render based on the the results of this::allowance();
|
||||
|
@@ -67,6 +67,10 @@ class Model_Service_Plugin_ADSL extends Model_Service_Plugin {
|
||||
return Config::date(strtotime(sprintf('+%s months',$this->contract_term),$this->service_connect_date));
|
||||
}
|
||||
|
||||
public function hasOffpeak() {
|
||||
return ((is_null($this->product()->base_down_offpeak) OR $this->product()->base_down_offpeak) AND (is_null($this->product()->base_up_offpeak) OR $this->product()->base_up_offpeak)) ? TRUE : FALSE;
|
||||
}
|
||||
|
||||
/**
|
||||
* This function will return the months that have traffic data.
|
||||
* This array can be used in a select list to display the traffic for that month
|
||||
|
@@ -1,12 +0,0 @@
|
||||
<tr class="<?php echo $i ? 'odd' : 'even'; ?>">
|
||||
<td><?php echo $service->plugin()->display('service_number'); ?></td>
|
||||
<td><?php echo $service->plugin()->ipaddress(); ?></td>
|
||||
<td><?php printf('%s (%s)',$service->product->name(),$service->id); ?></td>
|
||||
<td><?php echo $service->product->prod_plugin_file ? $service->product->plugin()->allowance() : 'No Details'; ?></td>
|
||||
<td><?php echo $service->plugin()->traffic_thismonth(); ?></td>
|
||||
<td><?php echo $service->plugin()->traffic_lastmonth(); ?></td>
|
||||
<td><?php echo $service->display('price'); ?></td>
|
||||
<td><?php echo $service->display('recur_schedule'); ?></td>
|
||||
<td><?php echo $service->display('date_next_invoice'); ?></td>
|
||||
<td><input type="checkbox"/></td>
|
||||
</tr>
|
@@ -1,23 +0,0 @@
|
||||
<!-- Print out the heading for the first record -->
|
||||
<!-- // @todo This needs to be translated -->
|
||||
<tr class="title">
|
||||
<td colspan="10" style="padding: 0px;">
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td style="border: 0px;"><?php printf('%s %s',$service->account->accnum(),$service->account->name()); ?></td>
|
||||
<td style="border: 0px; text-align: right;"><?php printf('(%s: %s)',_('Invoices Due'),Currency::display($service->account->invoices_due_total())); ?></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="head">
|
||||
<td>Service</td>
|
||||
<td>IP Address</td>
|
||||
<td>Plan</td>
|
||||
<td>Plan Allowance</td>
|
||||
<td>This Month</td>
|
||||
<td>Last Month</td>
|
||||
<td>Amount</td>
|
||||
<td>Freq</td>
|
||||
<td>Next Invoice Date</td>
|
||||
</tr>
|
@@ -35,12 +35,18 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Service Password</td>
|
||||
<td class="data"><?php #echo $so->display('service_password'); ?></td>
|
||||
<td class="data"><?php # @todo Enable the ability to hide this value echo $so->display('service_password'); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Service IP</td>
|
||||
<td class="data"><?php echo $so->ipaddress(); ?></td>
|
||||
</tr>
|
||||
<?php if ($so->hasOffPeak() AND $so->offpeak_start AND $so->offpeak_end) { ?>
|
||||
<tr>
|
||||
<td>Offpeak Period</td>
|
||||
<td class="data"><?php printf('%s-%s',$so->offpeak_start,$so->offpeak_end); ?></td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
</table>
|
||||
</td>
|
||||
<td style="vertical-align: top;" colspan="2">
|
||||
|
Reference in New Issue
Block a user