From f9fc033de6efd4158c0599a17a191a906e8f21c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BE=9D=E7=91=AA=E8=B2=93?= Date: Wed, 8 Mar 2023 07:43:03 +0800 Subject: [PATCH] Removed the unused RECEIVABLE, PAYABLE, and BROUGHT_FORWARD constants and the unused receivable(), payable(), brought_forward(), and net_change() shortcut methods from the Account data model. --- src/accounting/models.py | 38 -------------------------------------- 1 file changed, 38 deletions(-) diff --git a/src/accounting/models.py b/src/accounting/models.py index 622a61f..a9f5ae7 100644 --- a/src/accounting/models.py +++ b/src/accounting/models.py @@ -143,14 +143,8 @@ class Account(db.Model): CASH = "1111-001" """The code of the cash account,""" - RECEIVABLE = "1141-001" - """The code of the receivable account,""" - PAYABLE = "2141-001" - """The code of the payable account,""" ACCUMULATED_CHANGE = "3351-001" """The code of the accumulated-change account,""" - BROUGHT_FORWARD = "3352-001" - """The code of the brought-forward account,""" NET_CHANGE = "3353-001" """The code of the net-change account,""" @@ -273,22 +267,6 @@ class Account(db.Model): """ return cls.find_by_code(cls.CASH) - @classmethod - def receivable(cls) -> t.Self: - """Returns the receivable account. - - :return: The receivable account - """ - return cls.find_by_code(cls.RECEIVABLE) - - @classmethod - def payable(cls) -> t.Self: - """Returns the payable account. - - :return: The payable account - """ - return cls.find_by_code(cls.PAYABLE) - @classmethod def accumulated_change(cls) -> t.Self: """Returns the accumulated-change account. @@ -297,22 +275,6 @@ class Account(db.Model): """ return cls.find_by_code(cls.ACCUMULATED_CHANGE) - @classmethod - def brought_forward(cls) -> t.Self: - """Returns the brought-forward account. - - :return: The brought-forward account - """ - return cls.find_by_code(cls.BROUGHT_FORWARD) - - @classmethod - def net_change(cls) -> t.Self: - """Returns the net-change account. - - :return: The net-change account - """ - return cls.find_by_code(cls.NET_CHANGE) - @property def is_modified(self) -> bool: """Returns whether a product account was modified.