示例#1
0
 public function getCurrencyId($_id = '')
 {
     // Used by Ajax to return Currency after selecting the Bank Account
     if (isset($this->_data['ajax'])) {
         if (!empty($this->_data['id'])) {
             $_id = $this->_data['id'];
         }
     }
     $account = new CBAccount();
     $account->load($_id);
     $currency = '';
     if ($account) {
         $currency = $account->currency_id;
     }
     if (isset($this->_data['ajax'])) {
         $this->view->set('value', $currency);
         $this->setTemplateName('text_inner');
     } else {
         return $currency;
     }
 }