-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
Tax & decimal rounding method #1240
Comments
+1 |
Hey @HirokazuNishi in Magento 2 the rounding function should be consolidated for tax. Should be fairly straight forward to do a plugin and replace that with floor or ceil or even bankers rounding to enable one to create country/taxation specific extension. As far as choosing the # of decimal places there's a couple constants that really need to be consolidated + the automated test framework used by tax/pricing tests could use some attention to be adapted to changes in # of decimal places. If you could do that and send in a PR that'd be awesome! That would enable all sorts of community driven extensions around taxes/pricing. Thanks, |
@choukalos Of course I'll try to make PR, but I just started to investigation about this issue on M2. so it takes long time. |
@HirokazuNishi after you finish investigating please ping me if there are things we can do in core to make it easier to create custom tax extension. One of our goals in the M2 tax engine was to make it easy to replace or customize. |
Thank you for your submission. We recently made some changes to the way we process GitHub submissions to more quickly identify and respond to core code issues. Feature Requests and Improvements should now be submitted to the new Magento 2 Feature Requests and Improvements forum (see details here). We are closing this GitHub ticket and have moved your request to the new forum. |
Magento1.x only uses "round" for tax and decimal number method, but sometimes it causes wrong result.
Also some merchants use "floor" and "ceil" for discarding decimal numbers.
Is it possible to choose decimal discarding method via admin panel for M2?
If we do simply discard decimal numbers, converting currencies causes serious trouble.
For example, 99.99USD is 11,961.15JPY ( 1USD is 119.6235JPY ), but JPY does not use under decimal number. Then correct result is 11,961 JPY.
If "round" is used for discarding method, sometimes converting result is not correct.
The text was updated successfully, but these errors were encountered: