fix: payment against shareholder (#19019)

This commit is contained in:
Nabin Hait 2019-09-12 19:17:24 +05:30 committed by GitHub
parent a3095c987a
commit a5dfe0725f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -126,7 +126,7 @@ class PaymentEntry(AccountsController):
if not self.party:
frappe.throw(_("Party is mandatory"))
_party_name = "title" if self.party_type == "Student" else self.party_type.lower() + "_name"
_party_name = "title" if self.party_type in ("Student", "Shareholder") else self.party_type.lower() + "_name"
self.party_name = frappe.db.get_value(self.party_type, self.party, _party_name)
if self.party: