From 0f725b94fa65e7b9978fe2a1b63fcafe7c0e7732 Mon Sep 17 00:00:00 2001 From: Suherdy Yacob Date: Sun, 31 May 2026 19:12:08 +0700 Subject: [PATCH] fix: update kitchen printer quantity mapping and standardize return format for print status results --- static/src/app/services/pos_store.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/static/src/app/services/pos_store.js b/static/src/app/services/pos_store.js index b2734c8..f0a2d30 100644 --- a/static/src/app/services/pos_store.js +++ b/static/src/app/services/pos_store.js @@ -32,7 +32,7 @@ patch(PosStore.prototype, { // Build the data object to send to backend const lines = changesData.map(c => ({ name: c.name, - qty: c.qty, + qty: c.quantity || c.qty || 1, note: c.note || '' })); @@ -56,16 +56,16 @@ patch(PosStore.prototype, { result.message || "Network printer error", { type: "danger" } ); - return false; + return { successful: false, message: { body: result.message || "Network printer error" } }; } - return true; + return { successful: true }; } catch (error) { console.error("Error printing to network printer", error); this.env.services.notification.add( "Error printing to network printer", { type: "danger" } ); - return false; + return { successful: false, message: { body: error.message || "Error printing to network printer" } }; } }