Merge pull request #20592 from byugandhara/develop
fix: Changes done to get valid customer and employee list on payment entry form(#20498)
This commit is contained in:
commit
5a2f22258a
@ -253,6 +253,19 @@ frappe.ui.form.on('Payment Entry', {
|
|||||||
frappe.throw(__("Party can only be one of "+ party_types.join(", ")));
|
frappe.throw(__("Party can only be one of "+ party_types.join(", ")));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
frm.set_query("party", function() {
|
||||||
|
if(frm.doc.party_type == 'Employee'){
|
||||||
|
return {
|
||||||
|
query: "erpnext.controllers.queries.employee_query"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if(frm.doc.party_type == 'Customer'){
|
||||||
|
return {
|
||||||
|
query: "erpnext.controllers.queries.customer_query"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
if(frm.doc.party) {
|
if(frm.doc.party) {
|
||||||
$.each(["party", "party_balance", "paid_from", "paid_to",
|
$.each(["party", "party_balance", "paid_from", "paid_to",
|
||||||
"paid_from_account_currency", "paid_from_account_balance",
|
"paid_from_account_currency", "paid_from_account_balance",
|
||||||
|
@ -296,3 +296,11 @@ frappe.ui.form.on("Material Request Plan Item", {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
cur_frm.fields_dict['sales_orders'].grid.get_field("sales_order").get_query = function() {
|
||||||
|
return{
|
||||||
|
filters: [
|
||||||
|
['Sales Order','docstatus', '=' ,1]
|
||||||
|
]
|
||||||
|
}
|
||||||
|
};
|
Loading…
x
Reference in New Issue
Block a user