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

Fix non terminating decimal expansion error in Linecalculator #491

Closed
rchilumukoti opened this issue Sep 25, 2024 · 1 comment
Closed

Fix non terminating decimal expansion error in Linecalculator #491

rchilumukoti opened this issue Sep 25, 2024 · 1 comment

Comments

@rchilumukoti
Copy link

rchilumukoti commented Sep 25, 2024

In LineCalculator constructor calls divide function without RoundingMode, to get itemTotalNetAmount. In case if the price is a decimal number then it is throwing "non terminating decimal expansion" error.

Fixed it by adding RoundingMode parameter where divide function is called.

Also added test case in CalcuationTest class.
I have attached the patch file, thanks.

Regards
Rajani
Fix_non_terminating_decimal_expansion_error_in_Linecalculator.patch

@rchilumukoti
Copy link
Author

Hi, Unfortunately Issue #491 is not fixed properly. I have created Issue #501. Thanks

jstaerk added a commit that referenced this issue Oct 4, 2024
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