mirror of
https://github.com/brmlab/brmbar.git
synced 2025-06-07 21:04:00 +02:00
brmbarv3 TODO: Shop.inventory_balance() is computing wrong results
This commit is contained in:
parent
7f37f0baad
commit
0ab5e579c7
2 changed files with 5 additions and 0 deletions
|
@ -32,6 +32,7 @@
|
|||
- Statistics
|
||||
- Users with debt
|
||||
- Pretty chart
|
||||
- Fix "inventory value" computation
|
||||
- Advanced inventory management
|
||||
- Mass quantity/cash corrections ("inventura" mode)
|
||||
- Integrated brmbar overflow support
|
||||
|
|
|
@ -96,6 +96,10 @@ class Shop:
|
|||
for inventory in cur:
|
||||
invid = inventory[0]
|
||||
inv = Account.load(self.db, id = invid)
|
||||
# FIXME: This is not correct as each instance of inventory
|
||||
# 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)
|
||||
return balance
|
||||
def inventory_negbalance_str(self):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue