Merge pull request #34901 from s-aga-r/FIX-ISS-23-24-00145

fix: add item-code filter for SCR supplied-items batch-no
This commit is contained in:
Sagar Sharma 2023-04-19 19:23:12 +05:30 committed by GitHub
commit c88beb76d6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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) {