Skip to content

Commit 07ebac1

Browse files
committed
AC-9221::SubTotal Rounding Issue For Decimal Quantity Enabled Product
1 parent 8ac0cdd commit 07ebac1

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

app/code/Magento/Directory/Model/Currency.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -341,12 +341,12 @@ public function formatPrecision(
341341
$includeContainer = true,
342342
$addBrackets = false
343343
) {
344-
if (is_numeric($price)) {
345-
$price = round($price, $precision);
346-
}
347344
if (!isset($options['precision'])) {
348345
$options['precision'] = $precision;
349346
}
347+
if (is_numeric($price)) {
348+
$price = round($price, $options['precision']);
349+
}
350350
if ($includeContainer) {
351351
return '<span class="price">' . ($addBrackets ? '[' : '') . $this->formatTxt(
352352
$price,

0 commit comments

Comments
 (0)