From 4494dafbb889c62987b434be8abefa06b7a32b5b Mon Sep 17 00:00:00 2001 From: brmbar Date: Mon, 4 Jan 2016 21:04:35 +0100 Subject: [PATCH] Shop.inventory_balance(): Tidy up, commented out code for easy per-item balance dumps --- brmbar3/brmbar/Shop.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/brmbar3/brmbar/Shop.py b/brmbar3/brmbar/Shop.py index 40b7872..4822bdd 100644 --- a/brmbar3/brmbar/Shop.py +++ b/brmbar3/brmbar/Shop.py @@ -135,13 +135,16 @@ 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.balance() * inv.currency.rates(self.currency)[0] + b = inv.balance() * inv.currency.rates(self.currency)[0] + # if b != 0: + # print(str(b) + ',' + inv.name) + balance += b return balance # XXX bypass hack def inventory_balance_str(self): - return "XXX" -# return self.currency.str(self.inventory_balance()) + # return self.currency.str(self.inventory_balance()) + return "XXX" def account_list(self, acctype, like_str="%%"): """list all accounts (people or items, as per acctype)"""