diff --git a/bpfin/financials/financial_budget_simulator.py b/bpfin/financials/financial_budget_simulator.py index 4100973d1a5c2a460b8563f8ab9a326adfea4c9f..9a28e452d049459677450479d3a6f48d677df42c 100644 --- a/bpfin/financials/financial_budget_simulator.py +++ b/bpfin/financials/financial_budget_simulator.py @@ -206,10 +206,10 @@ def form_budget_simulation_result(loan_list): for preference in preference_list: table_lists = [] table_lists.append(['saving_percentage']) - table_lists.append(['budget']) + table_lists.append(['Budget']) for loan in loan_list: table_lists.append([loan.get_loan_terms()['institute']]) - table_lists.append(['self_finance']) + table_lists.append(['Self Finance']) budget_simulation_result[preference] = table_lists return budget_simulation_result diff --git a/bpfin/financials/financial_income.py b/bpfin/financials/financial_income.py index 173ee3644d27741c276b6d9f4e2070fb945f0b52..06ab55386fb2737c61905354bfd570fe48f2c2d5 100644 --- a/bpfin/financials/financial_income.py +++ b/bpfin/financials/financial_income.py @@ -500,7 +500,7 @@ def validate_annual_bill_table(annual_bill_table): if len(annual_bill_table[utility].keys()) != duration: return False for charge in annual_bill_table[utility].values(): - if not charge: + if charge is None: return False return True diff --git a/bpfin/tests/testdata/feature_data.py b/bpfin/tests/testdata/feature_data.py index 8b37a7a441125d29adfdf94ec73c1c62b6c445b5..38964421b66323abd4b2d5a9a265bac4facfa425 100644 --- a/bpfin/tests/testdata/feature_data.py +++ b/bpfin/tests/testdata/feature_data.py @@ -691,26 +691,26 @@ growth_rate_flag = -2.0 budget_simulation_result = [ [['saving_percentage', 0.1, 0.2, 0.30000000000000004, 0.4, 0.5], [ - 'budget', 37723.783022506694, 68031.962268808478, 68031.962268808478, + 'Budget', 37723.783022506694, 68031.962268808478, 68031.962268808478, 68031.962268808478, 68031.962268808478 ], ['NYSERDA', 0.0, 0.0, 0.0, 0.0, 0.0], ['Joe Fund', 37723.783022506694, 50000.0, 50000.0, 50000.0, 50000.0], [ 'Tooraj Capital', 0.0, 18031.962268808486, 18031.962268808486, 18031.962268808486, 18031.962268808486 - ], ['self_finance', 0.0, 0.0, 0.0, 0.0, 0.0]], + ], ['Self Finance', 0.0, 0.0, 0.0, 0.0, 0.0]], [['saving_percentage', 0.1, 0.2, 0.30000000000000004, 0.4, 0.5], [ - 'budget', 37723.783022506701, 77213.635473036207, 118031.96226880848, + 'Budget', 37723.783022506701, 77213.635473036207, 118031.96226880848, 118031.96226880848, 118031.96226880848 ], ['NYSERDA', 0.0, 0.0, 0.0, 0.0, 0.0], ['Joe Fund', 37723.783022506694, 50000.0, 50000.0, 50000.0, 50000.0], [ 'Tooraj Capital', 0.0, 18031.962268808486, 18031.962268808486, 18031.962268808486, 18031.962268808486 ], [ - 'self_finance', 9.0949470177292824e-12, 9181.6732042277363, 50000.0, + 'Self Finance', 9.0949470177292824e-12, 9181.6732042277363, 50000.0, 50000.0, 50000.0 ]], [['saving_percentage', 0.1, 0.2, 0.30000000000000004, 0.4, 0.5], [ - 'budget', 52184.67464428641, 89908.457666793111, 118031.96226880848, + 'Budget', 52184.67464428641, 89908.457666793111, 118031.96226880848, 118031.96226880848, 118031.96226880848 ], ['NYSERDA', 0.0, 0.0, 0.0, 0.0, 0.0], [ 'Joe Fund', 2184.6746442864069, 39908.457666793111, 50000.0, 50000.0, @@ -718,16 +718,16 @@ budget_simulation_result = [ ], [ 'Tooraj Capital', 0.0, 0.0, 18031.962268808486, 18031.962268808486, 18031.962268808486 - ], ['self_finance', 50000.0, 50000.0, 50000.0, 50000.0, 50000.0]], + ], ['Self Finance', 50000.0, 50000.0, 50000.0, 50000.0, 50000.0]], [['saving_percentage', 0.1, 0.2, 0.30000000000000004, 0.4, 0.5], [ - 'budget', 87723.783022506686, 118031.96226880848, 118031.96226880848, + 'Budget', 87723.783022506686, 118031.96226880848, 118031.96226880848, 118031.96226880848, 118031.96226880848 ], ['NYSERDA', 0.0, 0.0, 0.0, 0.0, 0.0], ['Joe Fund', 37723.783022506694, 50000.0, 50000.0, 50000.0, 50000.0], [ 'Tooraj Capital', 0.0, 18031.962268808486, 18031.962268808486, 18031.962268808486, 18031.962268808486 - ], ['self_finance', 50000.0, 50000.0, 50000.0, 50000.0, 50000.0]] + ], ['Self Finance', 50000.0, 50000.0, 50000.0, 50000.0, 50000.0]] ] post_annual_bill = {