get_party_account only if company is set

This commit is contained in:
Faris Ansari 2018-02-08 11:09:54 +05:30
parent b553b7a69d
commit f7717b9ec2

View File

@ -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: {