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

ROUND_UP on flat_tax function #34

Open
jdivins opened this issue May 13, 2019 · 0 comments
Open

ROUND_UP on flat_tax function #34

jdivins opened this issue May 13, 2019 · 0 comments

Comments

@jdivins
Copy link

jdivins commented May 13, 2019

Hello,
Could be possible add to the library an option to allow chose between round_up or round_down on the flat_tax function: https://github.com/mirumee/prices/blob/master/prices/tax.py#L30 ?
By this way:
gross = (base * fraction).quantize(Decimal('.01'), rounding=ROUND_UP)

And then allow choose this config in django-prices-vatlayes, here:
https://github.com/mirumee/django-prices-vatlayer/blob/master/django_prices_vatlayer/utils.py#L101 ?

I have tried with an amount of 171.50 * 1.21 of TAX
And the final result is = 207.515
With two decimals I expected that the final value has been: 207.52
But I get 207.51

Thank you!

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

No branches or pull requests

1 participant