APO-1 Add transfer allowance
This commit is contained in:
parent
37fb598867
commit
5a06fac6a6
@ -82,9 +82,13 @@ def TransferMoney(accountFrom, accountTo, amount):
|
||||
if amount > accountFrom.credit:
|
||||
print("You dont't have enough money on your account")
|
||||
return 0
|
||||
if accountTo.acceptTransfers:
|
||||
accountFrom.subCredit(amount)
|
||||
accountTo.addCredit(amount)
|
||||
return 1
|
||||
else:
|
||||
print("Reciever do not allow transfers")
|
||||
return 0
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user