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

@@ -20,16 +20,16 @@ class Controller_Admin_Payment extends Controller_TemplateDefault_Admin {
);
public function action_ajaxlist() {
$return = array();
$result = array();
if (isset($_REQUEST['term']) AND trim($_REQUEST['term'])) {
$return += ORM::factory('Account')->list_autocomplete($_REQUEST['term']);
$return += ORM::factory('Invoice')->list_autocomplete($_REQUEST['term'],'account_id');
$result += ORM::factory('Account')->list_autocomplete($_REQUEST['term']);
$result += ORM::factory('Invoice')->list_autocomplete($_REQUEST['term'],'account_id');
}
$this->auto_render = FALSE;
$this->response->headers('Content-Type','application/json');
$this->response->body(json_encode(array_values($return)));
$this->response->body(json_encode(array_values($result)));
}
public function action_autoitemlist() {