Consistent use of return , payment refund handling

This commit is contained in:
Deon George
2013-04-05 23:50:08 +11:00
parent 43dfd88bce
commit 52d9005b64
30 changed files with 255 additions and 210 deletions

View File

@@ -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;
}
/**