fix(pos): expose onclick-bound functions on window so buttons actually work

This commit is contained in:
Dave 2026-09-03 18:24:37 +02:00
parent 064145e5b7
commit 095a3433fa

View file

@ -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;
})();
</script>
<script>if("serviceWorker" in navigator){navigator.serviceWorker.register("sw.js").catch(function(){});}</script>