Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Magento\Tax\Pricing\Adjustment ignores rounding configuration #108

Open
HirokazuNishi opened this issue Jan 28, 2020 · 0 comments
Open

Magento\Tax\Pricing\Adjustment ignores rounding configuration #108

HirokazuNishi opened this issue Jan 28, 2020 · 0 comments

Comments

@HirokazuNishi
Copy link
Collaborator

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.

correct-rounding

Actual result

  • Product prices aren't rounded on php level. JS rounds them, but it reflects Magento configuration.

incorrect-rounding

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant