From a4a2f936f4bc1dea2c2d3c733ce0af43ed3f5f77 Mon Sep 17 00:00:00 2001 From: Suherdy Yacob Date: Fri, 29 May 2026 11:10:22 +0700 Subject: [PATCH] feat: add customer/kitchen note support and conditionally disable footer for basic receipts --- static/src/js/escpos_generator.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/static/src/js/escpos_generator.js b/static/src/js/escpos_generator.js index c0eaf86..ef8f433 100755 --- a/static/src/js/escpos_generator.js +++ b/static/src/js/escpos_generator.js @@ -260,6 +260,14 @@ export class EscPosGenerator { itemLine = totalStr.padStart(W); } cmds.push(...this.addLine(itemLine)); + + // Line 3 (optional): customer note / kitchen note + if (line.note) { + const noteText = `* ${line.note}`; + cmds.push(...this.addLine( + noteText.length > W ? noteText.substring(0, W - 1) + '.' : noteText + )); + } }); cmds.push(...this.addLine(this.divider())); } @@ -305,7 +313,8 @@ export class EscPosGenerator { } // ── Footer ──────────────────────────────────────────────────────── - if (receiptData.footerData) { + // Skip footer on basic receipt (table checker) — matches pos_custom_receipt behaviour + if (!receiptData.isBasicReceipt && receiptData.footerData) { const f = receiptData.footerData; if (f.message) { cmds.push(...this.addLine(f.message, { align: 'center' }));