austax: Do not allow refunding of non-refundable tax offsets

This commit is contained in:
RunasSudo 2023-09-19 20:03:36 +10:00
parent 4f2085c35f
commit ad5571e219
Signed by: RunasSudo
GPG Key ID: 7234E476BF21C61A

View File

@ -30,10 +30,14 @@ def base_income_tax(year, taxable_income):
lower_limit = base_tax[year][i - 1][0] or 0 lower_limit = base_tax[year][i - 1][0] or 0
return Amount(flat_amount * (10**AMOUNT_DPS) + marginal_rate * (taxable_income.quantity - lower_limit * (10**AMOUNT_DPS)), '$') return Amount(flat_amount * (10**AMOUNT_DPS) + marginal_rate * (taxable_income.quantity - lower_limit * (10**AMOUNT_DPS)), '$')
def lito(taxable_income): def lito(taxable_income, total_tax):
"""Get the amount of low income tax offset""" """Get the amount of low income tax offset"""
if taxable_income.quantity <= 3750000: if taxable_income.quantity <= 3750000:
# LITO is non-refundable
# FIXME: This will not work if we implement multiple non-refundable tax offsets
if total_tax.quantity <= 70000:
return total_tax
return Amount(70000, '$') return Amount(70000, '$')
if taxable_income.quantity <= 4500000: if taxable_income.quantity <= 4500000:
return Amount(70000 - 0.05 * (taxable_income.quantity - 3750000), '$') return Amount(70000 - 0.05 * (taxable_income.quantity - 3750000), '$')
@ -169,7 +173,7 @@ def tax_summary_report():
Section( Section(
title='Tax offsets', title='Tax offsets',
entries=entries_for_kind(account_configurations, accounts, 'austax.offset', neg=True) + [ entries=entries_for_kind(account_configurations, accounts, 'austax.offset', neg=True) + [
Calculated('Low income tax offset', lambda _: lito(report.by_id('taxable').amount)), Calculated('Low income tax offset', lambda _: lito(report.by_id('taxable').amount, report.by_id('total_tax').amount)),
Subtotal('Total tax offsets', id='offsets') Subtotal('Total tax offsets', id='offsets')
] ]
), ),