Added Barcode for cash payment. Barcode is '_cash_'.

This commit is contained in:
Stevko 2014-05-11 02:38:53 +02:00 committed by Petr Baudis
parent 65741c31f0
commit 6ed53b92aa
3 changed files with 18 additions and 3 deletions

View file

@ -29,6 +29,10 @@ class ShopAdapter(QtCore.QObject):
map["price"] = str(sell)
return map
def acct_cash_map(self, acct):
map = acct.__dict__.copy()
return map
def acct_map(self, acct):
if acct is None:
return None
@ -36,6 +40,8 @@ class ShopAdapter(QtCore.QObject):
return self.acct_debt_map(acct)
elif acct.acctype == "inventory":
return self.acct_inventory_map(acct)
elif acct.acctype == "cash":
return self.acct_cash_map(acct)
else:
return None