diff --git a/austax/reports.py b/austax/reports.py index 113092a..efb1b04 100644 --- a/austax/reports.py +++ b/austax/reports.py @@ -30,10 +30,14 @@ def base_income_tax(year, taxable_income): 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)), '$') -def lito(taxable_income): +def lito(taxable_income, total_tax): """Get the amount of low income tax offset""" 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, '$') if taxable_income.quantity <= 4500000: return Amount(70000 - 0.05 * (taxable_income.quantity - 3750000), '$') @@ -169,7 +173,7 @@ def tax_summary_report(): Section( title='Tax offsets', 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') ] ),