Some fixes as a result of prior commit changing status to active
This commit is contained in:
parent
f753dfe502
commit
8bd409d86f
@ -455,7 +455,7 @@ class Model_Service_Plugin_Adsl extends Model_Service_Plugin {
|
||||
->join('service')
|
||||
->on('service.id','=',$this->_table_name.'.service_id')
|
||||
->where('service.account_id','IN',$ao->RTM->customers($ao->RTM))
|
||||
->and_where('service.status','=',1)
|
||||
->and_where('service.active','=',1)
|
||||
->where_open()
|
||||
->and_where($this->_table_name.'.service_number','like','%'.$term.'%')
|
||||
->or_where($this->_table_name.'.service_address','like','%'.$term.'%')
|
||||
|
@ -89,7 +89,7 @@ class Model_Service_Plugin_Domain extends Model_Service_Plugin {
|
||||
->join('service')
|
||||
->on('service.id','=',$this->_table_name.'.service_id')
|
||||
->where('service.account_id','IN',$ao->RTM->customers($ao->RTM))
|
||||
->and_where('service.status','=',1)
|
||||
->and_where('service.active','=',1)
|
||||
->and_where($this->_table_name.'.domain_name','like','%'.$term.'%');
|
||||
|
||||
return parent::list_autocomplete($term,$index,$value,$label,$limit,$options);
|
||||
|
@ -90,7 +90,7 @@ class Model_Service_Plugin_Host extends Model_Service_Plugin {
|
||||
->join('service')
|
||||
->on('service.id','=',$this->_table_name.'.service_id')
|
||||
->where('service.account_id','IN',$ao->RTM->customers($ao->RTM))
|
||||
->and_where('service.status','=',1)
|
||||
->and_where('service.active','=',1)
|
||||
->and_where($this->_table_name.'.domain_name','like','%'.$term.'%');
|
||||
|
||||
return parent::list_autocomplete($term,$index,$value,$label,$limit,$options);
|
||||
|
@ -65,6 +65,7 @@ class Invoice {
|
||||
$iio->recurring_schedule = $so->recur_schedule;
|
||||
$iio->date_start = $pdata['start_time'];
|
||||
$iio->date_stop = $pdata['end_time'];
|
||||
$iio->active = TRUE;
|
||||
|
||||
// Service Billing
|
||||
$iio->item_type = 0;
|
||||
@ -88,6 +89,7 @@ class Invoice {
|
||||
$iio->date_start = $co->date_orig;
|
||||
$iio->date_stop = $co->date_orig;
|
||||
$iio->item_type = $co->type;
|
||||
$iio->active = TRUE;
|
||||
|
||||
$this->_io->add_sub_item($iio);
|
||||
}
|
||||
@ -139,7 +141,7 @@ class Invoice {
|
||||
switch ($section) {
|
||||
case 'all':
|
||||
$token = ORM::factory('Module_Method_Token')
|
||||
->method(array('invoice','user_download'))
|
||||
->method(array('invoice','user:download'))
|
||||
->account($this->_io->account)
|
||||
->expire(time()+86400*21)
|
||||
->uses(3)
|
||||
|
@ -253,7 +253,7 @@ class Model_Invoice_Item extends ORM {
|
||||
|
||||
// This total of this item before discounts and taxes
|
||||
public function subtotal($format=FALSE) {
|
||||
$result = Currency::round($this->price_base*$this->quantity);
|
||||
$result = $this->price_base*$this->quantity;
|
||||
|
||||
return $format ? Currency::display($result) : $result;
|
||||
}
|
||||
|
@ -107,6 +107,7 @@ class Controller_Admin_Payment extends Controller_Payment {
|
||||
$pio->invoice_id = $k;
|
||||
$pio = $po->add_item($pio);
|
||||
|
||||
$v = str_replace(',','',$v);
|
||||
$pio->alloc_amt = is_numeric($v) ? $v : 0;
|
||||
}
|
||||
|
||||
|
@ -0,0 +1,34 @@
|
||||
<?php defined('SYSPATH') or die('No direct access allowed.');
|
||||
|
||||
/**
|
||||
* This class provides Admin Product management
|
||||
*
|
||||
* @package Product
|
||||
* @category Controllers/Admin
|
||||
* @author Deon George
|
||||
* @copyright (c) 2009-2013 Open Source Billing
|
||||
* @license http://dev.osbill.net/license.html
|
||||
*/
|
||||
class Controller_Admin_Product_Category extends Controller_TemplateDefault {
|
||||
protected $auth_required = TRUE;
|
||||
|
||||
protected $secure_actions = array(
|
||||
'list'=>FALSE,
|
||||
);
|
||||
|
||||
/**
|
||||
* Show a list of products
|
||||
*/
|
||||
public function action_list() {
|
||||
$this->meta->title = 'A|Product Category List';
|
||||
|
||||
$o = ORM::factory('Product_Category')->find_all()->as_array();
|
||||
Sort::MASort($o,array('name()'));
|
||||
|
||||
Block::factory()
|
||||
->title('Product Categories')
|
||||
->title_icon('fa fa-list')
|
||||
->body(View::factory('product/category/list')->set('o',$o));
|
||||
}
|
||||
}
|
||||
?>
|
@ -125,7 +125,7 @@ class Model_Service_Plugin_Ssl extends Model_Service_Plugin {
|
||||
}
|
||||
|
||||
public function download_button() {
|
||||
if (! $this->pk OR ! $this->service->status OR ! preg_match('/client/',$this->service->product->plugin()->extensions) OR $this->valid_to() < time())
|
||||
if (! $this->pk OR ! $this->service->active OR ! preg_match('/client/',$this->service->product->plugin()->extensions) OR $this->valid_to() < time())
|
||||
return '';
|
||||
|
||||
$output = Form::open(URL::link('user','ssl/download'),array('class'=>'form-inline'));
|
||||
|
Reference in New Issue
Block a user