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: purchase receipt gl entries with same item code #26093

Merged
merged 6 commits into from
Jun 24, 2021

Conversation

nextchamp-saqib
Copy link
Member

Steps to replicate:

  • Enable perpetual inventory for service items
  • Create a Purchase Receipt with 2 service items having same item code but different rates
  • Create Purchase Invoice for that receipt & check the ledger, there will be an invalid entry against COGS (item's expense account)

This happens since the GL Entries made for the item in purchase receipt is merged into one regardless of voucher_detail_no.
This is a problem since voucher_detail_no is used to check if the expense is booked in the purchase receipt (line 621: purchase_invoice.py)
Since the GL Entries are merged into one into voucher_detail_no, the expense is booked again for 2nd item in purchase invoice.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.01%) to 42.679% when pulling cceabff on nextchamp-saqib:pr-item-gl-fix into 6894cc2 on frappe:develop.

@nextchamp-saqib nextchamp-saqib merged commit 3b5978c into frappe:develop Jun 24, 2021
asoral pushed a commit to asoral/erpnext that referenced this pull request Nov 12, 2021
fix: purchase receipt gl entries with same item code
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

Successfully merging this pull request may close these issues.

None yet

2 participants