Merge pull request #31523 from rohitwaghchaure/fixed-test-case-backflushed_batch-raw-materials
fix: test case
This commit is contained in:
commit
d5b0b5e798
@ -1243,7 +1243,7 @@ class TestWorkOrder(FrappeTestCase):
|
|||||||
ste_doc.insert()
|
ste_doc.insert()
|
||||||
ste_doc.submit()
|
ste_doc.submit()
|
||||||
|
|
||||||
batch_list = [row.batch_no for row in ste_doc.items]
|
batch_list = sorted([row.batch_no for row in ste_doc.items])
|
||||||
|
|
||||||
wo_doc = make_wo_order_test_record(production_item=fg_item, qty=4)
|
wo_doc = make_wo_order_test_record(production_item=fg_item, qty=4)
|
||||||
transferred_ste_doc = frappe.get_doc(
|
transferred_ste_doc = frappe.get_doc(
|
||||||
|
@ -1661,7 +1661,8 @@ class StockEntry(StockController):
|
|||||||
qty = frappe.utils.ceil(qty)
|
qty = frappe.utils.ceil(qty)
|
||||||
|
|
||||||
if row.batch_details:
|
if row.batch_details:
|
||||||
for batch_no, batch_qty in row.batch_details.items():
|
batches = sorted(row.batch_details.items(), key=lambda x: x[0])
|
||||||
|
for batch_no, batch_qty in batches:
|
||||||
if qty <= 0 or batch_qty <= 0:
|
if qty <= 0 or batch_qty <= 0:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user