Shop.inventory_balance(): Use buy price, not sell price

This commit is contained in:
brmbar 2013-08-06 22:30:27 +02:00
parent e567d36e77
commit 4f3bc87733

View file

@ -130,7 +130,7 @@ class Shop:
# might have been bought for a different price! Therefore,
# we need to replace the command below with a complex SQL
# statement that will... ugh, accounting is hard!
balance += inv.currency.convert(inv.balance(), self.currency)
balance += inv.balance() * inv.currency.rates(self.currency)[0]
return balance
def inventory_balance_str(self):
return self.currency.str(self.inventory_balance())