[minor] check mode_of_payment in Payment entry
diff --git a/erpnext/public/js/controllers/accounts.js b/erpnext/public/js/controllers/accounts.js
index 19ef162..abd5566 100644
--- a/erpnext/public/js/controllers/accounts.js
+++ b/erpnext/public/js/controllers/accounts.js
@@ -94,6 +94,10 @@
frappe.throw(__("Please select the Company first"));
}
+ if(!mode_of_payment) {
+ return;
+ }
+
return frappe.call({
method: "erpnext.accounts.doctype.sales_invoice.sales_invoice.get_bank_cash_account",
args: {