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

refactor: Consolidate duplicate zero-quantity Items checks for transactions. #38530

Merged
merged 3 commits into from
Jan 9, 2024

Conversation

bosue
Copy link
Contributor

@bosue bosue commented Dec 3, 2023

Still necessary preparation for properly implementing a zero-quantity allowance for On-Demand items with a yet to be determined quantity, as per #36012 and #36024 (comment).

Restart of #37865 following #38252. Reuses InvalidQtyError introduced there.

Fixes #37683.
Adds/expands/refines testcases for every single transaction doctype affected.
Also removes duplication.

@bosue bosue force-pushed the duplicate_zero_quantity_check2 branch from 24c9bfe to b2d8a44 Compare December 3, 2023 15:34
Copy link

codecov bot commented Dec 3, 2023

Codecov Report

Attention: 4 lines in your changes are missing coverage. Please review.

Comparison is base (64266c4) 60.16% compared to head (3688d94) 60.16%.
Report is 165 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop   #38530   +/-   ##
========================================
  Coverage    60.16%   60.16%           
========================================
  Files          759      759           
  Lines        69464    69458    -6     
========================================
- Hits         41794    41792    -2     
+ Misses       27670    27666    -4     
Files Coverage Δ
...xt/accounts/doctype/payment_entry/payment_entry.py 84.25% <100.00%> (ø)
...ounts/doctype/purchase_invoice/purchase_invoice.py 70.12% <ø> (ø)
...xt/accounts/doctype/sales_invoice/sales_invoice.py 74.00% <ø> (ø)
...ype/request_for_quotation/request_for_quotation.py 50.19% <100.00%> (+0.59%) ⬆️
...g/doctype/supplier_quotation/supplier_quotation.py 40.39% <ø> (ø)
erpnext/buying/utils.py 81.03% <ø> (+0.38%) ⬆️
erpnext/controllers/accounts_controller.py 85.06% <100.00%> (ø)
erpnext/controllers/buying_controller.py 83.94% <ø> (ø)
erpnext/controllers/sales_and_purchase_return.py 87.22% <ø> (ø)
erpnext/controllers/selling_controller.py 80.11% <ø> (+0.17%) ⬆️
... and 10 more

Copy link

stale bot commented Dec 20, 2023

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 Dec 20, 2023
@stale stale bot closed this Dec 23, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 7, 2024
@nabinhait nabinhait reopened this Jan 8, 2024
@stale stale bot removed the inactive label Jan 8, 2024
@nabinhait nabinhait self-assigned this Jan 8, 2024
@nabinhait nabinhait marked this pull request as ready for review January 9, 2024 07:42
@nabinhait nabinhait merged commit ec07b42 into frappe:develop Jan 9, 2024
24 of 25 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Duplicate 0-quantity validation in Buying transactions
2 participants