mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-02 03:39:11 +00:00
Quality Inspection Issue
1. validate_inspection() function defination in stock_controller.py 2. function call in purchase_receipt.py, purchase_invoice.py and delivery_note.py 3. added functality in quality_inspection.py file for linking to purchase_receipt_no and delivery_note_no
This commit is contained in:
committed by
Nabin Hait
parent
6d04afc19d
commit
cc90241fa5
@@ -1004,5 +1004,32 @@ erpnext.TransactionController = erpnext.taxes_and_totals.extend({
|
||||
}
|
||||
|
||||
return method
|
||||
},
|
||||
|
||||
setup_quality_inspection: function(doctype_name, inspection_type) {
|
||||
var quality_inspection = frappe.meta.get_docfield(doctype_name, "quality_inspection");
|
||||
quality_inspection.get_route_options_for_new_doc = function(field) {
|
||||
if(frm.is_new()) return;
|
||||
var doc = field.doc;
|
||||
return {
|
||||
"inspection_type": inspection_type,
|
||||
"purchase_receipt_no": frm.doc.name,
|
||||
"item_code": doc.item_code,
|
||||
"description": doc.description,
|
||||
"item_serial_no": doc.serial_no ? doc.serial_no.split("\n")[0] : null,
|
||||
"batch_no": doc.batch_no
|
||||
}
|
||||
}
|
||||
this.frm.set_query("quality_inspection", "items", function(doc, cdt, cdn) {
|
||||
var d = locals[cdt][cdn];
|
||||
return {
|
||||
filters: {
|
||||
docstatus: 1,
|
||||
inspection_type: inspection_type,
|
||||
item_code: d.item_code
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user