[fix] call get_party_account only if party is set
This commit is contained in:
@@ -281,6 +281,7 @@ erpnext.TransactionController = erpnext.taxes_and_totals.extend({
|
|||||||
var party_account_field = 'credit_to';
|
var party_account_field = 'credit_to';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(me.frm.doc[frappe.model.scrub(party_type)]) {
|
||||||
return frappe.call({
|
return frappe.call({
|
||||||
method: "erpnext.accounts.party.get_party_account",
|
method: "erpnext.accounts.party.get_party_account",
|
||||||
args: {
|
args: {
|
||||||
@@ -295,6 +296,7 @@ erpnext.TransactionController = erpnext.taxes_and_totals.extend({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
set_pricing();
|
set_pricing();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user