From 072c540ae30f32c89756bb73fbc3cc406be7eeab Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Mon, 23 Nov 2015 09:52:08 +0530 Subject: [PATCH] [fix] Period closing account should be of type Liability / Equity --- .../doctype/period_closing_voucher/period_closing_voucher.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.py b/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.py index 455887994f..d22f4d323d 100644 --- a/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.py +++ b/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.py @@ -23,8 +23,8 @@ class PeriodClosingVoucher(AccountsController): def validate_account_head(self): closing_account_type = frappe.db.get_value("Account", self.closing_account_head, "root_type") - if closing_account_type != "Liability": - frappe.throw(_("Closing Account {0} must be of type 'Liability'") + if closing_account_type not in ["Liability", "Equity"]: + frappe.throw(_("Closing Account {0} must be of type Liability / Equity") .format(self.closing_account_head)) account_currency = get_account_currency(self.closing_account_head)