Skip to content

Commit e1db595

Browse files
author
Volodymyr Kublytskyi
committed
Fix of invalid price for integer currencies when amount less than group size
1 parent aa6b899 commit e1db595

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

lib/internal/Magento/Framework/Locale/Format.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,6 @@ public function getPriceFormat($localeCode = null, $currencyCode = null)
128128
} else {
129129
$group = strrpos($format, '.');
130130
}
131-
$integerRequired = strpos($format, '.') - strpos($format, '0');
132131

133132
$result = [
134133
//TODO: change interface
@@ -138,7 +137,7 @@ public function getPriceFormat($localeCode = null, $currencyCode = null)
138137
'decimalSymbol' => $decimalSymbol,
139138
'groupSymbol' => $groupSymbol,
140139
'groupLength' => $group,
141-
'integerRequired' => $integerRequired,
140+
'integerRequired' => $totalPrecision == 0,
142141
];
143142

144143
return $result;

0 commit comments

Comments
 (0)