mirror of
https://github.com/frappe/erpnext.git
synced 2026-04-13 20:05:09 +00:00
fix: set bom details on disassembly; abs batch qty
(cherry picked from commit ab1fc22431)
This commit is contained in:
@@ -336,7 +336,7 @@ class StockEntry(StockController):
|
|||||||
for batch_no, batch_qty in source_bundle["batch_nos"].items():
|
for batch_no, batch_qty in source_bundle["batch_nos"].items():
|
||||||
if qty_remaining <= 0:
|
if qty_remaining <= 0:
|
||||||
break
|
break
|
||||||
alloc = min(flt(batch_qty) * scale_factor, qty_remaining)
|
alloc = min(abs(flt(batch_qty)) * scale_factor, qty_remaining)
|
||||||
batches[batch_no] = alloc
|
batches[batch_no] = alloc
|
||||||
qty_remaining -= alloc
|
qty_remaining -= alloc
|
||||||
elif source_row.batch_no:
|
elif source_row.batch_no:
|
||||||
@@ -2163,6 +2163,7 @@ class StockEntry(StockController):
|
|||||||
"type": source_row.type,
|
"type": source_row.type,
|
||||||
"is_legacy_scrap_item": source_row.is_legacy_scrap_item,
|
"is_legacy_scrap_item": source_row.is_legacy_scrap_item,
|
||||||
"bom_secondary_item": source_row.bom_secondary_item,
|
"bom_secondary_item": source_row.bom_secondary_item,
|
||||||
|
"bom_no": source_row.bom_no,
|
||||||
# batch and serial bundles built on submit
|
# batch and serial bundles built on submit
|
||||||
"use_serial_batch_fields": 1 if (source_row.batch_no or source_row.serial_no) else 0,
|
"use_serial_batch_fields": 1 if (source_row.batch_no or source_row.serial_no) else 0,
|
||||||
}
|
}
|
||||||
@@ -2273,6 +2274,7 @@ class StockEntry(StockController):
|
|||||||
SED.use_serial_batch_fields,
|
SED.use_serial_batch_fields,
|
||||||
SED.s_warehouse,
|
SED.s_warehouse,
|
||||||
SED.t_warehouse,
|
SED.t_warehouse,
|
||||||
|
SED.bom_no,
|
||||||
]
|
]
|
||||||
|
|
||||||
if stock_entry:
|
if stock_entry:
|
||||||
|
|||||||
Reference in New Issue
Block a user