put back ioniq 6 future bills, but use bill data to set values - assumption at present is they are yearly bills, could do better, but good enough for now. This commit also changes selects to return bill_type not bill_type_id and removed some debugs for bill amt in calc loop
This commit is contained in:
4
db.py
4
db.py
@@ -275,11 +275,11 @@ def get_bill_data(order_by):
|
||||
conn = connect_db(True)
|
||||
cur = conn.cursor()
|
||||
if order_by == "order_by_date_only":
|
||||
cur.execute('''SELECT bd.id, bt.id as bill_type_id, bt.name, bd.amount, bd.bill_date, bd.estimated
|
||||
cur.execute('''SELECT bd.id, bt.id as bill_type, bt.name, bd.amount, bd.bill_date, bd.estimated
|
||||
FROM bill_type bt, bill_data bd
|
||||
where bt.id = bd.bill_type order by bd.bill_date desc''')
|
||||
else:
|
||||
cur.execute('''SELECT bd.id, bt.id as bill_type_id, bt.name, bd.amount, bd.bill_date, bd.estimated
|
||||
cur.execute('''SELECT bd.id, bt.id as bill_type, bt.name, bd.amount, bd.bill_date, bd.estimated
|
||||
FROM bill_type bt, bill_data bd
|
||||
where bt.id = bd.bill_type order by bt.name, bd.bill_date desc''')
|
||||
bd = cur.fetchall()
|
||||
|
||||
Reference in New Issue
Block a user