Fix Customer Issue error on click event of Serial No. field

This commit is contained in:
ankitjavalkarwork 2014-10-22 17:43:07 +05:30
parent f2886f152b
commit 4e61536f50

View File

@ -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
}