Skip to content

EspoCRM – Open Source CRM Application

currencyAttribute prop

Yuri Kuznetsov1df75fcecea6
diff --git a/client/src/views/fields/currency.js b/client/src/views/fields/currency.js
index 3965ed101d..b451904238 100644
--- a/client/src/views/fields/currency.js
+++ b/client/src/views/fields/currency.js
@@ -100,6 +100,13 @@ class CurrencyFieldView extends FloatFieldView {
'range',
]
+ /**
+ * @protected
+ * @type {string}
+ * @since 9.2.6
+ */
+ currencyAttribute
+
/** @inheritDoc */
data() {
const currencyValue = this.model.get(this.currencyFieldName) ||
@@ -123,7 +130,7 @@ class CurrencyFieldView extends FloatFieldView {
setup() {
super.setup();
- this.currencyFieldName = this.name + 'Currency';
+ this.currencyFieldName = this.currencyAttribute ?? this.name + 'Currency';
this.defaultCurrency = this.getConfig().get('defaultCurrency');
this.currencyList = this.getConfig().get('currencyList') || [this.defaultCurrency];
this.decimalPlaces = this.getConfig().get('currencyDecimalPlaces');