diff --git a/main.py b/main.py index 917dcc7..34ca79a 100644 --- a/main.py +++ b/main.py @@ -145,6 +145,7 @@ def DisplayBillData(): bill_types = get_bill_types() bill_freqs = get_bill_freqs() process_bill_data(bill_data, bill_types, bill_freqs) + bill_data = get_bill_data() return render_template('bills.html', bill_data=bill_data, bill_types=bill_types, bill_freqs=bill_freqs ) @app.route('/newbilltype', methods=['POST']) @@ -162,7 +163,8 @@ def UpdateBillType(): @app.route('/newbill', methods=['POST']) def InsertBill(): data = request.get_json() - new_bill( data['name'], data['amount'], data['bill_date'] ) + # last param is estimated - e.g. anything via GUI is not an estimate, but is a real bill + new_bill( data['name'], data['amount'], data['bill_date'], 0 ) return "200" @app.route('/updatebill', methods=['POST'])