mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-25 16:04:46 +00:00
[Fix] Test case for serial no (#13136)
This commit is contained in:
committed by
Nabin Hait
parent
a310cc7156
commit
332a17ee86
@@ -187,11 +187,11 @@ def process_serial_no(sle):
|
|||||||
update_serial_nos(sle, item_det)
|
update_serial_nos(sle, item_det)
|
||||||
|
|
||||||
def validate_serial_no(sle, item_det):
|
def validate_serial_no(sle, item_det):
|
||||||
if item_det.has_serial_no==0 and sle.is_cancelled == "No":
|
if item_det.has_serial_no==0:
|
||||||
if sle.serial_no:
|
if sle.serial_no:
|
||||||
frappe.throw(_("Item {0} is not setup for Serial Nos. Column must be blank").format(sle.item_code),
|
frappe.throw(_("Item {0} is not setup for Serial Nos. Column must be blank").format(sle.item_code),
|
||||||
SerialNoNotRequiredError)
|
SerialNoNotRequiredError)
|
||||||
else:
|
elif sle.is_cancelled == "No":
|
||||||
if sle.serial_no:
|
if sle.serial_no:
|
||||||
serial_nos = get_serial_nos(sle.serial_no)
|
serial_nos = get_serial_nos(sle.serial_no)
|
||||||
if cint(sle.actual_qty) != flt(sle.actual_qty):
|
if cint(sle.actual_qty) != flt(sle.actual_qty):
|
||||||
|
|||||||
Reference in New Issue
Block a user