|
|
@@ -842,11 +842,20 @@ class ConfigController extends BaseController {
|
|
|
$currencies = array_filter($currencies, fn($item) => in_array($item['ID'], $countriesCurrencyIds));
|
|
|
$currencies = array_values($currencies);
|
|
|
|
|
|
- foreach ($currencies as &$currency) {
|
|
|
- $currency['PRODUCT_RATE'] = $currencyConversion[$currency['ID']]['PRODUCT_RATE'] ?? 0;
|
|
|
- $currency['BONUSES_RATE'] = $currencyConversion[$currency['ID']]['BONUSES_RATE'] ?? 0;
|
|
|
+ foreach ($countries as &$country) {
|
|
|
+ $currency = $currencyConversion[$country['LOCAL_CURRENCY_ID']];
|
|
|
+
|
|
|
+ $country['currency'] = $currency['NAME'];
|
|
|
+ $country['currencyCode'] = $currency['CODE'];
|
|
|
+ $country['productRate'] = $currencyConversion[$currency['ID']]['PRODUCT_RATE'] ?? 0;
|
|
|
+ $country['bonusesRate'] = $currencyConversion[$currency['ID']]['BONUSES_RATE'] ?? 0;
|
|
|
}
|
|
|
|
|
|
+// foreach ($currencies as &$currency) {
|
|
|
+// $currency['PRODUCT_RATE'] = $currencyConversion[$currency['ID']]['PRODUCT_RATE'] ?? 0;
|
|
|
+// $currency['BONUSES_RATE'] = $currencyConversion[$currency['ID']]['BONUSES_RATE'] ?? 0;
|
|
|
+// }
|
|
|
+
|
|
|
return static::notice(['data' => $currencies]);
|
|
|
}
|
|
|
|