diff --git a/addons/dine360_qz_printer/static/src/js/qz_wrapper.js b/addons/dine360_qz_printer/static/src/js/qz_wrapper.js index a823a6d..d47416f 100644 --- a/addons/dine360_qz_printer/static/src/js/qz_wrapper.js +++ b/addons/dine360_qz_printer/static/src/js/qz_wrapper.js @@ -123,6 +123,14 @@ function buildEscPosReceipt(receiptElement, order) { patch(ReceiptScreen.prototype, { async printReceipt() { if (this.pos.config.use_qz_printer && this.pos.config.qz_printer_name) { + const rawPrintingEnabled = window.localStorage?.getItem("dine360_qz_raw_enabled") === "1"; + if (!rawPrintingEnabled) { + console.warn( + "QZ raw receipt printing is disabled. Set localStorage.dine360_qz_raw_enabled = '1' only while testing a raw ESC/POS printer queue." + ); + return super.printReceipt(...arguments); + } + try { if (!window.qz) { console.error("QZ Tray library not loaded.");