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: minor Dr and Cr between Purchase Receipt and Purchase Invoice (backport #41523) #41527

Merged

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented May 17, 2024

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 and qty, while the Purchase Receipt first calculates the total in transaction currency and then converts to base currency.

Without fix:

Account Voucher Type Voucher No Debit Credit
Cost of Goods Sold - DSE Purchase Receipt PR-24-00002-3 0 1643 created by Purchase Invoice
Stock Received But Not Billed - DSE Purchase Receipt PR-24-00002-3 1643 0 created by Purchase Invoice
Cost of Goods Sold - DSE Purchase Receipt PR-24-00002-3 1642.539 0
Stock Received But Not Billed - DSE Purchase Receipt PR-24-00002-3 0 1642.539

With fix:

Account Voucher Type Voucher No Debit Credit
Cost of Goods Sold - DSE Purchase Receipt PR-24-00002-3 0 1642.539 created by Purchase Invoice
Stock Received But Not Billed - DSE Purchase Receipt PR-24-00002-3 1642.539 0 created by Purchase Invoice
Cost of Goods Sold - DSE Purchase Receipt PR-24-00002-3 1642.539 0
Stock Received But Not Billed - DSE Purchase Receipt PR-24-00002-3 0 1642.539
This is an automatic backport of pull request #41523 done by Mergify.

This applies for Provisional Accounting for Non-stock items

(cherry picked from commit 1c0a244)
@github-actions github-actions bot added the needs-tests This PR needs automated unit-tests. label May 17, 2024
@ruthra-kumar
Copy link
Member

Unrelated test case failure. Ignoring.

@ruthra-kumar ruthra-kumar merged commit 9802333 into version-14-hotfix May 20, 2024
10 of 11 checks passed
@ruthra-kumar ruthra-kumar deleted the mergify/bp/version-14-hotfix/pr-41523 branch May 20, 2024 03:02
@frappe-pr-bot
Copy link
Collaborator

🎉 This PR is included in version 14.70.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

None yet

2 participants