fix(ux): add filters for SBB

This commit is contained in:
s-aga-r
2023-06-14 14:58:01 +05:30
parent 5c805db573
commit 7549a5c371
9 changed files with 111 additions and 0 deletions

View File

@@ -77,6 +77,18 @@ frappe.ui.form.on('Subcontracting Receipt', {
}
});
frm.set_query("serial_and_batch_bundle", "supplied_items", (doc, cdt, cdn) => {
let row = locals[cdt][cdn];
return {
filters: {
'item_code': row.rm_item_code,
'voucher_type': doc.doctype,
'voucher_no': ["in", [doc.name, ""]],
'is_cancelled': 0,
}
}
});
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) {