From b43b472e4ba506c300669b4f940a590828d79da6 Mon Sep 17 00:00:00 2001 From: Damien De Paoli Date: Wed, 20 Aug 2025 18:07:39 +1000 Subject: [PATCH] support esimated for new_bill - any GUI new bill is not an estimate --- main.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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'])