From 2ce297aff8a75003f9dfa57c2c595cff119f8b4c Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Fri, 1 Aug 2025 17:00:38 +0530 Subject: [PATCH] fix: include Sales Invoice in SABB validation for packed items --- .../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 2d29d5b9e05..66546f71125 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 @@ -146,7 +146,7 @@ class SerialandBatchBundle(Document): ) elif not frappe.db.exists("Stock Ledger Entry", {"voucher_detail_no": self.voucher_detail_no}): - if self.voucher_type == "Delivery Note" and frappe.db.exists( + if self.voucher_type in ["Delivery Note", "Sales Invoice"] and frappe.db.exists( "Packed Item", self.voucher_detail_no ): return