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: use receipt amount for reverse provisional entry #39584

Merged
merged 5 commits into from
Feb 29, 2024

Conversation

GursheenK
Copy link
Member

Bug

When Provisional Accounting is enabled for Non-stock Items and a Purchase Receipt is created with an amount eg - ₹2000, the GL entry posted against the provisional account is for ₹2000. If a Purchase Invoice is created with the same amount a reverse entry is made against the mentioned GL entry. However, if a Purchase Invoice is created with a different amount eg - ₹2500, the reverse entry is still made for ₹2000 in the provisional account. This leads to a remaining balance of ₹500 even after the reversal.

Screenshot 2024-01-26 at 9 59 02 PM

Solution

Use the Purchase Receipt amount for creating the reverse entry on submission of the Invoice.

Screenshot 2024-01-26 at 10 01 08 PM

@github-actions github-actions bot added the needs-tests This PR needs automated unit-tests. label Jan 26, 2024
Copy link

codecov bot commented Jan 26, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (4173203) 60.16% compared to head (f65a410) 0.00%.
Report is 190 commits behind head on develop.

❗ Current head f65a410 differs from pull request most recent head c5770f2. Consider uploading reports for the commit c5770f2 to get more accurate results

Additional details and impacted files
@@             Coverage Diff              @@
##           develop   #39584       +/-   ##
============================================
- Coverage    60.16%        0   -60.17%     
============================================
  Files          757        0      -757     
  Lines        70726        0    -70726     
============================================
- Hits         42552        0    -42552     
+ Misses       28174        0    -28174     

see 757 files with indirect coverage changes

Copy link
Member

@deepeshgarg007 deepeshgarg007 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There could be cases where a single service row item is partially invoiced. For eg: Lets say 10 hours of a particular service is received but only 5 hours is invoiced in a particular Purchase Invoice. In that case you'll have to reverse the purchase invoice amount only.

@GursheenK GursheenK marked this pull request as ready for review February 5, 2024 07:27
@GursheenK GursheenK force-pushed the provisional-accounting-reverse-amt branch from f65a410 to c5770f2 Compare February 5, 2024 10:34
Copy link

stale bot commented Feb 20, 2024

This pull request has been automatically marked as inactive because it has not had recent activity. It will be closed within 3 days if no further activity occurs, but it only takes a comment to keep a contribution alive :) Also, even if it is closed, you can always reopen the PR when you're ready. Thank you for contributing.

@stale stale bot added the inactive label Feb 20, 2024
@rmehta rmehta enabled auto-merge February 27, 2024 07:13
@rmehta rmehta merged commit c067ac1 into frappe:develop Feb 29, 2024
13 checks passed
GursheenK added a commit that referenced this pull request Mar 3, 2024
…-39584

fix: use receipt amount for reverse provisional entry (backport #39584)
GursheenK added a commit that referenced this pull request Mar 3, 2024
…-39584

fix: use receipt amount for reverse provisional entry (backport #39584)
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 17, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
backport version-14-hotfix backport to version 14 backport version-15-hotfix needs-tests This PR needs automated unit-tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants