Consistent use of return , payment refund handling
This commit is contained in:
@@ -182,7 +182,7 @@ class Model_Service extends ORM_OSB {
|
||||
* Search for services matching a term
|
||||
*/
|
||||
public function list_autocomplete($term,$index='id',array $limit=array()) {
|
||||
$return = array();
|
||||
$result = array();
|
||||
|
||||
$this->clear();
|
||||
$this->where_active();
|
||||
@@ -200,12 +200,12 @@ class Model_Service extends ORM_OSB {
|
||||
}
|
||||
|
||||
foreach ($this->find_all() as $o)
|
||||
$return[$o->$index] = array(
|
||||
$result[$o->$index] = array(
|
||||
'value'=>$o->$index,
|
||||
'label'=>sprintf('SVC %s: %s',$o->id,Table::resolve($o,$value)),
|
||||
);
|
||||
|
||||
return $return;
|
||||
return $result;
|
||||
}
|
||||
|
||||
public function list_bylistgroup($cat) {
|
||||
@@ -237,13 +237,13 @@ class Model_Service extends ORM_OSB {
|
||||
* List invoices for this service
|
||||
*/
|
||||
public function list_invoices($due=FALSE) {
|
||||
$return = array();
|
||||
$result = array();
|
||||
|
||||
foreach ($this->invoice->find_all() as $io)
|
||||
if (! $due OR $io->due())
|
||||
array_push($return,$io);
|
||||
array_push($result,$io);
|
||||
|
||||
return $return;
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user