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: transferred batches are not fetched while making Manufacture stock entry #31248

Conversation

rohitwaghchaure
Copy link
Collaborator

@rohitwaghchaure rohitwaghchaure commented Jun 6, 2022

Issue

steps to reproduce issue

  • In Manufacturing Settings, set "Back-flush Raw Materials Based On" based on as "Material Transferred for Manufacture"
  • Create work order with Batch Item Raw Materials
  • Transfer Batch Raw Materials from Stores to WIP against above work order
  • While transfer select 2 batches against same item
  • Make stock entry with type "Manufacture"
  • System won't fetch Batch Nos for raw materials which were transferred earlier in WIP warehouse

After Fix

  • Transferred batches are properly fetched in the Manufacture stock entry.

Challenges with this design
If user has already consumed transferred batch for different work order then they won't be able to consume.

Qty calculation logic (imp part)
https://github.com/frappe/erpnext/pull/31248/files#diff-a160e3a8907dcdf28ce7728bb7dd45914ad8ab033489ea3de4c80fb1c4ca7fe9R1657

@rohitwaghchaure rohitwaghchaure force-pushed the fixed-transferred-materials-are-not-consumed branch 3 times, most recently from ba04a0d to 33b6717 Compare June 6, 2022 11:16
@rohitwaghchaure rohitwaghchaure force-pushed the fixed-transferred-materials-are-not-consumed branch from 33b6717 to d94ff3e Compare June 6, 2022 12:28
@codecov
Copy link

codecov bot commented Jun 6, 2022

Codecov Report

Merging #31248 (186224a) into develop (ce1b4e4) will increase coverage by 0.21%.
The diff coverage is 96.96%.

@@             Coverage Diff             @@
##           develop   #31248      +/-   ##
===========================================
+ Coverage    63.77%   63.98%   +0.21%     
===========================================
  Files          984      984              
  Lines        67725    67740      +15     
===========================================
+ Hits         43189    43346     +157     
+ Misses       24536    24394     -142     
Impacted Files Coverage Δ
erpnext/stock/doctype/stock_entry/stock_entry.py 81.81% <96.96%> (+0.56%) ⬆️
erpnext/support/doctype/issue/issue.py 64.28% <0.00%> (-0.96%) ⬇️
...ctype/accounting_dimension/accounting_dimension.py 65.15% <0.00%> (-0.76%) ⬇️
erpnext/stock/stock_ledger.py 90.74% <0.00%> (+0.16%) ⬆️
erpnext/payroll/doctype/salary_slip/salary_slip.py 87.14% <0.00%> (+0.24%) ⬆️
...stock/doctype/purchase_receipt/purchase_receipt.py 92.44% <0.00%> (+0.25%) ⬆️
erpnext/projects/doctype/project/project.py 53.57% <0.00%> (+0.32%) ⬆️
...t/accounts/report/general_ledger/general_ledger.py 67.91% <0.00%> (+0.34%) ⬆️
...ext/payroll/doctype/payroll_entry/payroll_entry.py 77.88% <0.00%> (+0.39%) ⬆️
erpnext/stock/report/stock_ageing/stock_ageing.py 95.67% <0.00%> (+0.48%) ⬆️
... and 23 more

@ankush ankush requested a review from s-aga-r June 14, 2022 08:44
@rohitwaghchaure rohitwaghchaure merged commit 2ed06d7 into frappe:develop Jun 22, 2022
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.

None yet

3 participants