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

This commit is contained in:
2026-02-11 19:29:07 +11:00
parent b8c1edc084
commit 71606035fd
2 changed files with 2 additions and 6 deletions

3
BUGS
View File

@@ -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* * can put in dumb dates - DO SOME INPUT VALIDATION, *sigh*
- e.g. 0026-02-19 for a Gas bill - e.g. 0026-02-19 for a Gas bill

View File

@@ -643,8 +643,7 @@ def recalcFutureBills():
for fb in future_car_bills: for fb in future_car_bills:
amt=fb['amount'] amt=fb['amount']
bt=fb['bill_type'] bt=fb['bill_type']
# only can use simple growth as its a future bill growth = get_growth_value( bill_types, bt )
growth=bill_types[bt]['ann_growth_simple']
# factor in growth for next bills # factor in growth for next bills
for yr in range( int(car_yr), END_YEAR+1 ): for yr in range( int(car_yr), END_YEAR+1 ):
new_date=f"{yr}-{car_mmdd}" new_date=f"{yr}-{car_mmdd}"
@@ -661,7 +660,7 @@ def recalcFutureBills():
# deal with future bills due to their starting dates being dynamic # deal with future bills due to their starting dates being dynamic
amt=fb['amount'] amt=fb['amount']
bt=fb['bill_type'] 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]] num_ann_bills= bf_id_num[bt_id_freq[bt]]
if num_ann_bills == 1: if num_ann_bills == 1:
# factor in growth for next bill # factor in growth for next bill