From e80bce30fa08584d737a1afcf37f6135e967890e Mon Sep 17 00:00:00 2001 From: Suherdy Yacob Date: Tue, 2 Jun 2026 20:17:08 +0700 Subject: [PATCH] refactor: simplify receipt note processing by removing kitchen note parsing logic --- static/src/js/pos_receipt_printer.js | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) diff --git a/static/src/js/pos_receipt_printer.js b/static/src/js/pos_receipt_printer.js index 69d3af1..0725c9c 100755 --- a/static/src/js/pos_receipt_printer.js +++ b/static/src/js/pos_receipt_printer.js @@ -748,26 +748,7 @@ patch(PosPrinterService.prototype, { : (qty !== 0 ? lineTotal / qty : line.price_unit || 0); // Customer-facing note (always shown, even on basic receipt) - const customerNote = line.customer_note || ''; - - // Kitchen/internal note — stored as JSON string: [{text:"..."},…] - // pos_custom_receipt reads this as internalNote for display - let kitchenNote = ''; - if (line.note) { - try { - const tags = JSON.parse(line.note); - if (Array.isArray(tags)) { - kitchenNote = tags.map(t => t.text || '').filter(Boolean).join(', '); - } else { - kitchenNote = String(line.note); - } - } catch (_) { - kitchenNote = String(line.note); - } - } - - // Combine notes (customer note takes priority; show both if both exist) - const note = [customerNote, kitchenNote].filter(Boolean).join(' | '); + const note = line.customer_note || ''; // Find combo sub-lines linked to this line const comboSubLines = orderlines