[Fix] Resolved the type issue of 'is_saved' flag variable

This commit is contained in:
Saurabh 2018-01-18 02:46:08 +05:30
parent a2076a1ff0
commit cbbee47625

View File

@ -92,7 +92,7 @@ def submit_invoice(doc,is_saved):
if isinstance(doc, basestring):
args = json.loads(doc)
if(is_saved == 1):
if(int(is_saved) == 1):
doc = frappe.get_doc('Sales Invoice',args["name"])
else:
doc = frappe.new_doc('Sales Invoice')