forked from brmlab/brmbar-github
gui: fine-grained logging
This commit is contained in:
parent
c3abceac5d
commit
829bab66b4
1 changed files with 2 additions and 0 deletions
|
@ -87,12 +87,14 @@ class ShopAdapter(QtCore.QObject):
|
|||
Therefore, we construct a map that we can pass around easily.
|
||||
We return None on unrecognized barcode. """
|
||||
barcode = str(barcode)
|
||||
logger.debug("barcodeInput: barcode='%s'", barcode)
|
||||
if barcode and barcode[0] == "$":
|
||||
credits = {'$02': 20, '$05': 50, '$10': 100, '$20': 200, '$50': 500, '$1k': 1000}
|
||||
credit = credits[barcode]
|
||||
if credit is None:
|
||||
return None
|
||||
return { "acctype": "recharge", "amount": str(credit)+".00" }
|
||||
logger.debug("barcodeInput: before load_by_barcode")
|
||||
acct = self.acct_map(brmbar.Account.load_by_barcode(db, barcode))
|
||||
db.commit()
|
||||
return acct
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue