forked from brmlab/brmbar-github
disable exchange rate and balance in StockMgmt because of unbearable slowdown
This commit is contained in:
parent
466b92e7c2
commit
1f3f1cdd8f
1 changed files with 9 additions and 1 deletions
|
@ -39,6 +39,14 @@ class ShopAdapter(QtCore.QObject):
|
|||
map["price"] = str(sell)
|
||||
return map
|
||||
|
||||
def acct_inventory_map2(self, acct):
|
||||
buy, sell = 666, 666
|
||||
map = acct.__dict__.copy()
|
||||
map["balance"] = "{:.0f}".format(666)
|
||||
map["buy_price"] = str(buy)
|
||||
map["price"] = str(sell)
|
||||
return map
|
||||
|
||||
def acct_cash_map(self, acct):
|
||||
map = acct.__dict__.copy()
|
||||
return map
|
||||
|
@ -164,7 +172,7 @@ class ShopAdapter(QtCore.QObject):
|
|||
|
||||
@QtCore.Slot('QVariant', result='QVariant')
|
||||
def itemList(self, query):
|
||||
alist = [ self.acct_inventory_map(a) for a in shop.account_list("inventory", like_str="%%"+query+"%%") ]
|
||||
alist = [ self.acct_inventory_map2(a) for a in shop.account_list("inventory", like_str="%%"+query+"%%") ]
|
||||
db.commit()
|
||||
return alist
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue