mirror of
https://github.com/brmlab/brmbar.git
synced 2025-06-07 21:04:00 +02:00
brmbar-cli restock: Print correct old balance
This commit is contained in:
parent
76bb2cac98
commit
feec2c9ac4
1 changed files with 2 additions and 1 deletions
|
@ -208,9 +208,10 @@ elif sys.argv[1] == "restock":
|
||||||
print ("Invalid number of parameters, check your parameters.")
|
print ("Invalid number of parameters, check your parameters.")
|
||||||
else:
|
else:
|
||||||
iacct = load_item(sys.argv[2])
|
iacct = load_item(sys.argv[2])
|
||||||
|
oldbal = iacct.balance()
|
||||||
amt = int(sys.argv[3])
|
amt = int(sys.argv[3])
|
||||||
cash = shop.buy_for_cash(iacct, amt);
|
cash = shop.buy_for_cash(iacct, amt);
|
||||||
print("Old amount {}, increased by {}, take {} from cashbox".format(iacct.balance(), amt, cash))
|
print("Old amount {}, increased by {}, take {} from cashbox".format(oldbal, amt, cash))
|
||||||
|
|
||||||
|
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue