From d862a742b0806a64deae378749cec721e6ff4461 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 (cherry picked from commit 2ce297aff8a75003f9dfa57c2c595cff119f8b4c) --- .../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 f6162ab558b..a453457f919 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 @@ -145,7 +145,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