Skip to content

Commit 8271b12

Browse files
authored
Fix Standard Precision (PanJiaChen#2922)
1 parent 5564c9e commit 8271b12

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/utils/ADempiere/formatValue/numberFormat.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ export function getCurrency() {
6161
* @returns {number}
6262
*/
6363
export function getStandardPrecision() {
64-
return store.getters.getStandardPrecision
64+
return store.getters['user/getCurrencyPrecision'].standard_precision
6565
}
6666

6767
/**
@@ -158,7 +158,7 @@ export function formatQuantity({ value, isInteger = false, precision }) {
158158
* @param {string} country
159159
* @returns {number}
160160
*/
161-
export function formatPrice({ value, currency, country = '' }) {
161+
export function formatPrice({ value, currency, country = '', precision }) {
162162
if (isEmptyValue(value)) {
163163
value = 0
164164
}
@@ -184,8 +184,8 @@ export function formatPrice({ value, currency, country = '' }) {
184184
style: 'currency',
185185
currency,
186186
useGrouping: true,
187-
// minimumFractionDigits: precision,
188-
// maximumFractionDigits: precision,
187+
minimumFractionDigits: precision,
188+
maximumFractionDigits: precision,
189189
minimumIntegerDigits: 1
190190
}).format(value)
191191
} catch (e) {

0 commit comments

Comments
 (0)