forked from alaguraj/odoo-testing-addons
Add receipt feed before QZ cutter
This commit is contained in:
parent
3e705e36a2
commit
8fc4ae447a
@ -1,6 +1,6 @@
|
||||
{
|
||||
'name': 'Dine360 QZ Tray Printer',
|
||||
'version': '17.0.1.1',
|
||||
'version': '17.0.1.2',
|
||||
'category': 'Point of Sale',
|
||||
'summary': 'Integrate Odoo POS with Star/Epson Printers via QZ Tray.',
|
||||
'depends': ['point_of_sale'],
|
||||
|
||||
@ -9,6 +9,7 @@ const GS = 0x1d;
|
||||
const CR = 0x0d;
|
||||
const LF = 0x0a;
|
||||
const DEFAULT_COLUMNS = 42;
|
||||
const END_FEED_LINES = 8;
|
||||
|
||||
function columnsFromConfig(config) {
|
||||
const value = Number.parseInt(config?.qz_paper_width || DEFAULT_COLUMNS, 10);
|
||||
@ -341,12 +342,14 @@ async function buildEscPosReceipt(order, pos) {
|
||||
builder.line("THANK YOU");
|
||||
builder.bold(false);
|
||||
builder.line("Please visit again");
|
||||
builder.line("");
|
||||
builder.line("Powered by Dine360");
|
||||
builder.align("left");
|
||||
builder.feed(5);
|
||||
builder.feed(END_FEED_LINES);
|
||||
if (config.qz_enable_cutter !== false) {
|
||||
builder.cut(config.qz_cut_mode || "partial");
|
||||
}
|
||||
builder.feed(1);
|
||||
return bytesToBase64(builder.bytes);
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user