From d50b6a0e0a716b85b4c8ca4cffb700f751bebe90 Mon Sep 17 00:00:00 2001 From: RunasSudo Date: Fri, 16 Aug 2024 22:40:10 +1000 Subject: [PATCH] austax: Add D15 (Other deductions) --- austax/__init__.py | 3 ++- austax/reports.py | 10 ++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/austax/__init__.py b/austax/__init__.py index 25ec4a7..0507caa 100644 --- a/austax/__init__.py +++ b/austax/__init__.py @@ -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')) diff --git a/austax/reports.py b/austax/reports.py index 79352c0..b74869d 100644 --- a/austax/reports.py +++ b/austax/reports.py @@ -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