fix: account modify
This commit is contained in:
parent
d7737883f7
commit
903aae2c63
1 changed files with 2 additions and 2 deletions
|
@ -90,7 +90,7 @@ class AccountTab(TabPage):
|
|||
a_id = self.rows[index][0]
|
||||
print(a_id)
|
||||
self.pg.execute(
|
||||
"SELECT meta->>'name', meta->>'balance', meta->'description' FROM account WHERE a_id=%s", (a_id,))
|
||||
"SELECT meta->>'name', replace(substring(balance::text, 2), ',', ''), meta->'description' FROM account WHERE a_id=%s", (a_id,))
|
||||
data = self.pg.fetchall()
|
||||
print(data)
|
||||
|
||||
|
@ -101,7 +101,7 @@ class AccountTab(TabPage):
|
|||
|
||||
balanceLabel = QLabel("Account Balance:")
|
||||
balanceLine = QLineEdit()
|
||||
balanceLine.setText(f'{float(data[0][1]):.2f}')
|
||||
balanceLine.setText(data[0][1])
|
||||
# 只允许输入两位小数
|
||||
balanceLine.setValidator(QDoubleValidator(0.00, 999999999.99, 2))
|
||||
|
||||
|
|
Loading…
Reference in a new issue