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

Tax & decimal rounding method #1240

Closed
HirokazuNishi opened this issue May 6, 2015 · 5 comments
Closed

Tax & decimal rounding method #1240

HirokazuNishi opened this issue May 6, 2015 · 5 comments

Comments

@HirokazuNishi
Copy link
Contributor

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.

@yoavkutner
Copy link

+1

@mazhalai mazhalai added the CS label May 6, 2015
@choukalos choukalos self-assigned this May 6, 2015
@choukalos
Copy link

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,
Chuck

@HirokazuNishi
Copy link
Contributor Author

@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.
I already released one extension to solve this issue on M1, but I had to rewrite many classes and had to execute many tests. If M2 aims to be real cross-border ecommerce platform, decimal & tax issues should be solved before stable release.

@choukalos
Copy link

@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.

@piotrekkaminski
Copy link
Contributor

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.

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

6 participants