mirror of
https://github.com/brmlab/brmbar.git
synced 2025-06-08 13:24:01 +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
|
@ -78,6 +78,10 @@ class Shop:
|
|||
user.debit(transaction, credit, "Credit withdrawal")
|
||||
self.db.commit()
|
||||
|
||||
def transfer_credit(self, userfrom, userto, amount):
|
||||
self.add_credit(amount, userto)
|
||||
self.withdraw_credit(amount, userfrom)
|
||||
|
||||
def buy_for_cash(self, item, amount = 1):
|
||||
# Buy: Currency conversion from item currency to shop currency
|
||||
(buy, sell) = item.currency.rates(self.currency)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue