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: Company Wise Valuation Rate for RM in BOM #24324

Merged

Conversation

marination
Copy link
Collaborator

Issue:

  • When Rate Of Materials Based On is selected as Valuation Rate in BOM, it picks the weighted average valuation rate for a particular raw material entered.
  • This valuation rate was calculated from among all Bins, irrespective of the company, which was incorrect.
  • Here the first four rows are Bins that belong to company A. The last belongs to company B.
    Screenshot 2021-01-07 at 3 29 51 PM
  • The weighted average valuation rate here will be calculated as such: (sum of stock values) / (sum of actual qty)
  • Since company wasn't considered the valuation picked would be 14500 (sum of ALL stock values) / 144 = 100.69
    Screenshot 2021-01-07 at 3 35 42 PM

Fix:

  • Pass company as a criteria while filtering Bins to calculate valuation rate from in a BOM.
  • For company A, the valuation rate must be 100 (14300 / 143 = 100)
  • For company B, the valuation rate must be 200 (200 / 1 = 200)
    bom-rm-rate-company

@marination
Copy link
Collaborator Author

For the reviewer: Should it also be warehouse specific if a source warehouse is mentioned in BOM ?

@rohitwaghchaure rohitwaghchaure merged commit 1c362c8 into frappe:develop Jan 13, 2021
@marination marination removed the needs-tests This PR needs automated unit-tests. label Jan 13, 2021
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.

2 participants