fix: batch no in POS (#24771)

* fix: batch no in list

* fix: check for batch no to be list
This commit is contained in:
Afshan 2021-03-09 20:31:14 +05:30 committed by GitHub
parent 261c42186f
commit 9f6015a4e9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -554,7 +554,7 @@ def auto_fetch_serial_number(qty, item_code, warehouse, posting_date=None, batch
if batch_nos:
try:
filters["batch_no"] = json.loads(batch_nos)
filters["batch_no"] = json.loads(batch_nos) if (type(json.loads(batch_nos)) == list) else [json.loads(batch_nos)]
except:
filters["batch_no"] = [batch_nos]
@ -626,4 +626,4 @@ def fetch_serial_numbers(filters, qty, do_not_include=[]):
batch_no_condition=batch_no_condition
), filters, as_dict=1)
return serial_numbers
return serial_numbers