From ece7481e9e01c619c882d6e17ff5652bf884492e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BE=9D=E7=91=AA=E8=B2=93?= Date: Sat, 16 Dec 2023 21:51:14 +0800 Subject: [PATCH] Refined to enable the selection of the 3351-001 Accumulated Profit or Loss account. --- src/accounting/forms.py | 2 -- src/accounting/models.py | 4 ---- 2 files changed, 6 deletions(-) diff --git a/src/accounting/forms.py b/src/accounting/forms.py index 7415c79..0b01aa6 100644 --- a/src/accounting/forms.py +++ b/src/accounting/forms.py @@ -71,7 +71,6 @@ class IsDebitAccount: if field.data is None: return if re.match(r"^(?:[1235689]|7[5678])", field.data) \ - and field.data != "3351-001" \ and not field.data.startswith("3353-"): return raise ValidationError(self.__message) @@ -92,7 +91,6 @@ class IsCreditAccount: if field.data is None: return if re.match(r"^(?:[123489]|7[1234])", field.data) \ - and field.data != "3351-001" \ and not field.data.startswith("3353-"): return raise ValidationError(self.__message) diff --git a/src/accounting/models.py b/src/accounting/models.py index bc8eccd..4524b3d 100644 --- a/src/accounting/models.py +++ b/src/accounting/models.py @@ -304,8 +304,6 @@ class Account(db.Model): cls.base_code.startswith("78"), cls.base_code.startswith("8"), cls.base_code.startswith("9")), - sa.not_(sa.and_(cls.base_code == "3351", - cls.no == 1)), cls.base_code != "3353")\ .order_by(cls.base_code, cls.no).all() @@ -327,8 +325,6 @@ class Account(db.Model): cls.base_code.startswith("74"), cls.base_code.startswith("8"), cls.base_code.startswith("9")), - sa.not_(sa.and_(cls.base_code == "3351", - cls.no == 1)), cls.base_code != "3353")\ .order_by(cls.base_code, cls.no).all()