-
Notifications
You must be signed in to change notification settings - Fork 32
Open
Description
Precondition
Install Magento2.3.4 and sample data.
Install CommunityEngineering/CurrencyPrecision.
Set JPY for base currency and display currency.
Set "floor" for rounding method.
Set "show both price" for catalog price display configuration on tax configuration.
Set 10% for product tax.
Check both data-price-amount attribute value on product listing or detail page .
Expected result
- Product prices displayed on both product list page and detail page aren rounded as expected.
Actual result
- Product prices aren't rounded on php level. JS rounds them, but it reflects Magento configuration.
Issue Reason
Magento\Tax\Pricing\Adjustment has 2 important methods. extractAdjustment and applyAdjustment. These methods call getTaxPrice and try to calculate product price, but 9th argument is always "false". For JPY and other integer currencies need "true" for rounding fraction.