Optimised Service Display, extended SSL module functionality

This commit is contained in:
Deon George
2016-07-27 14:25:17 +10:00
parent 3d3c38b0a0
commit 5ab2d6205f
30 changed files with 455 additions and 258 deletions

View File

@@ -100,10 +100,11 @@ $(document).ready(function() {
});
');
// @todo Move this to automatically add this if a date format is used
Block::factory()
->type('form-horizontal')
->title('Add/View Charge')
->title_icon('icon-wrench')
->title_icon('fa fa-wrench')
->body(View::factory('service/admin/add'));
}
@@ -169,7 +170,7 @@ $(document).ready(function() {
Block::factory()
->type('form-horizontal')
->title(sprintf('%s: %s %s',_('Update Service'),$id,$so->name()))
->title_icon('icon-wrench')
->title_icon('fa fa-wrench')
->body(View::factory('service/admin/edit')
->set('o',$so)
->set('plugin_form',$so->plugin_edit())

View File

@@ -156,7 +156,7 @@ class Model_Service extends ORM_OSB {
/**
* List invoices for this service
*/
public function invoice_list($due=FALSE) {
public function invoice_list($due=FALSE,$num=NULL) {
$result = array();
$x = $this->invoice->distinct('id');
@@ -165,6 +165,9 @@ class Model_Service extends ORM_OSB {
if ($due)
$x->where_unprocessed();
if (! is_null($num))
$x->limit($num);
foreach ($x->find_all() as $io)
if (! $due OR $io->due())
array_push($result,$io);