Hi,
I have created a custom doctype allotment. Which will be created on submitting Sales Order document.
In allotment doctype i have a field called serial_no , i have added filter as below,
frappe.ui.form.on(‘Allotment’, {
refresh(frm) {
frm.set_query(“serial_no”, function(doc, dt, dn){
return {
filters: {
‘item_code’: doc.item_code,
‘delivery_document_type’: (doc.delivery_document_type !== “Delivery Note”)
}
};
I need to filter the serial nos of items which has no delivery note or delivery no, its not getting filtered
Thanks in advance!