fix: Better validation message for group accounts (#21725)

This commit is contained in:
Deepesh Garg 2020-05-15 19:23:41 +05:30 committed by GitHub
parent 1b821fec4b
commit 7be71c88f2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -112,8 +112,8 @@ class GLEntry(Document):
from tabAccount where name=%s""", self.account, as_dict=1)[0]
if ret.is_group==1:
frappe.throw(_("{0} {1}: Account {2} cannot be a Group")
.format(self.voucher_type, self.voucher_no, self.account))
frappe.throw(_('''{0} {1}: Account {2} is a Group Account and group accounts cannot be used in
transactions''').format(self.voucher_type, self.voucher_no, self.account))
if ret.docstatus==2:
frappe.throw(_("{0} {1}: Account {2} is inactive")