austax: Add D15 (Other deductions)

This commit is contained in:
RunasSudo 2024-08-16 22:40:10 +10:00
parent 0194a4e006
commit d50b6a0e0a
Signed by: RunasSudo
GPG Key ID: 7234E476BF21C61A
2 changed files with 10 additions and 3 deletions

View File

@ -1,5 +1,5 @@
# DrCr: Web-based double-entry bookkeeping framework
# Copyright (C) 2022–2023 Lee Yingtong Li (RunasSudo)
# Copyright (C) 2022–2024 Lee Yingtong Li (RunasSudo)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
@ -39,6 +39,7 @@ def plugin_init():
drcr.plugins.account_kinds.append(('austax.d4', 'Work-related self-education expenses (D4)'))
drcr.plugins.account_kinds.append(('austax.d5', 'Other work-related expenses (D5)'))
drcr.plugins.account_kinds.append(('austax.d9', 'Gifts or donations (D9)'))
drcr.plugins.account_kinds.append(('austax.d15', 'Other deductions (D15)'))
drcr.plugins.account_kinds.append(('austax.offset', 'Tax offset'))
drcr.plugins.account_kinds.append(('austax.paygw', 'PAYG withheld amounts'))
drcr.plugins.account_kinds.append(('austax.cgtasset', 'CGT asset'))

View File

@ -1,5 +1,5 @@
# DrCr: Web-based double-entry bookkeeping framework
# Copyright (C) 2022–2023 Lee Yingtong Li (RunasSudo)
# Copyright (C) 2022–2024 Lee Yingtong Li (RunasSudo)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
@ -156,9 +156,15 @@ def tax_summary_report():
auto_hide=True
),
Spacer(),
Section(
title='Other deductions (D15)',
entries=entries_for_kind(account_configurations, accounts, 'austax.d15') + [Subtotal('Total item D15', id='d15', floor=100)],
auto_hide=True
),
Spacer(),
Calculated(
'Total deductions',
lambda r: r.by_id('d2').amount + r.by_id('d4').amount + r.by_id('d5').amount + r.by_id('d9').amount,
lambda r: r.by_id('d2').amount + r.by_id('d4').amount + r.by_id('d5').amount + r.by_id('d9').amount + r.by_id('d15').amount,
id='deductions',
heading=True,
bordered=True