Employee Loan Should Be Limited To Employee Company (#10039) (#10093)

* filter employee drop down by company name

* codacy fix
This commit is contained in:
tundebabzy 2017-07-27 07:17:03 +01:00 committed by Nabin Hait
parent 9281013d51
commit 84227a6c54

View File

@ -23,6 +23,14 @@ frappe.ui.form.on('Employee Loan', {
};
});
frm.set_query("employee", function() {
return {
"filters": {
"company": frm.doc.company,
}
};
});
$.each(["payment_account", "employee_loan_account"], function (i, field) {
frm.set_query(field, function () {
return {