Merge pull request #2343 from ankitjavalkarwork/fixcustissue

Fix Customer Issue error on click event of Serial No. field
This commit is contained in:
Nabin Hait 2014-10-27 11:40:18 +05:30
commit 4952c7b3b5

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
}