fix: Serial No reserved against historical sales order - unable to sell again (#43294)

This commit is contained in:
rohitwaghchaure
2024-09-19 09:37:08 +05:30
committed by GitHub
parent 2e2a4d9c70
commit 8abc1f4da9

View File

@@ -404,7 +404,7 @@ def validate_serial_no(sle, item_det):
)
# if Sales Order reference in Serial No validate the Delivery Note or Invoice is against the same
if sr.sales_order:
if sr.sales_order and sr.delivery_document_no:
if sle.voucher_type == "Sales Invoice":
if not frappe.db.exists(
"Sales Invoice Item",