update to support new fields: Car_buyout, Car_buyout_date, Ioniq6_future and updated to pass in dynamic opts for drop-downs for sell shares and ioniq6 future
This commit is contained in:
16
main.py
16
main.py
@@ -43,7 +43,7 @@ def index():
|
||||
r=[]
|
||||
r.append( FP_VAR( 'D # Fortnights pay', 'D_Num_fortnights_pay' ) )
|
||||
r.append( FP_VAR( 'Interest Rate', 'Interest_Rate' ) )
|
||||
r.append( FP_VAR( 'Car Loan', 'Car_loan', 'readonly' ) )
|
||||
r.append( FP_VAR( 'Car Loan (monthly)', 'Car_loan', 'readonly' ) )
|
||||
r.append( FP_VAR( 'Inflation', 'Inflation' ) )
|
||||
r.append( FP_VAR( 'Reno Costs', 'Mark_reno', 'date', 'col-auto', 'Mark_reno_date' ) )
|
||||
DISP.append(r)
|
||||
@@ -53,6 +53,12 @@ def index():
|
||||
r.append( FP_VAR( 'D # days leave', 'D_leave_owed_in_days' ) )
|
||||
r.append( FP_VAR( 'M TLS amount', 'M_TLS_shares' ) )
|
||||
r.append( FP_VAR( 'Car Balloon', 'Car_balloon', 'readonly' ) )
|
||||
ss_opt = [ { 'val': 0, 'label': 'Never' } ]
|
||||
for el in range(1,7):
|
||||
ss_opt.append( { 'val': el, 'label': f'{el} years' } )
|
||||
|
||||
r.append( FP_VAR( 'Sell Shares for:', 'Sell_shares', 'select', 'col-auto', '', ss_opt ) )
|
||||
r.append( FP_VAR( 'Car Buyout', 'Car_buyout', 'date', 'col-auto', 'Car_buyout_date' ) )
|
||||
DISP.append(r)
|
||||
|
||||
# Row 3
|
||||
@@ -60,7 +66,8 @@ def index():
|
||||
r.append( FP_VAR( 'D CBA amount', 'D_CBA_shares' ) )
|
||||
r.append( FP_VAR( 'D TLS amount', 'D_TLS_shares' ) )
|
||||
r.append( FP_VAR( 'Mich Present', 'Mich_present', 'readonly' ) )
|
||||
r.append( FP_VAR( 'Sell Shares for:', 'Sell_shares', 'select', 'col-auto' ) )
|
||||
if_opt = [ { 'val': 0, 'label': 'lease' } , {'val': 1, 'label': 'buyout' } ]
|
||||
r.append( FP_VAR( 'Ioniq6 future', 'Ioniq6_future', 'select', 'col-auto', '', if_opt ) )
|
||||
DISP.append(r)
|
||||
|
||||
# Row 4
|
||||
@@ -90,6 +97,7 @@ def update():
|
||||
request.form['Car_loan_via_pay'],
|
||||
request.form['Car_loan'],
|
||||
request.form['Car_balloon'],
|
||||
request.form['Car_buyout'],
|
||||
request.form['Living_Expenses'],
|
||||
request.form['Savings'],
|
||||
request.form['Interest_Rate'],
|
||||
@@ -105,8 +113,10 @@ def update():
|
||||
request.form['CBA_price'],
|
||||
request.form['Overseas_trip_date'],
|
||||
request.form['Mark_reno_date'],
|
||||
request.form['Car_buyout_date'],
|
||||
request.form['Sell_shares'],
|
||||
request.form['compare_to']
|
||||
request.form['compare_to'],
|
||||
request.form['Ioniq6_future']
|
||||
)
|
||||
|
||||
update_finance(finance_data)
|
||||
|
||||
Reference in New Issue
Block a user