From f7717b9ec2a8cc4339134e7b17ba72293978c52c Mon Sep 17 00:00:00 2001 From: Faris Ansari Date: Thu, 8 Feb 2018 11:09:54 +0530 Subject: [PATCH] get_party_account only if company is set --- erpnext/public/js/controllers/transaction.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/public/js/controllers/transaction.js b/erpnext/public/js/controllers/transaction.js index eb333af1ed..c5c9973b7a 100644 --- a/erpnext/public/js/controllers/transaction.js +++ b/erpnext/public/js/controllers/transaction.js @@ -458,7 +458,7 @@ erpnext.TransactionController = erpnext.taxes_and_totals.extend({ } var party = me.frm.doc[frappe.model.scrub(party_type)]; - if(party) { + if(party && me.frm.doc.company) { return frappe.call({ method: "erpnext.accounts.party.get_party_account", args: {