Fixes for live environment and updates to admin/service/update
This commit is contained in:
@@ -15,7 +15,7 @@ class Model_Account extends Model_Auth_UserDefault {
|
||||
'group' => array('through' => 'account_group'),
|
||||
'invoice' => array('far_key'=>'id'),
|
||||
'payment'=>array(),
|
||||
'service' => array(),
|
||||
'service' => array('far_key'=>'id'),
|
||||
);
|
||||
|
||||
/**
|
||||
|
@@ -13,7 +13,7 @@
|
||||
class Model_ADSL_Supplier extends ORMOSB {
|
||||
// Relationships
|
||||
protected $_has_many = array(
|
||||
'adsl_supplier_plan'=>array('foreign_key'=>'supplier_id'),
|
||||
'adsl_supplier_plan'=>array('foreign_key'=>'supplier_id','far_key'=>'id'),
|
||||
);
|
||||
|
||||
protected $_updated_column = FALSE;
|
||||
@@ -32,7 +32,8 @@ class Model_ADSL_Supplier extends ORMOSB {
|
||||
foreach ($aspo->adsl_plan->find_all() as $apo)
|
||||
// Find all the services who use this plan
|
||||
foreach ($apo->service->find_all() as $so)
|
||||
array_push($services,$so);
|
||||
if (! $active OR $so->active)
|
||||
array_push($services,$so);
|
||||
|
||||
return $services;
|
||||
}
|
||||
|
@@ -13,7 +13,7 @@
|
||||
class Model_ADSL_Supplier_Plan extends ORMOSB {
|
||||
// Relationships
|
||||
protected $_has_many = array(
|
||||
'adsl_plan'=>array(),
|
||||
'adsl_plan'=>array('far_key'=>'id'),
|
||||
);
|
||||
protected $_belongs_to = array(
|
||||
'adsl_supplier'=>array('foreign_key'=>'supplier_id'),
|
||||
|
@@ -71,7 +71,7 @@ function CORE_database_join_fields($result, $linked)
|
||||
while (!$rss->EOF) {
|
||||
for ($ii=0; $ii < count($result); $ii++ ) {
|
||||
if($result[$ii][$field] == $rss->fields[id]) {
|
||||
if(ereg(',',$link_field)) {
|
||||
if(preg_match('/,/',$link_field)) {
|
||||
$fields = explode(',',$link_field);
|
||||
for($iii=0; $iii<count($fields); $iii++) {
|
||||
$fieldname = $fields[$iii];
|
||||
@@ -91,4 +91,4 @@ function CORE_database_join_fields($result, $linked)
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
?>
|
||||
?>
|
||||
|
@@ -56,7 +56,7 @@ class email_template extends OSB_module {
|
||||
$template = $db->Execute(sqlselect($db,'email_template','*',array('name'=>$template_name)));
|
||||
|
||||
# If the template is not active, return.
|
||||
if (! $template || $template->fields['status'] != '1')
|
||||
if (! $template || $template->fields['active'] != '1')
|
||||
return;
|
||||
|
||||
# Setup our Email
|
||||
|
@@ -37,10 +37,13 @@ class Controller_Admin_Export extends Controller_TemplateDefault {
|
||||
* This is the main call to export, providing a list of items to export and
|
||||
* setting up the page to call the export plugin when submitted.
|
||||
*/
|
||||
public function action_index($daysago=30) {
|
||||
public function action_index($daysago) {
|
||||
// @todo this should come from a file list
|
||||
$TBRexportplugins = array('quicken'=>'Export to Quicken');
|
||||
|
||||
if (! $daysago)
|
||||
$daysago = 30;
|
||||
|
||||
$payments = ORM::factory('payment')
|
||||
->export($daysago);
|
||||
|
||||
|
@@ -16,7 +16,7 @@ class Export {
|
||||
|
||||
public function __construct() {
|
||||
$this->plugin = preg_replace('/^'.get_parent_class($this).'_/','',get_class($this));
|
||||
$this->request = Request::current();
|
||||
$this->response = Response::factory();
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
@@ -190,9 +190,9 @@ class Export_Quicken extends Export {
|
||||
}
|
||||
|
||||
if (! empty($qo))
|
||||
$this->request->response = $qo->export();
|
||||
$this->response->body($qo->export());
|
||||
|
||||
$this->request->send_file(TRUE,'quicken-import.iif');
|
||||
$this->response->send_file(TRUE,'quicken-import.iif',array('mime_type'=>'text/plain'));
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
@@ -203,7 +203,7 @@ class pdf_invoice_overview extends pdf_invoice_base {
|
||||
$this->SetXY($x,$y); $this->Cell(0,0,'This invoice can also be paid by:'); $y += 4;
|
||||
|
||||
# Direct Credit
|
||||
$logo = sprintf('%s/%s',PATH_THEMES.DEFAULT_THEME,'invoice/invoice-payment-dd.png');
|
||||
$logo = sprintf('%s/%s','/afs/local/home/gh/.web/au.net.graytech.www/osb/modules/invoice/media/img/','invoice-payment-dd.png');
|
||||
$this->Image($logo,$x+1,$y,8);
|
||||
$this->SetFont('helvetica','B',8);
|
||||
$this->SetXY($x+10,$y); $this->Cell(0,0,'Direct Credit to our Bank Account'); $y += 3;
|
||||
@@ -231,7 +231,8 @@ class pdf_invoice_overview extends pdf_invoice_base {
|
||||
|
||||
# Paypal
|
||||
$y += 3;
|
||||
$logo = sprintf('%s/%s',PATH_THEMES.DEFAULT_THEME,'invoice/invoice-payment-pp.png');
|
||||
// $logo = sprintf('%s/%s',PATH_THEMES.DEFAULT_THEME,'invoice/invoice-payment-pp.png');
|
||||
$logo = sprintf('%s/%s','/afs/local/home/gh/.web/au.net.graytech.www/osb/modules/invoice/media/img/','invoice-payment-pp.png');
|
||||
$this->Image($logo,$x+1,$y,8);
|
||||
$this->SetFont('helvetica','B',8);
|
||||
$this->SetXY($x+10,$y); $this->Cell(0,0,'Pay Pal/Credit Card'); $y += 3;
|
||||
|
@@ -618,7 +618,7 @@ class invoice extends OSB_module {
|
||||
$account_where = '';
|
||||
|
||||
if (is_null($fields))
|
||||
$fields = 'DISTINCT service.id AS sid,account.id AS account_id,invoice.id AS iid,FROM_UNIXTIME(service.date_next_invoice,\'%Y-%m-%d\') AS invoice_date,service.sku AS sku,service.price AS price,account.first_name AS first_name,account.last_name AS last_name,account.currency_id AS billed_currency_id,service.date_orig AS date_orig';
|
||||
$fields = 'DISTINCT service.id AS sid,account.id AS account_id,FROM_UNIXTIME(service.date_next_invoice,\'%Y-%m-%d\') AS invoice_date,service.sku AS sku,service.price AS price,account.first_name AS first_name,account.last_name AS last_name,account.currency_id AS billed_currency_id,service.date_orig AS date_orig';
|
||||
|
||||
if (is_null($orderby))
|
||||
$orderby = 'ORDER BY account_id,invoice_date,sid';
|
||||
@@ -638,7 +638,6 @@ class invoice extends OSB_module {
|
||||
SELECT %s
|
||||
FROM {p}service AS service
|
||||
JOIN {p}account AS account ON (service.account_id=account.id AND account.site_id={s})
|
||||
LEFT JOIN {p}invoice AS invoice ON (service.invoice_id=invoice.id AND invoice.site_id={s})
|
||||
%s
|
||||
WHERE service.site_id={s}
|
||||
AND service.active=1
|
||||
|
@@ -13,7 +13,7 @@
|
||||
class Model_Payment extends ORMOSB {
|
||||
// Relationships
|
||||
protected $_has_many = array(
|
||||
'payment_item'=>array(),
|
||||
'payment_item'=>array('far_key'=>'id'),
|
||||
'invoice'=>array('through'=>'payment_item'),
|
||||
);
|
||||
protected $_belongs_to = array(
|
||||
@@ -23,9 +23,13 @@ class Model_Payment extends ORMOSB {
|
||||
|
||||
protected $_sorting = array('date_payment'=>'DESC');
|
||||
|
||||
protected $_formats = array(
|
||||
'date_payment'=>array('Model_Invoice::_filters'=>array('date','d-m-Y')),
|
||||
'total_amt'=>array('Currency::display'=>array()),
|
||||
protected $_display_filters = array(
|
||||
'date_payment'=>array(
|
||||
array('Config::date',array(':value')),
|
||||
),
|
||||
'total_amt'=>array(
|
||||
array('Currency::display',array(':value')),
|
||||
),
|
||||
);
|
||||
|
||||
/**
|
||||
|
@@ -144,5 +144,14 @@ class Model_Product extends ORMOSB {
|
||||
else
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
public function show_thumb() {
|
||||
$mediapath = Route::get('default/media');
|
||||
|
||||
$thumb = $mediapath->uri(array('file'=>'img/thumbnails/'.$this->thumbnail));
|
||||
|
||||
// @todo Change the ALT to the product name.
|
||||
echo HTML::image($thumb,array('alt'=>_('Thumb Nail')));
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
@@ -27,14 +27,16 @@ echo Form::open('cart/add');
|
||||
<td style="background-color: #FFFFFF;">
|
||||
<table width="100%" border="0" cellpadding="4">
|
||||
<tr>
|
||||
<td class="body"><?php echo $translate->description_full; ?></td>
|
||||
<td class="body" rowspan="3"><?php echo $translate->description_full; ?></td>
|
||||
<td style="text-align: right;"><?php if ($record->thumbnail) $record->show_thumb(); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<?php if ($record->prod_plugin && method_exists($record->prod_plugin_file,'product_view')) {
|
||||
$pio = new $record->prod_plugin_file;
|
||||
echo '<td style="vertical-align: top;">'.$pio->product_view($record->prod_plugin_data).'</td>';
|
||||
echo '<td style="vertical-align: bottom;">'.$pio->product_view($record->prod_plugin_data).'</td>';
|
||||
} ?>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="spacer"> </td>
|
||||
<?php if ($record->prod_plugin && method_exists($record->prod_plugin_file,'contract_view')) {
|
||||
$pio = new $record->prod_plugin_file;
|
||||
echo '<td style="vertical-align: top;">'.$pio->contract_view($record->prod_plugin_data,$record->price_base,$record->price_setup).'</td>';
|
||||
|
@@ -9,7 +9,6 @@
|
||||
* @author Deon George
|
||||
* @copyright (c) 2010 Open Source Billing
|
||||
* @license http://dev.osbill.net/license.html
|
||||
* @todo Replace View::factory files to use $this->viewpath()
|
||||
*/
|
||||
class Controller_Admin_Service extends Controller_TemplateDefault {
|
||||
protected $control = array('Services'=>'services');
|
||||
@@ -51,14 +50,14 @@ ORDER BY c.id,s.recur_schedule,c.name,a.company,a.last_name,a.first_name
|
||||
|
||||
if (($si != $last_account) AND $last_account) {
|
||||
if ($sc > 1)
|
||||
$output .= View::factory('service/list/bycheckout_subtotal')
|
||||
$output .= View::factory('service/admin/list/bycheckout_subtotal')
|
||||
->set('subtotal',Currency::display($st))
|
||||
->set('i',$i++%2);
|
||||
$sc = $st = 0;
|
||||
}
|
||||
|
||||
if (($service['cid'] != $last_checkout) OR (! is_null($last_checkout) AND ! $last_checkout)) {
|
||||
$output .= View::factory('service/list/bycheckout_header')
|
||||
$output .= View::factory('service/admin/list/bycheckout_header')
|
||||
->set('checkout_name',$service['checkout_plugin_name'])
|
||||
->set('last_checkout',$last_checkout);
|
||||
}
|
||||
@@ -69,14 +68,14 @@ ORDER BY c.id,s.recur_schedule,c.name,a.company,a.last_name,a.first_name
|
||||
$st += round($so->price+$so->tax(),2);
|
||||
$sc++;
|
||||
|
||||
$output .= View::factory('service/list/bycheckout_body')
|
||||
$output .= View::factory('service/admin/list/bycheckout_body')
|
||||
->set('service',$so)
|
||||
->set('i',$i++%2);
|
||||
}
|
||||
|
||||
// Last subtotal
|
||||
if ($sc > 1)
|
||||
$output .= View::factory('service/list/bycheckout_subtotal')
|
||||
$output .= View::factory('service/admin/list/bycheckout_subtotal')
|
||||
->set('subtotal',$st)
|
||||
->set('i',$i++%2);
|
||||
|
||||
@@ -124,13 +123,13 @@ ORDER BY C.last_name,B.account_id,A.service_number
|
||||
if ($i)
|
||||
$output .= '<tr><td colspan="10"> </td></tr>';
|
||||
|
||||
$output .= View::factory('service/list/adslservices_header')
|
||||
$output .= View::factory('service/admin/list/adslservices_header')
|
||||
->set('service',$so);
|
||||
|
||||
$last_account = $so->account_id;
|
||||
}
|
||||
|
||||
$output .= View::factory('service/list/adslservices_body')
|
||||
$output .= View::factory('service/admin/list/adslservices_body')
|
||||
->set('service',$so)
|
||||
->set('i',$i++%2);
|
||||
}
|
||||
@@ -218,13 +217,13 @@ ORDER BY C.last_name,B.account_id,A.service_number
|
||||
if ($i)
|
||||
$output .= '<tr><td colspan="10"> </td></tr>';
|
||||
|
||||
$output .= View::factory('service/list/adslservices_header')
|
||||
$output .= View::factory('service/admin/list/adslservices_header')
|
||||
->set('service',$so);
|
||||
|
||||
$last_account = $so->account_id;
|
||||
}
|
||||
|
||||
$output .= View::factory('service/list/adslservices_body')
|
||||
$output .= View::factory('service/admin/list/adslservices_body')
|
||||
->set('service',$so)
|
||||
->set('i',$i++%2);
|
||||
}
|
||||
@@ -294,7 +293,7 @@ GROUP BY DATE_FORMAT(DATE,"%%Y-%%m"),SID
|
||||
$i = $j = 0;
|
||||
$total = 0;
|
||||
$summary = '';
|
||||
$output = View::factory('service/list/adslbilling_head');
|
||||
$output = View::factory('service/admin/list/adslbilling_head');
|
||||
$output .= '<table class="box-left">';
|
||||
foreach ($aso->services(TRUE) as $so) {
|
||||
// Reset our uploaded data
|
||||
@@ -307,7 +306,7 @@ GROUP BY DATE_FORMAT(DATE,"%%Y-%%m"),SID
|
||||
|
||||
// Record the the exception if the cost is not expected
|
||||
if (round($so->service_adsl->adsl_plan->adsl_supplier_plan->base_cost+$so->service_adsl->adsl_plan->adsl_supplier_plan->tax(),2) != $uploaded['amount']) {
|
||||
$summary .= View::factory('service/list/adslbilling_summary')
|
||||
$summary .= View::factory('service/admin/list/adslbilling_summary')
|
||||
->set('service',$so)
|
||||
->set('amount',$uploaded['amount'])
|
||||
->set('i',$j++%2);
|
||||
@@ -325,7 +324,7 @@ GROUP BY DATE_FORMAT(DATE,"%%Y-%%m"),SID
|
||||
}
|
||||
$total += $uploaded['amount'];
|
||||
|
||||
$output .= View::factory('service/list/adslbilling_body')
|
||||
$output .= View::factory('service/admin/list/adslbilling_body')
|
||||
->set('service',$so)
|
||||
->set('checked',$uploaded['checked'])
|
||||
->set('amount',$uploaded['amount'])
|
||||
@@ -333,7 +332,7 @@ GROUP BY DATE_FORMAT(DATE,"%%Y-%%m"),SID
|
||||
->set('i',$i++%2);
|
||||
}
|
||||
|
||||
$output .= View::factory('service/list/adslbilling_foot')
|
||||
$output .= View::factory('service/admin/list/adslbilling_foot')
|
||||
->set('total',$total);
|
||||
|
||||
$output .= '</table>';
|
||||
@@ -341,7 +340,7 @@ GROUP BY DATE_FORMAT(DATE,"%%Y-%%m"),SID
|
||||
// Summary Report of remaining CSV items.
|
||||
if (! empty($csv))
|
||||
foreach ($csv as $service => $item) {
|
||||
$summary .= View::factory('service/list/adslbilling_summary_exception')
|
||||
$summary .= View::factory('service/admin/list/adslbilling_summary_exception')
|
||||
->set('service',$service)
|
||||
->set('item',$item)
|
||||
->set('i',$j++%2);
|
||||
@@ -433,8 +432,31 @@ GROUP BY DATE_FORMAT(DATE,"%%Y-%%m"),SID
|
||||
'title'=>sprintf('%s %s:%s',_('Update Service'),$so->id(),$so->name()),
|
||||
'body'=>View::factory($so->viewpath())
|
||||
->set('so',$so)
|
||||
->set('mediapath',Route::get('default/media'))
|
||||
->set('plugin_form',$so->admin_update()),
|
||||
));
|
||||
|
||||
// @todo Investigate a better way of preparing for jscalendar
|
||||
Script::add(array(
|
||||
'type'=>'file',
|
||||
'data'=>'js/dhtml.calendar.js',
|
||||
));
|
||||
Script::add(array(
|
||||
'type'=>'file',
|
||||
'data'=>'js/dhtml.calendar-setup.js',
|
||||
));
|
||||
Script::add(array(
|
||||
'type'=>'file',
|
||||
'data'=>'js/dhtml.calendar-en.js',
|
||||
));
|
||||
Script::add(array(
|
||||
'type'=>'file',
|
||||
'data'=>'js/dhtml.date_selector.js',
|
||||
));
|
||||
Style::add(array(
|
||||
'type'=>'file',
|
||||
'data'=>'css/dhtml.calendar.css',
|
||||
));
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
@@ -32,7 +32,7 @@ class Controller_User_Service extends Controller_TemplateDefault {
|
||||
public function action_list() {
|
||||
Block::add(array(
|
||||
'title'=>sprintf('%s: %s - %s',_('Services For'),$this->ao->accnum(),$this->ao->name(TRUE)),
|
||||
'body'=>View::factory('service/list')
|
||||
'body'=>View::factory('service/user/list')
|
||||
->set('services',$this->ao->service->find_all()),
|
||||
));
|
||||
}
|
||||
@@ -47,7 +47,7 @@ class Controller_User_Service extends Controller_TemplateDefault {
|
||||
|
||||
Block::add(array(
|
||||
'title'=>sprintf('%s: %s',$so->id(),$so->product->name()),
|
||||
'body'=>View::factory('service/view')
|
||||
'body'=>View::factory('service/user/view')
|
||||
->set('so',$so),
|
||||
));
|
||||
}
|
||||
|
@@ -76,7 +76,7 @@ class Model_Service extends ORMOSB {
|
||||
/**
|
||||
* Return the object of the product plugin
|
||||
*/
|
||||
public function plugin() {
|
||||
private function plugin() {
|
||||
if (! $this->product->prod_plugin_file)
|
||||
return NULL;
|
||||
|
||||
|
@@ -183,7 +183,8 @@ class Model_Service_ADSL extends Model_Service {
|
||||
}
|
||||
|
||||
public function traffic_lastmonth($string=TRUE) {
|
||||
return $this->traffic_month(strtotime('last month'),$string);
|
||||
// We need it to be last month as of yesterday
|
||||
return $this->traffic_month(strtotime('last month')-86400,$string);
|
||||
}
|
||||
|
||||
public function traffic_thismonth($string=TRUE) {
|
||||
@@ -225,8 +226,8 @@ class Model_Service_ADSL extends Model_Service {
|
||||
|
||||
$traffic_type = $this->get_traffic_data_daily($period,TRUE);
|
||||
$day = count($traffic_type) ? max(array_keys($traffic_type)) : 1;
|
||||
$date = mktime(0,0,0,date('m',$period),$day,date('Y',$period));
|
||||
$daysleft = date('d',strtotime('last day ',$date))-$day;
|
||||
$date = mktime(0,0,0,date('n',$period),$day,date('Y',$period));
|
||||
$daysleft = date('d',strtotime('last day of',$date))-$day;
|
||||
|
||||
$google = GoogleChart::factory('vertical_bar');
|
||||
$google->title = sprintf('DSL traffic usage as at %s',Config::date($date));
|
||||
@@ -248,7 +249,7 @@ class Model_Service_ADSL extends Model_Service {
|
||||
switch ($item) {
|
||||
case 'MONTH_GRAPH': $value = (string)$google; break;
|
||||
case 'MONTH_TABLE': $value = $google->html_table(FALSE,array(
|
||||
'table'=>'style="border: 1px solid #bebcb7; padding: 5px 5px; background: none repeat scroll 0% 0% #f8f7f5;"',
|
||||
'table'=>'style="border: 1px solid #bebcb7; padding: 5px 5px; background: none repeat scroll 0% 0% #f8f7f5; font-size: 70%;"',
|
||||
)); break;
|
||||
|
||||
case 'OFFPEAK_ALLOWANCE': $value = isset($allowance['base_down_offpeak']) ? $allowance['base_down_offpeak'].' MB' : '-'; break;
|
||||
@@ -331,7 +332,7 @@ class Model_Service_ADSL extends Model_Service {
|
||||
}
|
||||
|
||||
protected function _service_view() {
|
||||
return View::factory('service/adsl/view')
|
||||
return View::factory($this->viewpath(strtolower($this->service->prod_plugin_name)))
|
||||
->set('so',$this);
|
||||
}
|
||||
|
||||
@@ -356,13 +357,14 @@ class Model_Service_ADSL extends Model_Service {
|
||||
|
||||
protected function _admin_update() {
|
||||
return View::factory($this->viewpath(strtolower($this->service->prod_plugin_name)))
|
||||
->set('mediapath',Route::get('default/media'))
|
||||
->set('so',$this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Render a google chart of traffic
|
||||
*/
|
||||
public function graph_traffic($month=null) {
|
||||
public function graph_traffic($month=NULL) {
|
||||
$google = GoogleChart::factory('vertical_bar');
|
||||
|
||||
// If we came in via a post to show a particular month, then show that, otherwise show the yearly result
|
||||
@@ -382,9 +384,6 @@ class Model_Service_ADSL extends Model_Service {
|
||||
'axis'=>'r',
|
||||
'data'=>array((isset($friendly['cumulative'.$k]) ? $friendly['cumulative'.$k] : 'cumulative'.$k)=>$this->cumulative($traffic_data[$k]))));
|
||||
|
||||
$graph_data = View::factory('service/view_detail_adsl_traffic')
|
||||
->set('traffic',$this->traffic_month(strtotime($_POST['month'].'-01'),FALSE));
|
||||
|
||||
} else {
|
||||
// @todo Change the date to the last record date
|
||||
$google->title = sprintf('Monthly DSL traffic usage as at %s',Config::date(strtotime('yesterday')));
|
||||
@@ -399,5 +398,10 @@ class Model_Service_ADSL extends Model_Service {
|
||||
|
||||
return (string)$google;
|
||||
}
|
||||
|
||||
public function table_traffic($month=NULL) {
|
||||
return View::factory('service/user/adsl/table_traffic')
|
||||
->set('traffic',$this->traffic_month((! is_null($month) AND trim($month)) ? strtotime($month.'-01') : NULL,FALSE));
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
@@ -1,36 +1,36 @@
|
||||
<!-- @todo NEEDS TO BE TRANSLATED -->
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td class="head">Plugin Details</td>
|
||||
<td class="head" colspan="2">Plugin Details</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width: 50%; vertical-align: top;">
|
||||
<table>
|
||||
<tr>
|
||||
<td style="width: 40%;">Service Number</td>
|
||||
<td style="width: 60%;" class="data"><?php echo Form::input('plugin[service_number]',$so->service_number); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Service Address</td>
|
||||
<td class="data"><?php echo Form::input('plugin[service_address]',$so->service_address); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Service Connect Date</td>
|
||||
<td class="data"><?php echo Form::input('plugin[service_connect_date]',$so->service_connect_date); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Service Username</td>
|
||||
<td class="data"><?php echo Form::input('plugin[service_username]',$so->service_username); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Service Password</td>
|
||||
<td class="data"><?php echo Form::input('plugin[service_password]',$so->service_password); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Service IP Address</td>
|
||||
<td class="data"><?php echo Form::input('plugin[ipaddress]',$so->ipaddress); ?></td>
|
||||
</tr>
|
||||
</table>
|
||||
<td style="width: 40%;">Service Number</td>
|
||||
<td style="width: 60%;" class="data"><?php echo Form::input('plugin[service_number]',$so->service_number); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Service Address</td>
|
||||
<td class="data"><?php echo Form::input('plugin[service_address]',$so->service_address); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Service Connect Date</td>
|
||||
<td class="data">
|
||||
<?php echo Form::input('plugin[service_connect_date]',$so->service_connect_date,array('id'=>'service_connect_date')); ?>
|
||||
<?php echo HTML::anchor('#',
|
||||
HTML::image($mediapath->uri(array('file'=>'img/calendar.png')),array('alt'=>_('Calendar'),'style'=>'cursor: pointer;')),
|
||||
array('title'=>'Click to popup a dialog to select a date graphically','onclick'=>"dateSelector('service_connect_date')")); ?>
|
||||
<script type="text/javascript">defaults['service_connect_date'] = '%s';</script>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Service Username</td>
|
||||
<td class="data"><?php echo Form::input('plugin[service_username]',$so->service_username); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Service Password</td>
|
||||
<td class="data"><?php echo Form::input('plugin[service_password]',$so->service_password); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Service IP Address</td>
|
||||
<td class="data"><?php echo Form::input('plugin[ipaddress]',$so->ipaddress); ?></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
@@ -2,7 +2,7 @@
|
||||
<td><?php echo $service->service_adsl->display('service_number'); ?></td>
|
||||
<td><?php echo $service->service_adsl->ipaddress(); ?></td>
|
||||
<td><?php printf('%s (%s)',$service->name(),$service->id); ?></td>
|
||||
<td><?php echo $service->service_adsl->adsl_plan->allowance(); ?></td>
|
||||
<td><?php echo $service->product->prod_plugin_file ? $service->product->plugin()->allowance() : 'No Details'; ?></td>
|
||||
<td><?php echo $service->service_adsl->traffic_thismonth(); ?></td>
|
||||
<td><?php echo $service->service_adsl->traffic_lastmonth(); ?></td>
|
||||
<td><?php echo $service->display('price'); ?></td>
|
@@ -3,7 +3,7 @@
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td style="width: 50%; vertical-align: top;">
|
||||
<table>
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td style="width: 40%;">Service Active</td>
|
||||
<td style="width: 60%;" class="data"><?php echo StaticList_YesNo::form('active',$so->active); ?></td>
|
||||
@@ -22,7 +22,13 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Date Next Invoice</td>
|
||||
<td class="data"><?php echo $so->display('date_next_invoice'); ?></td>
|
||||
<td class="data">
|
||||
<?php echo Form::input('date_next_invoice',$so->date_next_invoice,array('id'=>'date_next_invoice')); ?>
|
||||
<?php echo HTML::anchor('#',
|
||||
HTML::image($mediapath->uri(array('file'=>'img/calendar.png')),array('alt'=>_('Calendar'),'style'=>'cursor: pointer;')),
|
||||
array('title'=>'Click to popup a dialog to select a date graphically','onclick'=>"dateSelector('date_next_invoice')")); ?>
|
||||
<script type="text/javascript">defaults['date_next_invoice'] = '%s';</script>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Taxable</td>
|
||||
|
@@ -67,6 +67,7 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2"><?php echo $so->graph_traffic(isset($_POST['month']) ? $_POST['month'] : ''); ?><td>
|
||||
<td><?php echo $so->graph_traffic(isset($_POST['month']) ? $_POST['month'] : ''); ?><td>
|
||||
<td><?php echo $so->table_traffic(isset($_POST['month']) ? $_POST['month'] : ''); ?><td>
|
||||
</tr>
|
||||
</table>
|
@@ -12,7 +12,7 @@
|
||||
<tr class="<?php echo ++$i%2 ? 'odd' : 'even'; ?>">
|
||||
<td><?php echo HTML::anchor('user/service/view/'.$service->id,$service->id); ?></td>
|
||||
<td><?php echo $service->display('type'); ?></td>
|
||||
<td><?php echo $service->invoice_display(); ?></td>
|
||||
<td><?php echo $service->name(); ?></td>
|
||||
<td><?php echo $service->display('recur_schedule');?></td>
|
||||
<td><?php echo $service->display('price'); ?></td>
|
||||
<td><?php echo $service->display('active'); ?></td>
|
@@ -18,7 +18,7 @@ class Model_StaticPage extends ORMOSB {
|
||||
);
|
||||
|
||||
protected $_has_many = array(
|
||||
'staticpage_translate'=>array('foreign_key'=>'static_page_id'),
|
||||
'staticpage_translate'=>array('foreign_key'=>'static_page_id','far_key'=>'id'),
|
||||
);
|
||||
|
||||
protected $_belongs_to = array(
|
||||
|
Reference in New Issue
Block a user