|
|
@ -59,6 +59,7 @@ class VirtualTransaction(models.Model):
|
|
|
|
|
|
|
|
|
|
|
|
@staticmethod
|
|
|
|
@staticmethod
|
|
|
|
def moveMoney(fromUser, toUser, amount, commit=True):
|
|
|
|
def moveMoney(fromUser, toUser, amount, commit=True):
|
|
|
|
|
|
|
|
if fromUser != toUser:
|
|
|
|
fromProfile = fromUser.get_profile()
|
|
|
|
fromProfile = fromUser.get_profile()
|
|
|
|
toProfile = toUser.get_profile()
|
|
|
|
toProfile = toUser.get_profile()
|
|
|
|
fromProfile.balance -= amount
|
|
|
|
fromProfile.balance -= amount
|
|
|
|