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: validate advance amount in company currency #45555

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

Sugesh393
Copy link
Contributor

Issue:
Unable to create purchase invoice with the advance amount in foreign currency due to minor precision loss

Ref: 26967

Payment:

purchase_advance_payment

Invoice:

purchase_invoice_v

Error:

purchase_error

invoice amount - 80.445
exchange rate - 0.104950000

80.445/0.104950000 = 766.5078608861362
766.5078608861362 * 0.104950000 = 80.445

but since it is being rounded with field precision 766.50 * 0.104950000 = 80.444175
so the condition 80.445 > 80.444175 is passed

Back-port needed for v15

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accounts needs-tests This PR needs automated unit-tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant