From 1fc2eddf6f6d1630bbef04a36277e38f68dd4592 Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Thu, 19 Feb 2026 04:45:20 +0530 Subject: [PATCH] fix: add purchase invoice as well --- .../doctype/serial_and_batch_bundle/serial_and_batch_bundle.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 96f9536c07f..141914956c0 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 @@ -1026,7 +1026,7 @@ class SerialandBatchBundle(Document): qty_field = "consumed_qty" elif row.get("doctype") == "Stock Entry Detail": qty_field = "transfer_qty" - elif row.get("doctype") == "Sales Invoice Item": + elif row.get("doctype") in ["Sales Invoice Item", "Purchase Invoice Item"]: qty_field = "stock_qty" return qty_field