fix: trans table order by dsec

This commit is contained in:
iridiumR 2023-06-03 14:29:46 +08:00
parent b636d3d9b2
commit 1e3726318f
No known key found for this signature in database
GPG key ID: 49735733EB1A32C8

View file

@ -153,7 +153,7 @@ class TransTab(TabPage):
self.dialogLayout.itemAt(5).widget().addItem(self.accountData[i][1]) self.dialogLayout.itemAt(5).widget().addItem(self.accountData[i][1])
def selected(self): def selected(self):
self.pg.execute("SELECT t_id, a_id, c_id, s_id, time, translate(amount::varchar,'$',''), meta->>'description' FROM transaction ORDER BY time") self.pg.execute("SELECT t_id, a_id, c_id, s_id, time, translate(amount::varchar,'$',''), meta->>'description' FROM transaction ORDER BY time DESC")
self.transData = self.pg.fetchall() self.transData = self.pg.fetchall()
self.pg.execute("SELECT a_id, meta ->> 'name' FROM account ORDER BY a_id") self.pg.execute("SELECT a_id, meta ->> 'name' FROM account ORDER BY a_id")
self.accountData = self.pg.fetchall() self.accountData = self.pg.fetchall()