fix: initialize loyalty program result map to prevent undefined access during order processing

This commit is contained in:
Suherdy Yacob 2026-05-26 12:04:00 +07:00
parent ca97bab9c4
commit 25ef115aa4

View File

@ -72,6 +72,9 @@ patch(PosOrder.prototype, {
} }
} }
const result = {}; const result = {};
for (const program of this.models["loyalty.program"].getAll()) {
result[program.id] = [];
}
for (const program of programs) { for (const program of programs) {
let points = 0; let points = 0;
const splitPoints = []; const splitPoints = [];