Added owner's equity (base code starts with "3") to the accounts that can take offset.

This commit is contained in:
2023-03-18 19:14:35 +08:00
parent c869bccc04
commit 4eac10981f
3 changed files with 4 additions and 4 deletions

View File

@ -62,7 +62,7 @@ class NoOffsetNominalAccount:
return
if form.base_code.data is None:
return
if form.base_code.data[0] not in {"1", "2"}:
if form.base_code.data[0] not in {"1", "2", "3"}:
raise ValidationError(lazy_gettext(
"A nominal account does not need offset."))
@ -102,7 +102,7 @@ class AccountForm(FlaskForm):
obj.base_code = self.base_code.data
obj.no = count + 1
obj.title = self.title.data
if self.base_code.data[0] in {"1", "2"}:
if self.base_code.data[0] in {"1", "2", "3"}:
obj.is_offset_needed = self.is_offset_needed.data
else:
obj.is_offset_needed = False