Skip to content

Commit df3c9f9

Browse files
author
Stanislav Idolov
authored
ENGCOM-1084: precision for price overriding by js #14350
2 parents 3b307f2 + c656229 commit df3c9f9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/code/Magento/Catalog/view/base/web/js/price-utils.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ define([
7979
am = Number(Math.round(Math.abs(amount - i) + 'e+' + precision) + ('e-' + precision));
8080
r = (j ? i.substr(0, j) + groupSymbol : '') +
8181
i.substr(j).replace(re, '$1' + groupSymbol) +
82-
(precision ? decimalSymbol + am.toFixed(2).replace(/-/, 0).slice(2) : '');
82+
(precision ? decimalSymbol + am.toFixed(precision).replace(/-/, 0).slice(2) : '');
8383

8484
return pattern.replace('%s', r).replace(/^\s\s*/, '').replace(/\s\s*$/, '');
8585
}

0 commit comments

Comments
 (0)