diff --git a/calc.py b/calc.py index 2ba2104..b64654f 100644 --- a/calc.py +++ b/calc.py @@ -6,8 +6,6 @@ LEASE = 0 def add_annotation(finance, dt, total, delta, text): # dont add an annotation for small changes (jic) -# if abs(delta) < 5000: -# return tm = dt.timestamp() * 1000 if delta > 0: text += f": ${int(abs(delta))}" @@ -198,12 +196,9 @@ def calculate_savings_depletion(finance): if current_date.month == car_balloon_date.month and current_date.day == car_balloon_date.day: # staying with the lease (0), if I have quit, then pay monthly rego only up to lease date, but full cost after car balloon date if Ioniq6_future == LEASE: - if current_date.year > car_balloon_date.year: + if current_date.year >= car_balloon_date.year: current_savings -= (ioniq6_ins + ioniq6_rego) add_annotation(finance, current_date, current_savings, -(ioniq6_ins+ioniq6_rego), "IONIQ 6 ins/rego" ) - else: - current_savings -= ioniq6_rego - add_annotation(finance, current_date, current_savings, -ioniq6_rego, "IONIQ 6 rego" ) # if we buy car outright, then as long as this anniversary is after buyout date, pay ins and rego elif current_date.year >= car_buyout_date.year: current_savings -= (ioniq6_ins + ioniq6_rego)