feat: include all loyalty programs in points calculation even if no points are awarded
This commit is contained in:
parent
c71acbf7cb
commit
c7388700aa
@ -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;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user