diff --git a/erpnext/stock/doctype/serial_and_batch_bundle/serial_and_batch_bundle.py b/erpnext/stock/doctype/serial_and_batch_bundle/serial_and_batch_bundle.py index 69a82ab64cb..24638559116 100644 --- a/erpnext/stock/doctype/serial_and_batch_bundle/serial_and_batch_bundle.py +++ b/erpnext/stock/doctype/serial_and_batch_bundle/serial_and_batch_bundle.py @@ -1032,6 +1032,8 @@ class SerialandBatchBundle(Document): qty_field = "consumed_qty" elif row.get("doctype") == "Stock Entry Detail": qty_field = "transfer_qty" + elif row.get("doctype") in ["Sales Invoice Item", "Purchase Invoice Item"]: + qty_field = "stock_qty" return qty_field