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:
3
BUGS
3
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
|
||||
|
||||
|
||||
5
bills.py
5
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
|
||||
|
||||
Reference in New Issue
Block a user