From f1594b23928548c2160ad050cd4a7aa2f0305c1c Mon Sep 17 00:00:00 2001 From: RunasSudo Date: Fri, 27 Jan 2023 21:49:29 +1100 Subject: [PATCH] austax: Add D2 deduction --- austax/__init__.py | 1 + austax/reports.py | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/austax/__init__.py b/austax/__init__.py index 4a6e337..5dfcd19 100644 --- a/austax/__init__.py +++ b/austax/__init__.py @@ -31,6 +31,7 @@ def plugin_init(): drcr.plugins.account_kinds.append(('austax.income1', 'Salary or wages (1)')) drcr.plugins.account_kinds.append(('austax.income5', 'Australian Government allowances and payments (5)')) drcr.plugins.account_kinds.append(('austax.income10', 'Gross interest (10)')) + drcr.plugins.account_kinds.append(('austax.d2', 'Work-related travel expenses (D2)')) 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.paygw', 'PAYG withheld amounts')) diff --git a/austax/reports.py b/austax/reports.py index 99b728e..e07da93 100644 --- a/austax/reports.py +++ b/austax/reports.py @@ -93,6 +93,11 @@ def tax_summary_report(): bordered=True ), Spacer(), + Section( + title='Work-related travel expenses (D2)', + entries=entries_for_kind(account_configurations, accounts, 'austax.d2') + [Subtotal('Total item D2', id='d2', floor=100)] + ), + Spacer(), Section( title='Work-related self-education expenses (D4)', entries=entries_for_kind(account_configurations, accounts, 'austax.d4') + [Subtotal('Total item D4', id='d4', floor=100)] @@ -105,7 +110,7 @@ def tax_summary_report(): Spacer(), Calculated( 'Total deductions', - lambda r: r.by_id('d4').amount + r.by_id('d5').amount, + lambda r: r.by_id('d2').amount + r.by_id('d4').amount + r.by_id('d5').amount, id='deductions', heading=True, bordered=True