austax: Implement deduction D9

This commit is contained in:
RunasSudo 2023-07-03 22:32:23 +10:00
parent 99d3d6d22d
commit 474a5016db
Signed by: RunasSudo
GPG Key ID: 7234E476BF21C61A
2 changed files with 12 additions and 6 deletions

View File

@ -34,6 +34,7 @@ def plugin_init():
drcr.plugins.account_kinds.append(('austax.d2', 'Work-related travel expenses (D2)')) 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.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.d5', 'Other work-related expenses (D5)'))
drcr.plugins.account_kinds.append(('austax.d9', 'Gifts or donations (D9)'))
drcr.plugins.account_kinds.append(('austax.paygw', 'PAYG withheld amounts')) drcr.plugins.account_kinds.append(('austax.paygw', 'PAYG withheld amounts'))
drcr.plugins.account_kinds.append(('austax.cgtasset', 'CGT asset')) drcr.plugins.account_kinds.append(('austax.cgtasset', 'CGT asset'))
drcr.plugins.account_kinds.append(('austax.rfb', 'Reportable fringe benefit')) drcr.plugins.account_kinds.append(('austax.rfb', 'Reportable fringe benefit'))

View File

@ -103,9 +103,14 @@ def tax_summary_report():
entries=entries_for_kind(account_configurations, accounts, 'austax.d5') + [Subtotal('Total item D5', id='d5', floor=100)] entries=entries_for_kind(account_configurations, accounts, 'austax.d5') + [Subtotal('Total item D5', id='d5', floor=100)]
), ),
Spacer(), Spacer(),
Section(
title='Gifts or donations (D9)',
entries=entries_for_kind(account_configurations, accounts, 'austax.d9') + [Subtotal('Total item D9', id='d9', floor=100)]
),
Spacer(),
Calculated( Calculated(
'Total deductions', 'Total deductions',
lambda r: r.by_id('d2').amount + 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 + r.by_id('d9').amount,
id='deductions', id='deductions',
heading=True, heading=True,
bordered=True bordered=True
@ -133,11 +138,6 @@ def tax_summary_report():
] ]
), ),
Spacer(), Spacer(),
Section(
title='PAYG withheld amounts',
entries=entries_for_kind(account_configurations, accounts, 'austax.paygw') + [Subtotal('Total withheld amounts', id='paygw')]
),
Spacer(),
Section( Section(
entries=[ entries=[
Calculated( Calculated(
@ -159,6 +159,11 @@ def tax_summary_report():
] ]
), ),
Spacer(), Spacer(),
Section(
title='PAYG withheld amounts',
entries=entries_for_kind(account_configurations, accounts, 'austax.paygw') + [Subtotal('Total withheld amounts', id='paygw')]
),
Spacer(),
Calculated( Calculated(
'ATO liability payable (refundable)', 'ATO liability payable (refundable)',
lambda _: report.by_id('total_tax').amount - report.by_id('paygw').amount + report.by_id('loan_repayment').amount, lambda _: report.by_id('total_tax').amount - report.by_id('paygw').amount + report.by_id('loan_repayment').amount,