-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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: Gross Profit reports Invoices with -ve qty for Invoices with Cr Notes #34456
Merged
ruthra-kumar
merged 3 commits into
frappe:develop
from
ruthra-kumar:gp_return_invoice_issue
Mar 17, 2023
Merged
fix: Gross Profit reports Invoices with -ve qty for Invoices with Cr Notes #34456
ruthra-kumar
merged 3 commits into
frappe:develop
from
ruthra-kumar:gp_return_invoice_issue
Mar 17, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Cr Notes 'qty' are overallocated to parent invoice, when there are mulitple instances of same item in Invoice.
2 New test cases added. 1. Standalone Cr notes will be reported as normal Invoices 2. Cr notes against an Invoice will not overallocate qty if there are multiple instances of same item
61e1c9a
to
cc61dae
Compare
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## develop #34456 +/- ##
===========================================
+ Coverage 63.86% 63.87% +0.01%
===========================================
Files 810 810
Lines 59520 59526 +6
===========================================
+ Hits 38010 38022 +12
+ Misses 21510 21504 -6
|
@Mergifyio backport version-14-hotfix version-13-hotfix |
✅ Backports have been created
|
@Mergifyio backport version-14-hotfix |
❌ No backport have been created
Git reported the following error:
|
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Issue
Cr note is overallocated to the Parent Invoice while calculating Average rate. This only happens if multiple rows have the same item.
Changes in this PR:
Invoice SINV-23-00056 with multiple rows of same item.
![Screenshot 2023-03-15 at 11 18 26 AM](https://user-images.githubusercontent.com/3272205/225220086-58d86fd7-d296-40fb-897b-1284a0d4c133.png)
Cr Note, SINV-23-00058, against SINV-23-00056
![Screenshot 2023-03-15 at 11 18 18 AM](https://user-images.githubusercontent.com/3272205/225220090-31679fb4-f904-4ff5-b63b-e7f840cf7989.png)
Standalone Cr Note SINV-23-00057
![Screenshot 2023-03-15 at 11 18 31 AM](https://user-images.githubusercontent.com/3272205/225220083-879a1276-c4cc-45fa-861c-fbfe0b61b3fc.png)
Before Fix:
After Fix: