handle simple future bills and their growth all now done
This commit is contained in:
2
TODO
2
TODO
@@ -2,8 +2,6 @@ UI:
|
||||
|
||||
For bills:
|
||||
Future bills:
|
||||
* first pass for future bills done, but frequency is hard-coded and no growth - should at least add growth (easy enough)
|
||||
|
||||
* longer-term: make the moment we quit / own car trigger new bill creation, and remove hard-coded logic on costs - just use bill_data created
|
||||
- this will then cover handling different bill_types or growth models
|
||||
|
||||
|
||||
6
calc.py
6
calc.py
@@ -189,11 +189,15 @@ def calculate_savings_depletion(finance, bill_data, bill_type):
|
||||
# KLUDGE for future bills for now:
|
||||
# if I have quit, pay monthly future bills - assume 1st day of month for health ins
|
||||
if D_has_quit and current_date.day == 1:
|
||||
health_ins = health_ins * 1+((health_ins_bt['ann_growth_simple'])/100)*12
|
||||
current_savings -= health_ins
|
||||
|
||||
# once a year from when I quit, pay the phone bill (year I quit comes below)
|
||||
if D_has_quit and current_date.month == D_quit_date.month and current_date.day == D_quit_date.day:
|
||||
current_savings -= phone_d
|
||||
amt=phone_d
|
||||
for y in range( D_quit_date.year, current_date.year):
|
||||
amt = amt * (1+phone_d_bt['ann_growth_simple']/100)
|
||||
current_savings -= amt
|
||||
|
||||
# Calculate daily interest but apply at the end of the month
|
||||
monthly_interest += current_savings * daily_interest_rate
|
||||
|
||||
Reference in New Issue
Block a user