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: dont update RM items table if not required #31408

Merged
merged 1 commit into from
Jun 27, 2022

Conversation

ankush
Copy link
Member

@ankush ankush commented Jun 20, 2022

Currently, on PO update RM item table is auto computed again and again,
if there was any transfer/consumption against that then it will be lost.

This change:

  1. Disables updating RM table if no change in qty of FG was made. Since
    RM table can't possibly be different with same FG qty. This allows
    safely updating FG rates without fiddling with qty.
  2. Blocks update completely if qty is changed and RM items are already
    transferred.

ref: ISS-22-23-00670

@github-actions github-actions bot added accounts needs-tests This PR needs automated unit-tests. labels Jun 20, 2022
@ankush ankush added buying subcontracting and removed accounts needs-tests This PR needs automated unit-tests. labels Jun 20, 2022
@ankush ankush marked this pull request as ready for review June 20, 2022 13:45
@ankush ankush force-pushed the subcontracting_update_item_rate branch 2 times, most recently from 9e93358 to 44462fd Compare June 20, 2022 13:51
@ankush ankush marked this pull request as draft June 20, 2022 16:01
Currently on PO update RM item table is auto computed again and again,
if there was any transfer/consumption against that then it will be lost.

This change:
1. Disables updating RM table if no change in qty of FG was made. Since
   RM table can't possibly be different with same FG qty.
2. Blocks update completely if qty is changed and RM items are already
   transferred.
@ankush ankush force-pushed the subcontracting_update_item_rate branch from 64a9684 to 1af36ed Compare June 21, 2022 11:40
@ankush ankush marked this pull request as ready for review June 21, 2022 11:40
@codecov
Copy link

codecov bot commented Jun 21, 2022

Codecov Report

Merging #31408 (1af36ed) into develop (e866ec6) will decrease coverage by 0.05%.
The diff coverage is 100.00%.

@@             Coverage Diff             @@
##           develop   #31408      +/-   ##
===========================================
- Coverage    63.88%   63.82%   -0.06%     
===========================================
  Files          984      984              
  Lines        67725    67741      +16     
===========================================
- Hits         43266    43238      -28     
- Misses       24459    24503      +44     
Impacted Files Coverage Δ
erpnext/controllers/accounts_controller.py 85.96% <100.00%> (+0.40%) ⬆️
...tch_item_expiry_status/batch_item_expiry_status.py 67.92% <0.00%> (-24.53%) ⬇️
...wise_balance_history/batch_wise_balance_history.py 67.79% <0.00%> (-22.04%) ⬇️
...em_wise_sales_register/item_wise_sales_register.py 51.36% <0.00%> (-11.82%) ⬇️
...t/accounts/report/sales_register/sales_register.py 73.68% <0.00%> (-8.19%) ⬇️
...unts/report/purchase_register/purchase_register.py 71.71% <0.00%> (-5.27%) ⬇️
...pnext/accounts/report/gross_profit/gross_profit.py 75.27% <0.00%> (-3.33%) ⬇️
...e_sales_analytics/supplier_wise_sales_analytics.py 86.88% <0.00%> (-3.28%) ⬇️
...e_purchase_register/item_wise_purchase_register.py 74.25% <0.00%> (-2.98%) ⬇️
erpnext/stock/doctype/item_price/item_price.py 92.98% <0.00%> (-1.76%) ⬇️
... and 24 more

@ankush ankush merged commit dd11f26 into frappe:develop Jun 27, 2022
mergify bot pushed a commit that referenced this pull request Jun 27, 2022
Currently on PO update RM item table is auto computed again and again,
if there was any transfer/consumption against that then it will be lost.

This change:
1. Disables updating RM table if no change in qty of FG was made. Since
   RM table can't possibly be different with same FG qty.
2. Blocks update completely if qty is changed and RM items are already
   transferred.

(cherry picked from commit dd11f26)

# Conflicts:
#	erpnext/controllers/accounts_controller.py
ankush added a commit that referenced this pull request Jun 27, 2022
Currently on PO update RM item table is auto computed again and again,
if there was any transfer/consumption against that then it will be lost.

This change:
1. Disables updating RM table if no change in qty of FG was made. Since
   RM table can't possibly be different with same FG qty.
2. Blocks update completely if qty is changed and RM items are already
   transferred.

(cherry picked from commit dd11f26)
ankush added a commit that referenced this pull request Jun 27, 2022
Currently on PO update RM item table is auto computed again and again,
if there was any transfer/consumption against that then it will be lost.

This change:
1. Disables updating RM table if no change in qty of FG was made. Since
   RM table can't possibly be different with same FG qty.
2. Blocks update completely if qty is changed and RM items are already
   transferred.

(cherry picked from commit dd11f26)
ankush added a commit that referenced this pull request Jun 28, 2022
…1457)

fix: dont update RM items table if not required (#31408)

Currently on PO update RM item table is auto computed again and again,
if there was any transfer/consumption against that then it will be lost.

This change:
1. Disables updating RM table if no change in qty of FG was made. Since
   RM table can't possibly be different with same FG qty.
2. Blocks update completely if qty is changed and RM items are already
   transferred.

(cherry picked from commit dd11f26)

Co-authored-by: Ankush Menat <ankush@frappe.io>
frappe-pr-bot pushed a commit that referenced this pull request Jun 28, 2022
## [13.34.2](v13.34.1...v13.34.2) (2022-06-28)

### Bug Fixes

* add UOM validation for planned-qty ([559bde3](559bde3))
* dont update RM items table if not required (backport [#31408](#31408)) ([#31457](#31457)) ([8155306](8155306))
* General Ledger and TB opening entries mismatch issues ([a0c5c73](a0c5c73))
* Monthly depreciation using WDV method ([e7659a1](e7659a1))
* Quotation and Sales Order item sync ([2219132](2219132))
* Respect system precision for user facing balance qty values ([#30837](#30837)) ([642b9c5](642b9c5))
* **Salary Slip:** Components not updated when amount evaluates to 0 due to payment days ([#31425](#31425)) ([abfe926](abfe926))
* translation for filter status on report ([736f206](736f206))
* update ru translate (backport [#31404](#31404)) ([#31417](#31417)) ([8b78a12](8b78a12))
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 20, 2024
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.

1 participant