Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open Cashdrawer at the beginning of printing #29

Open
pc-coholic opened this issue May 27, 2022 · 0 comments
Open

Open Cashdrawer at the beginning of printing #29

pc-coholic opened this issue May 27, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@pc-coholic
Copy link
Member

fun render(): ByteArray {
out.clear()
init()
characterCodeTable(CharacterCodeTable.WPC1252.codeTable)
internationalCharacterSet(InternationalCharacterSet.Germany.country)
val layout = receipt.getJSONArray("__layout")
for (i in 0..(layout.length() - 1)) {
val layoutLine = layout.getJSONObject(i)
renderline(layoutLine)
}
if (receipt.optBoolean("feedAfter", true)) {
newline(4)
}
if (receipt.optBoolean("cutAfter", true)) {
cut()
}
if (receipt.optBoolean("drawerAfter", true)) {
opencashdrawer(Cashdrawer.Drawer1.number, 50, 500)
opencashdrawer(Cashdrawer.Drawer2.number, 50, 500)
}
return out.toByteArray()
}

Unpopular (?) opinion: The cashdrawer should open before the receipt has finished printing to speed up the exchange of money... That way, the cashier can already make change, etc...

But I do also see that making sure the receipt printed first before allowing cash-transactions could make sense/might be prefered...

Alternative: Add drawerBefore in addition and add (yet another) option to pretixPOS to chose the one or the other...

@pc-coholic pc-coholic added the enhancement New feature or request label May 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant