Merge branch 'hotfix'
diff --git a/erpnext/__init__.py b/erpnext/__init__.py
index ef9b89c..fd32dd4 100644
--- a/erpnext/__init__.py
+++ b/erpnext/__init__.py
@@ -2,7 +2,7 @@
 from __future__ import unicode_literals
 import frappe
 
-__version__ = '8.4.2'
+__version__ = '8.4.3'
 
 def get_default_company(user=None):
 	'''Get default company for user'''
diff --git a/erpnext/accounts/doctype/payment_entry/payment_entry.js b/erpnext/accounts/doctype/payment_entry/payment_entry.js
index 63832fa..eb0f474 100644
--- a/erpnext/accounts/doctype/payment_entry/payment_entry.js
+++ b/erpnext/accounts/doctype/payment_entry/payment_entry.js
@@ -291,7 +291,7 @@
 
 	set_account_currency_and_balance: function(frm, account, currency_field,
 			balance_field, callback_function) {
-		if (frm.doc.posting_date) {
+		if (frm.doc.posting_date && account) {
 			frappe.call({
 				method: "erpnext.accounts.doctype.payment_entry.payment_entry.get_account_details",
 				args: {
diff --git a/erpnext/hr/doctype/expense_claim/expense_claim.js b/erpnext/hr/doctype/expense_claim/expense_claim.js
index 4ce91c4..2a94d05 100644
--- a/erpnext/hr/doctype/expense_claim/expense_claim.js
+++ b/erpnext/hr/doctype/expense_claim/expense_claim.js
@@ -27,6 +27,10 @@
 			return;
 		}
 
+		if(!d.expense_type) {
+			return;
+		}
+
 		return frappe.call({
 			method: "erpnext.hr.doctype.expense_claim.expense_claim.get_expense_claim_account",
 			args: {
diff --git a/erpnext/patches/v7_0/fix_nonwarehouse_ledger_gl_entries_for_transactions.py b/erpnext/patches/v7_0/fix_nonwarehouse_ledger_gl_entries_for_transactions.py
index d0e816a..2b92b17 100644
--- a/erpnext/patches/v7_0/fix_nonwarehouse_ledger_gl_entries_for_transactions.py
+++ b/erpnext/patches/v7_0/fix_nonwarehouse_ledger_gl_entries_for_transactions.py
@@ -7,10 +7,11 @@
 def execute():
 	frappe.reload_doctype("Account")
 
-	warehouses = frappe.db.sql_list("""select name, company from tabAccount
+	warehouses = frappe.db.sql("""select name, company from tabAccount
 		where account_type = 'Stock' and is_group = 0
-		and (warehouse is null or warehouse = '')""", as_dict)
+		and (warehouse is null or warehouse = '')""", as_dict=1)
 	warehouses = [d.name for d in warehouses if erpnext.is_perpetual_inventory_enabled(d.company)]
+
 	if len(warehouses) > 0:
 		warehouses = set_warehouse_for_stock_account(warehouses)
 		if not warehouses:
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: {