public function getCountryList()
 {
     $country_list_arr = array();
     $country_arr = CurrencyExchangeRate::whereRaw("status = ? ORDER BY country", array('Active'))->get(array('country', 'country_code'));
     foreach ($country_arr as $value) {
         $country_list_arr[$value['country_code']] = $value['country'];
     }
     return $country_list_arr;
 }
示例#2
0
文件: CUtil.php 项目: agriya/products
 /**
  * CUtil::chkIsValidCurrency()
  * added by periyasami_145at11
  *
  * @param mixed $currency_code
  * @return
  */
 public static function chkIsValidCurrency($currency_code)
 {
     $details = array();
     $selected_currency_code = CurrencyExchangeRate::whereRaw('currency_code= ? AND status = "Active" AND display_currency = "Yes" ', array($currency_code))->first();
     if (count($selected_currency_code)) {
         $details['country'] = $selected_currency_code['country'];
         $details['currency_code'] = $selected_currency_code['currency_code'];
         $details['exchange_rate'] = $selected_currency_code['exchange_rate'];
         $details['currency_symbol'] = $selected_currency_code['currency_symbol'];
     }
     return $details;
 }