feat: include all loyalty programs in points calculation even if no points are awarded

This commit is contained in:
Suherdy Yacob 2026-05-26 12:04:50 +07:00
parent c71acbf7cb
commit c7388700aa

View File

@ -47,5 +47,15 @@ patch(PosOrder.prototype, {
} }
return true; 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;
} }
}); });