Skip to content

Commit

Permalink
ENGCOM-1084: precision for price overriding by js #14350
Browse files Browse the repository at this point in the history
  • Loading branch information
Stanislav Idolov authored Mar 29, 2018
2 parents 3b307f2 + c656229 commit df3c9f9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/code/Magento/Catalog/view/base/web/js/price-utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ define([
am = Number(Math.round(Math.abs(amount - i) + 'e+' + precision) + ('e-' + precision));
r = (j ? i.substr(0, j) + groupSymbol : '') +
i.substr(j).replace(re, '$1' + groupSymbol) +
(precision ? decimalSymbol + am.toFixed(2).replace(/-/, 0).slice(2) : '');
(precision ? decimalSymbol + am.toFixed(precision).replace(/-/, 0).slice(2) : '');

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

0 comments on commit df3c9f9

Please sign in to comment.