From 095a3433fa77a6391176504f2bd121f766a23ebe Mon Sep 17 00:00:00 2001 From: Dave Date: Thu, 3 Sep 2026 18:24:37 +0200 Subject: [PATCH] fix(pos): expose onclick-bound functions on window so buttons actually work --- public/pos/receipt.html | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/public/pos/receipt.html b/public/pos/receipt.html index 412cae4..08b29ce 100644 --- a/public/pos/receipt.html +++ b/public/pos/receipt.html @@ -750,6 +750,16 @@ function paintPrinterSettings(){ paintPrinterSettings(); paintNet(); + +// Expose the onclick-bound functions on window — they're defined +// inside the IIFE above so they're not visible to inline `onclick` +// attributes (which evaluate against window). Without this the +// "Printer: ..." row, "Save printer settings" button, "Print slip" +// button, and "Print delivery note" button all silently do nothing. +window.togglePrinterSettings = togglePrinterSettings; +window.savePrinterSettings = savePrinterSettings; +window.printThermal = printThermal; +window.printDelivery = printDelivery; })();