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: get incoming rate instead of BOM rate #36496

Merged
merged 2 commits into from
Aug 5, 2023

Conversation

s-aga-r
Copy link
Contributor

@s-aga-r s-aga-r commented Aug 5, 2023

Issue: 0 RM rate in SCR results in incorrect FG Valuation Rate.

Steps to replicate:

  • Set Backflush Raw Materials of Subcontract Based On to BOM in Buying Settings
  • Create an FG Item.
  • Create RM Item(s) with Valuation Rate as 0.
  • Create BOM for FG Item, RM(s) will have a rate of 0 since there is no SLE/Valuation Rate.
  • Create PO -> SCO
  • Inward RM(s) and transfer against the SCO
  • Now, create SCO -> SCR (save), the RM rate will be 0.

Changes: Set the Incoming Rate as the rate for RMs in the SCR Consumed Items table.

image

Before:

scrnli_8_5_2023_10-32-16.AM.mp4

After:

scrnli_8_5_2023_10-32-56.AM.mp4

@s-aga-r s-aga-r added needs-tests This PR needs automated unit-tests. backport version-14-hotfix backport to version 14 and removed needs-tests This PR needs automated unit-tests. labels Aug 5, 2023
@s-aga-r s-aga-r force-pushed the FIX-SCR-RM-RATE branch 2 times, most recently from eae7f0e to 152d8d5 Compare August 5, 2023 07:53
@codecov
Copy link

codecov bot commented Aug 5, 2023

Codecov Report

Merging #36496 (70072d7) into develop (10529e1) will increase coverage by 0.06%.
Report is 60 commits behind head on develop.
The diff coverage is 45.79%.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop   #36496      +/-   ##
===========================================
+ Coverage    64.54%   64.61%   +0.06%     
===========================================
  Files          787      788       +1     
  Lines        61176    61428     +252     
===========================================
+ Hits         39486    39690     +204     
- Misses       21690    21738      +48     
Files Changed Coverage Δ
...counts/report/accounts_payable/accounts_payable.py 100.00% <ø> (ø)
...counts_payable_summary/accounts_payable_summary.py 0.00% <ø> (ø)
..._receivable_summary/accounts_receivable_summary.py 0.00% <0.00%> (ø)
...counts/report/financial_ratios/financial_ratios.py 0.00% <0.00%> (ø)
erpnext/crm/doctype/lead/lead.py 68.03% <ø> (ø)
erpnext/accounts/party.py 77.40% <9.09%> (-0.76%) ⬇️
erpnext/accounts/doctype/account/account.py 73.18% <57.14%> (-0.42%) ⬇️
.../report/accounts_receivable/accounts_receivable.py 71.05% <60.00%> (-1.62%) ⬇️
erpnext/accounts/utils.py 73.85% <87.87%> (+0.41%) ⬆️
...xt/accounts/doctype/journal_entry/journal_entry.py 69.32% <90.90%> (+0.25%) ⬆️
... and 9 more

... and 3 files with indirect coverage changes

@s-aga-r s-aga-r marked this pull request as ready for review August 5, 2023 10:45
@s-aga-r s-aga-r merged commit 758b31d into frappe:develop Aug 5, 2023
12 checks passed
mergify bot pushed a commit that referenced this pull request Aug 5, 2023
* fix: get incoming rate instead of BOM rate

* test: add test case for SCR rm rate

(cherry picked from commit 758b31d)

# Conflicts:
#	erpnext/controllers/subcontracting_controller.py
s-aga-r added a commit that referenced this pull request Aug 6, 2023
* fix: get incoming rate instead of BOM rate (#36496)

* fix: get incoming rate instead of BOM rate

* test: add test case for SCR rm rate

(cherry picked from commit 758b31d)

# Conflicts:
#	erpnext/controllers/subcontracting_controller.py

* chore: `conflicts`

---------

Co-authored-by: s-aga-r <[email protected]>
frappe-pr-bot pushed a commit that referenced this pull request Aug 9, 2023
# [14.34.0](v14.33.2...v14.34.0) (2023-08-09)

### Bug Fixes

* **accounts:** Translate columns in AP/AR report ([#36503](#36503)) ([6739369](6739369))
* AP and AR summary ([769d7d7](769d7d7))
* check root type only when not none ([46bb309](46bb309))
* cross connect delivery note and sales invoice ([#36183](#36183)) ([8501a11](8501a11))
* Debit credit difference while submitting Sales Invoice ([#36523](#36523)) ([240d866](240d866))
* don't allow negative rate (backport [#36027](#36027)) ([#36465](#36465)) ([caa4f33](caa4f33))
* enqueue submit/cancel action for stock entry having more than 50 line items (backport [#36532](#36532)) ([#36536](#36536)) ([9c108a8](9c108a8))
* fetch ple for all party types ([674dba8](674dba8))
* fetch ple with party type employee in AP ([1ca9aca](1ca9aca))
* Fix query for financial statement report ([d1590f2](d1590f2))
* get incoming rate instead of BOM rate (backport [#36496](#36496)) ([#36506](#36506)) ([bdfbccd](bdfbccd))
* handle None value in payment_term_outstanding ([b033b3b](b033b3b))
* Lower deduction certificate for multi-company ([#36491](#36491)) ([2216875](2216875))
* payment allocation in invoice payment schedule ([#36440](#36440)) ([0e87c86](0e87c86))
* search not working for so in the Production Plan ([#36459](#36459)) ([8c57d56](8c57d56))
* serial no not able to reject for the internal transfer ([#36467](#36467)) ([c1819a4](c1819a4))
* stock entry decimal issue (backport [#36530](#36530)) ([#36533](#36533)) ([5b04708](5b04708))
* stock reconciliation negative stock error (backport [#36544](#36544)) ([#36549](#36549)) ([00b9df0](00b9df0))
* Tax withholding against order via Payment Entry ([#36493](#36493)) ([a234b89](a234b89))
* use correct lang separator for frappe (backport [#36519](#36519)) ([#36520](#36520)) ([f9981d1](f9981d1))
* **ux:** add `Ordered Qty` column in Get Items From > MR (backport [#36486](#36486)) ([#36505](#36505)) ([0d7a4b6](0d7a4b6))

### Features

* ledger comparison report ([#36485](#36485)) ([07f235c](07f235c))
* **RFQ:** make sending attachments configurable (backport [#36359](#36359)) ([#36535](#36535)) ([5881960](5881960))

### Performance Improvements

* asset depreciation entry posting ([#36461](#36461)) ([cd1c175](cd1c175))
* defer holiday list imports ([7adad42](7adad42))
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 10, 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