[Minor] Added condition for get_bank_cash_account (#15112)

This commit is contained in:
rohitwaghchaure
2018-08-09 15:51:38 +05:30
committed by Nabin Hait
parent 8356d4b892
commit a0b846fb88

View File

@@ -71,7 +71,9 @@ frappe.ui.form.on('Employee 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: {
@@ -84,6 +86,7 @@ frappe.ui.form.on('Employee Loan', {
} }
} }
}); });
}
}, },
employee_loan_application: function (frm) { employee_loan_application: function (frm) {