From fa2f72cf6170c17657feae871b4386fc8ca67e11 Mon Sep 17 00:00:00 2001 From: Suherdy Yacob Date: Wed, 3 Jun 2026 15:20:00 +0700 Subject: [PATCH] feat: add internal and customer notes to receipt data and consolidate multi-line note extraction logic --- static/src/js/pos_receipt_printer.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/static/src/js/pos_receipt_printer.js b/static/src/js/pos_receipt_printer.js index 00ebfd0..ea925b6 100755 --- a/static/src/js/pos_receipt_printer.js +++ b/static/src/js/pos_receipt_printer.js @@ -1018,7 +1018,9 @@ patch(PosPrinterService.prototype, { date: getText('#order-date') || getText('.pos-receipt-date') || new Date().toLocaleString(), cashier: formatFirstLastName(getText('.cashier') || getText('.pos-receipt-cashier') || ''), customer: getText('.pos-receipt-customer') || getText('.customer') || null, - tableName: tableName + tableName: tableName, + internalNote: getText('.order-internal-note')?.replace(/^Order Note:\s*/i, '') || '', + customerNote: getText('.order-customer-note')?.replace(/^Customer Note:\s*/i, '') || '' }; // Parse order lines @@ -1082,8 +1084,8 @@ patch(PosPrinterService.prototype, { const qty = parseNumber(qtyText); // Extract customer note/kitchen note from this line element - const noteEl = line.querySelector('.customer-note, .note, li.note, li.customer-note'); - let note = noteEl ? noteEl.textContent.trim() : ''; + const noteElements = line.querySelectorAll('.customer-note, .internal-note, .note, li.note, li.customer-note, li.internal-note'); + let note = Array.from(noteElements).map(el => el.textContent.trim()).filter(Boolean).join(' | '); if (isComboSubLine && lastParentLine) { // This is a combo subline, add it to the last parent line!