mirror of
https://github.com/brmlab/brmbar.git
synced 2025-06-09 05:44:06 +02:00
Add missing collateral changes for Transfer
This commit is contained in:
parent
5c84bd6a8f
commit
099d775102
3 changed files with 22 additions and 3 deletions
|
@ -122,6 +122,14 @@ class ShopAdapter(QtCore.QObject):
|
|||
db.commit()
|
||||
return balance
|
||||
|
||||
@QtCore.Slot('QVariant', 'QVariant', 'QVariant', result='QVariant')
|
||||
def newTransfer(self, uidfrom, uidto, amount):
|
||||
ufrom = brmbar.Account.load(db, id=uidfrom)
|
||||
uto = brmbar.Account.load(db, id=uidto)
|
||||
shop.transfer_credit(ufrom, uto, amount = amount)
|
||||
db.commit()
|
||||
return currency.str(float(amount))
|
||||
|
||||
@QtCore.Slot('QVariant', result='QVariant')
|
||||
def balance_user(self, userid):
|
||||
user = brmbar.Account.load(db, id=userid)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue