From 71606035fd531edd49a4b735bcef9fb153b2e66d Mon Sep 17 00:00:00 2001 From: Damien De Paoli Date: Wed, 11 Feb 2026 19:29:07 +1100 Subject: [PATCH] fix bug where growth is not calculated properly for future bills / hangover from when I assumed only simple growth as that was all we had before I added new growth menu options --- BUGS | 3 --- bills.py | 5 ++--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/BUGS b/BUGS index fd43a79..6c5b00c 100644 --- a/BUGS +++ b/BUGS @@ -1,6 +1,3 @@ -* with future bills - recalculate bills button blows away growth! - - BUT, I think just loading the bills page puts it back -- need to validate and fix if so - * can put in dumb dates - DO SOME INPUT VALIDATION, *sigh* - e.g. 0026-02-19 for a Gas bill diff --git a/bills.py b/bills.py index 2e35177..cabf035 100644 --- a/bills.py +++ b/bills.py @@ -643,8 +643,7 @@ def recalcFutureBills(): for fb in future_car_bills: amt=fb['amount'] bt=fb['bill_type'] - # only can use simple growth as its a future bill - growth=bill_types[bt]['ann_growth_simple'] + growth = get_growth_value( bill_types, bt ) # factor in growth for next bills for yr in range( int(car_yr), END_YEAR+1 ): new_date=f"{yr}-{car_mmdd}" @@ -661,7 +660,7 @@ def recalcFutureBills(): # deal with future bills due to their starting dates being dynamic amt=fb['amount'] bt=fb['bill_type'] - growth=bill_types[bt]['ann_growth_simple'] + growth = get_growth_value( bill_types, bt ) num_ann_bills= bf_id_num[bt_id_freq[bt]] if num_ann_bills == 1: # factor in growth for next bill