Skip to content

Open Cashdrawer at the beginning of printing #29

@pc-coholic

Description

@pc-coholic

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...

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions