fix: not able to submit stock entry (#43890)

This commit is contained in:
rohitwaghchaure
2024-10-29 15:35:19 +05:30
committed by GitHub
parent a3c2121870
commit 0742e6e193

View File

@@ -335,11 +335,16 @@ def validate_serial_no(sle, item_det):
if sr.work_order and work_order and sr.work_order == work_order: if sr.work_order and work_order and sr.work_order == work_order:
allow_existing_serial_no = True allow_existing_serial_no = True
if not allow_existing_serial_no and sle.voucher_type in [ if (
"Stock Entry", not allow_existing_serial_no
"Purchase Receipt", and sle.voucher_type
"Purchase Invoice", in [
]: "Stock Entry",
"Purchase Receipt",
"Purchase Invoice",
]
and cint(sle.actual_qty) > 0
):
msg = "" msg = ""
if sle.voucher_type == "Stock Entry": if sle.voucher_type == "Stock Entry":