Consistent use of return , payment refund handling
This commit is contained in:
@@ -68,13 +68,13 @@ class Model_Account extends Model_Auth_UserDefault {
|
||||
* @param int Date (in secs) to only retrieve invoices prior to this date
|
||||
*/
|
||||
public function invoices_due($date=NULL) {
|
||||
$return = array();
|
||||
$result = array();
|
||||
|
||||
foreach ($this->invoices() as $io)
|
||||
if ((is_null($date) OR $io->date_orig < $date) AND $io->due())
|
||||
$return[$io->id] = $io;
|
||||
$result[$io->id] = $io;
|
||||
|
||||
return $return;
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -139,7 +139,7 @@ class Model_Account extends Model_Auth_UserDefault {
|
||||
* Search for accounts matching a term
|
||||
*/
|
||||
public function list_autocomplete($term,$index='id',array $limit=array()) {
|
||||
$return = array();
|
||||
$result = array();
|
||||
$ao = Auth::instance()->get_user();
|
||||
|
||||
$this->clear();
|
||||
@@ -183,12 +183,12 @@ class Model_Account extends Model_Auth_UserDefault {
|
||||
$this->and_where('id','IN',$ao->RTM->customers($ao->RTM));
|
||||
|
||||
foreach ($this->find_all() as $o)
|
||||
$return[$o->$index] = array(
|
||||
$result[$o->$index] = array(
|
||||
'value'=>$o->$index,
|
||||
'label'=>sprintf('ACC %s: %s',$o->id,Table::resolve($o,$value)),
|
||||
);
|
||||
|
||||
return $return;
|
||||
return $result;
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
Reference in New Issue
Block a user