forked from brmlab/brmbar-github
Added Barcode for cash payment. Barcode is '_cash_'.
This commit is contained in:
parent
65741c31f0
commit
6ed53b92aa
3 changed files with 18 additions and 3 deletions
|
@ -50,12 +50,18 @@ Item {
|
|||
status_text.setStatus("Unknown barcode", "#ff4444")
|
||||
return
|
||||
}
|
||||
if (acct.acctype !== "debt") {
|
||||
if (acct.acctype !== "debt" && acct.acctype !== "cash") {
|
||||
loadPageByAcct(acct)
|
||||
return
|
||||
}
|
||||
var balance = shop.sellItem(dbid, acct.id)
|
||||
status_text.setStatus("Sold! "+acct.name+"'s credit is "+balance+".", "#ffff7c")
|
||||
|
||||
if (acct.acctype == "cash") { //Copied from BarButton.onButtonClick
|
||||
shop.sellItemCash(dbid)
|
||||
status_text.setStatus("Sold! Put " + price + " Kč in the money box.", "#ffff7c")
|
||||
} else {
|
||||
var balance = shop.sellItem(dbid, acct.id)
|
||||
status_text.setStatus("Sold! "+acct.name+"'s credit is "+balance+".", "#ffff7c")
|
||||
}
|
||||
loadPage("MainPage")
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue