[fix] Period closing account should be of type Liability / Equity
This commit is contained in:
parent
9e425863a1
commit
072c540ae3
@ -23,8 +23,8 @@ class PeriodClosingVoucher(AccountsController):
|
|||||||
def validate_account_head(self):
|
def validate_account_head(self):
|
||||||
closing_account_type = frappe.db.get_value("Account", self.closing_account_head, "root_type")
|
closing_account_type = frappe.db.get_value("Account", self.closing_account_head, "root_type")
|
||||||
|
|
||||||
if closing_account_type != "Liability":
|
if closing_account_type not in ["Liability", "Equity"]:
|
||||||
frappe.throw(_("Closing Account {0} must be of type 'Liability'")
|
frappe.throw(_("Closing Account {0} must be of type Liability / Equity")
|
||||||
.format(self.closing_account_head))
|
.format(self.closing_account_head))
|
||||||
|
|
||||||
account_currency = get_account_currency(self.closing_account_head)
|
account_currency = get_account_currency(self.closing_account_head)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user