diff --git a/CRM/Price/BAO/PriceField.php b/CRM/Price/BAO/PriceField.php index 244a32fbe44c..bac6d7a1a6e1 100644 --- a/CRM/Price/BAO/PriceField.php +++ b/CRM/Price/BAO/PriceField.php @@ -274,6 +274,7 @@ public static function addQuickFormElement( $config = CRM_Core_Config::singleton(); $currencySymbol = CRM_Core_DAO::getFieldValue('CRM_Financial_DAO_Currency', $config->defaultCurrency, 'symbol', 'name'); $qf->assign('currencySymbol', $currencySymbol); + $qf->assign('currency', $config->defaultCurrency); // get currency name for price field and option attributes $currencyName = $config->defaultCurrency; diff --git a/api/v3/utils.php b/api/v3/utils.php index 941593851321..93b899b5e0c7 100644 --- a/api/v3/utils.php +++ b/api/v3/utils.php @@ -2244,7 +2244,7 @@ function _civicrm_api3_validate_string(&$params, &$fieldName, &$fieldInfo, $enti if ($fieldName == 'currency') { //When using IN operator $fieldValue is a array of currency codes if (!CRM_Utils_Rule::currencyCode($value)) { - throw new Exception("Currency not a valid code: $currency"); + throw new Exception("Currency not a valid code: $value"); } } }