feat: add customer/kitchen note support and conditionally disable footer for basic receipts
This commit is contained in:
parent
8a33de6916
commit
a4a2f936f4
@ -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' }));
|
||||
|
||||
Loading…
Reference in New Issue
Block a user