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: over billing validation #28218

Merged
merged 3 commits into from
Nov 26, 2021

Conversation

nextchamp-saqib
Copy link
Member

Steps to replicate the issue:

  • Create a Delivery Note with an item with qty as 1
  • Create a Sales Invoice against it and duplicate the item
  • Submit the Sales Invoice

The Sales Invoice is submitted with double the qty as in Delivery Note, basically bypassing over-billing validation
This happens because over-billing validation only considers Sales Invoice Items from other submitted invoices, it doesn't consider items from itself that is being submitted.

@codecov
Copy link

codecov bot commented Nov 3, 2021

Codecov Report

Merging #28218 (86909c5) into develop (c8d0d9e) will increase coverage by 2.64%.
The diff coverage is 77.77%.

@@             Coverage Diff             @@
##           develop   #28218      +/-   ##
===========================================
+ Coverage    55.24%   57.89%   +2.64%     
===========================================
  Files         1255     1250       -5     
  Lines        67935    93176   +25241     
===========================================
+ Hits         37534    53941   +16407     
- Misses       30401    39235    +8834     
Impacted Files Coverage Δ
erpnext/controllers/accounts_controller.py 87.83% <77.77%> (+4.27%) ⬆️
...work_order_stock_report/work_order_stock_report.py 86.27% <0.00%> (-13.73%) ⬇️
erpnext/utilities/product.py 41.34% <0.00%> (-9.38%) ⬇️
...tch_item_expiry_status/batch_item_expiry_status.py 86.25% <0.00%> (-8.09%) ⬇️
erpnext/portal/doctype/homepage/homepage.py 68.18% <0.00%> (-5.16%) ⬇️
erpnext/shopping_cart/product_info.py 48.00% <0.00%> (-4.95%) ⬇️
...ext/loan_management/doctype/loan_type/loan_type.py 80.95% <0.00%> (-4.77%) ⬇️
...e/sanctioned_loan_amount/sanctioned_loan_amount.py 84.61% <0.00%> (-4.28%) ⬇️
...t/education/doctype/academic_year/academic_year.py 83.33% <0.00%> (-4.17%) ⬇️
...cturing/doctype/work_order_item/work_order_item.py 81.81% <0.00%> (-3.90%) ⬇️
... and 1048 more

@stale
Copy link

stale bot commented Nov 18, 2021

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed within a week 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 Nov 18, 2021
@stale stale bot closed this Nov 21, 2021
@stale stale bot removed the inactive label Nov 25, 2021
@nextchamp-saqib
Copy link
Member Author

@Mergifyio backport version-13-hotfix

@nextchamp-saqib nextchamp-saqib merged commit 9c913c9 into frappe:develop Nov 26, 2021
@mergify
Copy link
Contributor

mergify bot commented Nov 26, 2021

backport version-13-hotfix

✅ Backports have been created

mergify bot pushed a commit that referenced this pull request Nov 26, 2021
(cherry picked from commit 9c913c9)
conncampbell pushed a commit to conncampbell/erpnext that referenced this pull request Jan 9, 2022
conncampbell pushed a commit to conncampbell/erpnext that referenced this pull request Jan 9, 2022
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

1 participant