Optimised Service Display, extended SSL module functionality
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user