moved some hard-coded dates to top of calc.py for ease of use in multiple functions, but also just for code readability, they are more like constants than variables. Code now works out key_dates for use in dealing with future bills / next steps
This commit is contained in:
3
bills.py
3
bills.py
@@ -291,7 +291,7 @@ def get_growth_value( bt, bill_type ):
|
||||
# and I didn't want to input 12 of them at the same price), and it always
|
||||
# occurs for future bills
|
||||
################################################################################
|
||||
def process_bill_data(bd, bt, bf):
|
||||
def process_bill_data(bd, bt, bf, key_dates):
|
||||
# this maps a bill id to a freq id (e.g. bill #34 - has a frequency of #2 (which might be quarterly)
|
||||
bt_id_freq = {row["id"]: row["freq"] for row in bt}
|
||||
bt_id_ann_growth_avg = {row["id"]: row["ann_growth_avg"] for row in bt}
|
||||
@@ -495,3 +495,4 @@ def calc_future_totals(bill_info, bill_types):
|
||||
# had to round to 2 decimal here to get sensible totals
|
||||
total[bt['id']][yr] = round( total[bt['id']][yr], 2 )
|
||||
return total
|
||||
|
||||
|
||||
Reference in New Issue
Block a user