diff --git a/db.py b/db.py index 5bd5319..4208ced 100644 --- a/db.py +++ b/db.py @@ -290,7 +290,7 @@ def get_bill_freqs(): def new_bill( bill_type, amount, bill_date, estimated ): conn = connect_db(False) cur = conn.cursor() - cur.execute( f"insert into bill_data ( 'bill_type', 'amount', 'bill_date', 'estimated' ) values ( '{bill_type}', '{amount}', '{bill_date}', {estimated} )" ) + cur.execute( f"insert into bill_data ( 'bill_type', 'amount', 'bill_date', 'estimated' ) values ( '{bill_type}', '{amount:.2f}', '{bill_date}', {estimated} )" ) conn.commit() conn.close() return