diff --git a/src/components/ADempiere/Field/FieldNumber.vue b/src/components/ADempiere/Field/FieldNumber.vue index c8753df0..a08e1a7f 100644 --- a/src/components/ADempiere/Field/FieldNumber.vue +++ b/src/components/ADempiere/Field/FieldNumber.vue @@ -31,8 +31,7 @@ v-model="displayedValue" :placeholder="metadata.help" :disabled="isDisabled" - :precision="precision" - :class="'display-type-amount ' + metadata.cssClassName" + :class="cssClassStyle" readonly @blur="customFocusLost" @focus="customFocusGained" diff --git a/src/store/modules/user.js b/src/store/modules/user.js index e9ca0885..35448913 100644 --- a/src/store/modules/user.js +++ b/src/store/modules/user.js @@ -204,10 +204,14 @@ const actions = { responseGetInfo.defaultContextMap.get('#C_Country_ID'), 10 ) - // get country and currency - dispatch('getCountryFormServer', { - countryId - }) + if (isEmptyValue(countryId)) { + console.info('context session without Country ID') + } else { + // get country and currency + dispatch('getCountryFormServer', { + countryId + }) + } dispatch('getUserInfoFromSession', sessionUuid) .catch(error => { @@ -448,7 +452,14 @@ const getters = { return state.country }, getCurrency: (state) => { - return state.country.currency + const currency = state.country.currency + if (isEmptyValue(currency)) { + return { + stdPrecision: 2, + iSOCode: 'USD' + } + } + return currency }, getCountryLanguage(state) { return state.country.language.replace('_', '-')