mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-31 18:59:08 +00:00
fix(quality-inspection): fetch all items for inspection type in process
This commit is contained in:
@@ -39,11 +39,12 @@ cur_frm.fields_dict['item_code'].get_query = function(doc, cdt, cdn) {
|
|||||||
query: "erpnext.stock.doctype.quality_inspection.quality_inspection.item_query",
|
query: "erpnext.stock.doctype.quality_inspection.quality_inspection.item_query",
|
||||||
filters: {
|
filters: {
|
||||||
"from": doctype,
|
"from": doctype,
|
||||||
"parent": doc.reference_name
|
"parent": doc.reference_name,
|
||||||
|
"inspection_type": doc.inspection_type
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
|
||||||
// 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) {
|
||||||
|
|||||||
@@ -63,10 +63,12 @@ def item_query(doctype, txt, searchfield, start, page_len, filters):
|
|||||||
mcond = get_match_cond(filters["from"])
|
mcond = get_match_cond(filters["from"])
|
||||||
cond, qi_condition = "", "and (quality_inspection is null or quality_inspection = '')"
|
cond, qi_condition = "", "and (quality_inspection is null or quality_inspection = '')"
|
||||||
|
|
||||||
if filters.get('from') in ['Purchase Invoice Item', 'Purchase Receipt Item']:
|
if filters.get('from') in ['Purchase Invoice Item', 'Purchase Receipt Item']\
|
||||||
|
and filters.get("inspection_type") != "In Process":
|
||||||
cond = """and item_code in (select name from `tabItem` where
|
cond = """and item_code in (select name from `tabItem` where
|
||||||
inspection_required_before_purchase = 1)"""
|
inspection_required_before_purchase = 1)"""
|
||||||
elif filters.get('from') in ['Sales Invoice Item', 'Delivery Note Item']:
|
elif filters.get('from') in ['Sales Invoice Item', 'Delivery Note Item']\
|
||||||
|
and filters.get("inspection_type") != "In Process":
|
||||||
cond = """and item_code in (select name from `tabItem` where
|
cond = """and item_code in (select name from `tabItem` where
|
||||||
inspection_required_before_delivery = 1)"""
|
inspection_required_before_delivery = 1)"""
|
||||||
elif filters.get('from') == 'Stock Entry Detail':
|
elif filters.get('from') == 'Stock Entry Detail':
|
||||||
|
|||||||
Reference in New Issue
Block a user