mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-25 16:04:46 +00:00
Fix Customer Issue error on click event of Serial No. field
This commit is contained in:
@@ -51,9 +51,14 @@ cur_frm.fields_dict['serial_no'].get_query = function(doc, cdt, cdn) {
|
|||||||
['Serial No', 'docstatus', '!=', 2],
|
['Serial No', 'docstatus', '!=', 2],
|
||||||
['Serial No', 'status', '=', "Delivered"]
|
['Serial No', 'status', '=', "Delivered"]
|
||||||
];
|
];
|
||||||
if(doc.item_code) cond = ['Serial No', 'item_code', '=', doc.item_code];
|
if(doc.item_code) {
|
||||||
if(doc.customer) cond = ['Serial No', 'customer', '=', doc.customer];
|
cond = ['Serial No', 'item_code', '=', doc.item_code];
|
||||||
filter.push(cond);
|
filter.push(cond);
|
||||||
|
}
|
||||||
|
if(doc.customer) {
|
||||||
|
cond = ['Serial No', 'customer', '=', doc.customer];
|
||||||
|
filter.push(cond);
|
||||||
|
}
|
||||||
return{
|
return{
|
||||||
filters:filter
|
filters:filter
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user