From c7388700aaeabc10d7b387a877fe84322572ce37 Mon Sep 17 00:00:00 2001 From: Suherdy Yacob Date: Tue, 26 May 2026 12:04:50 +0700 Subject: [PATCH] feat: include all loyalty programs in points calculation even if no points are awarded --- static/src/app/models/pos_order_patch.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/static/src/app/models/pos_order_patch.js b/static/src/app/models/pos_order_patch.js index c8960a8..78efed9 100644 --- a/static/src/app/models/pos_order_patch.js +++ b/static/src/app/models/pos_order_patch.js @@ -47,5 +47,15 @@ patch(PosOrder.prototype, { } return true; }); + }, + + pointsForPrograms(programs) { + const result = super.pointsForPrograms(...arguments); + for (const program of this.models["loyalty.program"].getAll()) { + if (!(program.id in result)) { + result[program.id] = []; + } + } + return result; } });