mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-22 06:29:20 +00:00
[fix] Get query for item in warranty claim
This commit is contained in:
@@ -85,13 +85,18 @@ cur_frm.add_fetch('item_code', 'description', 'description');
|
|||||||
cur_frm.fields_dict['item_code'].get_query = function(doc, cdt, cdn) {
|
cur_frm.fields_dict['item_code'].get_query = function(doc, cdt, cdn) {
|
||||||
if(doc.serial_no) {
|
if(doc.serial_no) {
|
||||||
return{
|
return{
|
||||||
filters:{ 'serial_no': doc.serial_no}
|
doctype: "Serial No",
|
||||||
|
fields: "item_code",
|
||||||
|
filters:{
|
||||||
|
name: doc.serial_no
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
return{
|
return{
|
||||||
filters:[
|
filters:[
|
||||||
['Item', 'docstatus', '!=', 2]
|
['Item', 'docstatus', '!=', 2],
|
||||||
|
['Item', 'disabled', '=', 0]
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user