From 4e61536f50725a674e8d56826779b079ea94d59c Mon Sep 17 00:00:00 2001 From: ankitjavalkarwork Date: Wed, 22 Oct 2014 17:43:07 +0530 Subject: [PATCH] Fix Customer Issue error on click event of Serial No. field --- .../support/doctype/customer_issue/customer_issue.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/erpnext/support/doctype/customer_issue/customer_issue.js b/erpnext/support/doctype/customer_issue/customer_issue.js index 67a265dd02..b12003a583 100644 --- a/erpnext/support/doctype/customer_issue/customer_issue.js +++ b/erpnext/support/doctype/customer_issue/customer_issue.js @@ -51,9 +51,14 @@ cur_frm.fields_dict['serial_no'].get_query = function(doc, cdt, cdn) { ['Serial No', 'docstatus', '!=', 2], ['Serial No', 'status', '=', "Delivered"] ]; - if(doc.item_code) cond = ['Serial No', 'item_code', '=', doc.item_code]; - if(doc.customer) cond = ['Serial No', 'customer', '=', doc.customer]; - filter.push(cond); + if(doc.item_code) { + cond = ['Serial No', 'item_code', '=', doc.item_code]; + filter.push(cond); + } + if(doc.customer) { + cond = ['Serial No', 'customer', '=', doc.customer]; + filter.push(cond); + } return{ filters:filter }