mirror of
https://github.com/brmlab/brmbar.git
synced 2025-06-07 12:54:05 +02:00
Management: Fix negative inventory balance
This commit is contained in:
parent
17ea4c72c6
commit
09d57550a3
2 changed files with 3 additions and 3 deletions
|
@ -89,7 +89,7 @@ class ShopAdapter(QtCore.QObject):
|
|||
return shop.profits.balance_str()
|
||||
@QtCore.Slot(result='QVariant')
|
||||
def balance_inventory(self):
|
||||
return shop.inventory_negbalance_str()
|
||||
return shop.inventory_balance_str()
|
||||
@QtCore.Slot(result='QVariant')
|
||||
def balance_credit(self):
|
||||
return shop.credit_negbalance_str()
|
||||
|
|
|
@ -120,8 +120,8 @@ class Shop:
|
|||
# statement that will... ugh, accounting is hard!
|
||||
balance += inv.currency.convert(inv.balance(), self.currency)
|
||||
return balance
|
||||
def inventory_negbalance_str(self):
|
||||
return self.currency.str(-self.inventory_balance())
|
||||
def inventory_balance_str(self):
|
||||
return self.currency.str(self.inventory_balance())
|
||||
|
||||
def account_list(self, acctype):
|
||||
accts = []
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue