Skip to content

Commit e2c4aca

Browse files
author
Volodymyr Kublytskyi
committed
Fix of invalid price for integer currencies when amount less then group size
1 parent 113bf62 commit e2c4aca

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
@@ -131,7 +131,6 @@ public function getPriceFormat($localeCode = null, $currencyCode = null)
131131
} else {
132132
$group = strrpos($format, '.');
133133
}
134-
$integerRequired = strpos($format, '.') - strpos($format, '0');
135134

136135
$result = [
137136
//TODO: change interface
@@ -141,7 +140,7 @@ public function getPriceFormat($localeCode = null, $currencyCode = null)
141140
'decimalSymbol' => $decimalSymbol,
142141
'groupSymbol' => $groupSymbol,
143142
'groupLength' => $group,
144-
'integerRequired' => $integerRequired,
143+
'integerRequired' => $totalPrecision == 0,
145144
];
146145

147146
return $result;

0 commit comments

Comments
 (0)