Removing opening info for read and update, puting in another resource

This commit is contained in:
2025-02-14 16:56:32 +01:00
parent afe89cfb03
commit 65ecfcd919
3 changed files with 17 additions and 22 deletions

View File

@@ -100,15 +100,7 @@ class AccountResource:
@classmethod
def select(cls):
split_filter = aliased(Split)
account_filter = aliased(Account)
columns = [Account.id, Account.name, Account.parent_account_id, Account.family, Account.type, Account.path,
Split.amount.label("opening_balance"), literal_column('"1970-01-01"').label("opening_date")]
return (select(*columns)
.join(Split)
.join(Transaction)
.join(split_filter)
.join(account_filter, account_filter.id == split_filter.account_id and Account.path == "/Equity/"))
return select(Account)
@classmethod
def list(cls, filters):