-
Notifications
You must be signed in to change notification settings - Fork 10
Open
Labels
enhancementNew feature or requestNew feature or request
Description
pretixprint-android/pretixprint/app/src/main/java/eu/pretix/pretixprint/print/ESCPOSRenderer.kt
Lines 96 to 121 in 47b73bb
| 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
Labels
enhancementNew feature or requestNew feature or request