only sell shares in the first year if its not in the same financial year, also show original buffer in comparing note

This commit is contained in:
2025-03-20 17:23:48 +11:00
parent 762746a0c1
commit 9baa3b4987
4 changed files with 8 additions and 5 deletions

View File

@@ -65,6 +65,7 @@ def calculate_savings_depletion(finance):
# convenience vars to make it easier to read conditional leave tax/payment logic below
D_has_quit = False
D_quit_year = 0
claim_tax_on_leave = False
new_fin_year_25 = datetime(2025, 7, 1)
new_fin_year_26 = datetime(2026, 7, 1)
@@ -134,6 +135,7 @@ def calculate_savings_depletion(finance):
if D_Num_fortnights_pay == 0 and D_leave_after_tax > 0:
D_has_quit = True
D_quit_year = current_date.year
# okay, if we leave before Jun 30th 2024, then I pay full tax, otherwise I get 'extra', but have to await end of next fin year
if current_date > new_fin_year_25:
claim_tax_on_leave = True
@@ -227,8 +229,9 @@ def calculate_savings_depletion(finance):
D_CBA_shares += int( (2.25*D_CBA_shares/CBA_price) )
# if selling shares, and its 1st of July...
# BUT not if D quits so his leave payout comes in 2025 fin year, then don't sell shares at all as we will be over as already paying tax
if D_has_quit and Sell_shares>0 and current_date.month == 7 and current_date.day == 1:
# BUT not if D quits before end of financial year - as I won't be able to sell CBA shares for no cap gains
# so wait until the following year
if current_date.month == 7 and current_date.day == 1 and D_has_quit and Sell_shares>0 and (current_date.year > D_quit_year or current_date.year == D_quit_year and claim_tax_on_leave == False):
# 2024 Govt. value
tax_threshold = 18200
# cap-gains is 50% of profit (lazy profit calc here, just assume its all profit)