mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-20 13:39:18 +00:00
commified item_code query
This commit is contained in:
@@ -174,10 +174,9 @@ var calculate_total = function(doc) {
|
||||
|
||||
|
||||
cur_frm.fields_dict['item'].get_query = function(doc) {
|
||||
return 'SELECT DISTINCT `tabItem`.`name`, `tabItem`.description FROM `tabItem` \
|
||||
WHERE is_manufactured_item = "Yes" and (IFNULL(`tabItem`.`end_of_life`,"") = "" OR \
|
||||
`tabItem`.`end_of_life` = "0000-00-00" OR `tabItem`.`end_of_life` > NOW()) AND \
|
||||
`tabItem`.`%(key)s` like "%s" ORDER BY `tabItem`.`name` LIMIT 50';
|
||||
return return erpnext.queries.item({
|
||||
'ifnull(tabItem.is_manufactured_item, "No")': 'Yes'
|
||||
})
|
||||
}
|
||||
|
||||
cur_frm.fields_dict['project_name'].get_query = function(doc, dt, dn) {
|
||||
|
||||
@@ -45,12 +45,9 @@ cur_frm.cscript.download_materials_required = function(doc, cdt, cdn) {
|
||||
}
|
||||
|
||||
cur_frm.fields_dict['pp_details'].grid.get_field('item_code').get_query = function(doc) {
|
||||
return 'SELECT DISTINCT `tabItem`.`name`,`tabItem`.`item_name` \
|
||||
FROM `tabItem` WHERE `tabItem`.is_pro_applicable = "Yes" \
|
||||
AND (IFNULL(`tabItem`.`end_of_life`,"") = "" \
|
||||
OR `tabItem`.`end_of_life`="0000-00-00" OR `tabItem`.`end_of_life` > NOW()) \
|
||||
AND tabItem.%(key)s like "%s" \
|
||||
ORDER BY `tabItem`.`name` LIMIT 50';
|
||||
return erpnext.queries.item({
|
||||
'ifnull(tabItem.is_pro_applicable, "No")': 'Yes'
|
||||
});
|
||||
}
|
||||
|
||||
cur_frm.fields_dict['pp_details'].grid.get_field('bom_no').get_query = function(doc) {
|
||||
|
||||
Reference in New Issue
Block a user