fix: add item-code filter for SCR supplied-items batch-no

This commit is contained in:
s-aga-r 2023-04-18 12:04:34 +05:30
parent cc185bd2fe
commit e91abbfbe3

View File

@ -67,6 +67,15 @@ frappe.ui.form.on('Subcontracting Receipt', {
}
});
frm.set_query('batch_no', 'supplied_items', function(doc, cdt, cdn) {
var row = locals[cdt][cdn];
return {
filters: {
item: row.rm_item_code
}
}
});
let batch_no_field = frm.get_docfield("items", "batch_no");
if (batch_no_field) {
batch_no_field.get_route_options_for_new_doc = function(row) {