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: remove Recalculate Rate from SCR Item #36929

Merged
merged 1 commit into from
Sep 3, 2023

Conversation

s-aga-r
Copy link
Contributor

@s-aga-r s-aga-r commented Sep 3, 2023

Problem: The Recalculate Rate field can cause issues while reposting. For example, if there is a Subcontracting Receipt with a recalculated rate disabled, if we do a back-dated transaction before the Subcontracting Receipt that changes the Valuation Rate of the Raw-Materials used in the Subcontracting Receipt then a Repost Item Valuation is created and fails while the process the Subcontracting Receipt saying Debit and Credit not equal ... since the rate won't get calculated if Recalculated Rate is disabled.

Steps to replicate:

  • Create a Subcontract Purchase Order.
  • Create a Subcontracting Order.
  • Create Subcontracting Receipt [disabled the Recalculate Rate for Items].
  • Create a back-dated (before Subcontracting Receipt) Stock Reconciliation to update the Valuation Rate of the raw material used.
  • Check the created Repost Item Valuation for the Stock Reconciliation.

@github-actions github-actions bot added the needs-tests This PR needs automated unit-tests. label Sep 3, 2023
@s-aga-r s-aga-r added backport version-14-hotfix backport to version 14 and removed needs-tests This PR needs automated unit-tests. labels Sep 3, 2023
@codecov
Copy link

codecov bot commented Sep 3, 2023

Codecov Report

Merging #36929 (635f67c) into develop (0366928) will decrease coverage by 0.02%.
Report is 18 commits behind head on develop.
The diff coverage is 80.76%.

@@             Coverage Diff             @@
##           develop   #36929      +/-   ##
===========================================
- Coverage    65.55%   65.54%   -0.02%     
===========================================
  Files          795      795              
  Lines        62650    62649       -1     
===========================================
- Hits         41073    41063      -10     
- Misses       21577    21586       +9     
Files Changed Coverage
...e_purchase_register/item_wise_purchase_register.py ø
...em_wise_sales_register/item_wise_sales_register.py ø
erpnext/assets/doctype/asset/asset.py 0.00%
...ctype/asset_capitalization/asset_capitalization.py ø
erpnext/controllers/accounts_controller.py 0.00%
...ctype/stock_reconciliation/stock_reconciliation.py ø
...rpnext/stock/report/stock_balance/stock_balance.py ø
...next/stock/report/reserved_stock/reserved_stock.py 46.66%
...ext/stock/doctype/stock_settings/stock_settings.py 50.00%
erpnext/stock/doctype/pick_list/pick_list.py 56.86%
... and 12 more

@s-aga-r s-aga-r marked this pull request as ready for review September 3, 2023 13:24
@s-aga-r s-aga-r merged commit cd8ddae into frappe:develop Sep 3, 2023
14 checks passed
mergify bot pushed a commit that referenced this pull request Sep 3, 2023
(cherry picked from commit cd8ddae)

# Conflicts:
#	erpnext/subcontracting/doctype/subcontracting_receipt/subcontracting_receipt.js
#	erpnext/subcontracting/doctype/subcontracting_receipt/subcontracting_receipt.py
#	erpnext/subcontracting/doctype/subcontracting_receipt_item/subcontracting_receipt_item.json
s-aga-r added a commit that referenced this pull request Sep 3, 2023
…36931)

* refactor: remove `Recalculate Rate` from SCR Item (#36929)

(cherry picked from commit cd8ddae)

# Conflicts:
#	erpnext/subcontracting/doctype/subcontracting_receipt/subcontracting_receipt.js
#	erpnext/subcontracting/doctype/subcontracting_receipt/subcontracting_receipt.py
#	erpnext/subcontracting/doctype/subcontracting_receipt_item/subcontracting_receipt_item.json

* chore: `conflicts`

---------

Co-authored-by: s-aga-r <[email protected]>
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 3, 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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant