[fix] Serial no query in Quality Inspection
This commit is contained in:
parent
467f5c7a75
commit
45805622e4
@ -46,18 +46,23 @@ cur_frm.fields_dict['item_code'].get_query = function(doc, cdt, cdn) {
|
|||||||
|
|
||||||
// Serial No based on item_code
|
// Serial No based on item_code
|
||||||
cur_frm.fields_dict['item_serial_no'].get_query = function(doc, cdt, cdn) {
|
cur_frm.fields_dict['item_serial_no'].get_query = function(doc, cdt, cdn) {
|
||||||
var filter = {};
|
var filters = {};
|
||||||
if (doc.item_code) {
|
if (doc.item_code) {
|
||||||
filter = {
|
filters = {
|
||||||
'item_code': doc.item_code,
|
'item_code': doc.item_code
|
||||||
'status': "Available"
|
|
||||||
}
|
}
|
||||||
} else
|
}
|
||||||
filter = { 'status': "Available" }
|
return { filters: filters }
|
||||||
|
|
||||||
return { filters: filter }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
cur_frm.set_query("batch_no", function(doc) {
|
||||||
|
return {
|
||||||
|
filters: {
|
||||||
|
"item": doc.item_code
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
cur_frm.add_fetch('item_code', 'item_name', 'item_name');
|
cur_frm.add_fetch('item_code', 'item_name', 'item_name');
|
||||||
cur_frm.add_fetch('item_code', 'description', 'description');
|
cur_frm.add_fetch('item_code', 'description', 'description');
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user