fix: minor Dr and Cr between Purchase Receipt and Purchase Invoice (backport #41523) #41526
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
With
Provisional Accounting for Non-Stock Items
enabled, with high precision exchange rates and large qty in Purchase Receipt and Purchase Invoice, there will be minor debit and credit differences between them.Ex:
For an exchange rate of 0.014783000, Purchase Receipt of 1000 qty with rate 111.11 and then a Purchase Invoice for it will post below ledger entries. There is a slight difference in Dr and Cr -
0.461
. This difference is more pronounced in higher precision exchange rates and large quantities of items.This is due to the different ways the Dr/Cr amounts are calculated. The Provisional ledger entries created by Purchase Invoice use the individual items'
base_rate
andqty
, while the Purchase Receipt first calculates the total in transaction currency and then converts to base currency.Without fix:
With fix:
This is an automatic backport of pull request #41523 done by Mergify.