Disable QZ raw printing by default

This commit is contained in:
metatroncubeswdev 2026-04-24 21:35:25 -04:00
parent 0333967c90
commit 1cccf85702

View File

@ -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.");