Many updates as a result of updating lnapp; added SSL service order

This commit is contained in:
Deon George
2016-06-05 22:33:12 +10:00
parent 44769e3de7
commit 0c7fe830a3
25 changed files with 384 additions and 268 deletions

View File

@@ -270,8 +270,8 @@ class Model_Service extends ORM_OSB {
/**
* Return a descriptive name for this service
*/
public function service_name() {
return is_null($x=$this->plugin()) ? $this->name() : $x->service_name();
public function service_name($chars=NULL) {
return HTML::abbr(is_null($x=$this->plugin()) ? $this->name() : $x->service_name(),$chars);
}
/**
@@ -385,7 +385,14 @@ class Model_Service extends ORM_OSB {
*/
public function list_invoicesoon($days=0) {
return $this->_where_active()
->where_open()->where('suspend_billing','IS',NULL)->or_where('suspend_billing','=','0')->where_close()
->where_open()
->where('suspend_billing','IS',NULL)
->or_where('suspend_billing','=','0')
->where_close()
->where_open()
->or_where('external_billing','=','0')
->or_where('external_billing','IS',NULL)
->where_close()
->where('date_next_invoice','<',time()+(ORM::factory('Invoice')->config('GEN_DAYS')+$days)*86400)
->find_all();
}