On payment entry, in references child table I need add one more doctype there if frm.doc.party_type == “Supplier”
How do that without change the hard code?
}
});
frm.set_query("contact_person", function() {
if (frm.doc.party) {
return {
query: 'frappe.contacts.doctype.contact.contact.contact_query',
filters: {
link_doctype: frm.doc.party_type,
link_name: frm.doc.party
}
};
}
});
frm.set_query("paid_to", function() {
frm.events.validate_company(frm);
var account_types = in_list(["Receive", "Internal Transfer"], frm.doc.payment_type) ?
["Bank", "Cash"] : [frappe.boot.party_account_types[frm.doc.party_type]];
return {
rmehta
October 2, 2017, 8:10am
2
Yes this should not be hard-coded, maybe this should be managed via hooks
Can you give me an example?