fix: Get bank account on selection of payment mode in Loan

This commit is contained in:
Nabin Hait 2019-05-16 13:42:11 +05:30
parent ab1c43dbee
commit b90fc7fc0d

View File

@ -172,6 +172,7 @@ frappe.ui.form.on('Loan', {
}, },
mode_of_payment: function (frm) { mode_of_payment: function (frm) {
if (frm.doc.mode_of_payment && frm.doc.company) {
frappe.call({ frappe.call({
method: "erpnext.accounts.doctype.sales_invoice.sales_invoice.get_bank_cash_account", method: "erpnext.accounts.doctype.sales_invoice.sales_invoice.get_bank_cash_account",
args: { args: {
@ -184,6 +185,7 @@ frappe.ui.form.on('Loan', {
} }
} }
}); });
}
}, },
loan_application: function (frm) { loan_application: function (frm) {