fix: multiply combo total price by quantity when calculating loyalty points to ensure accurate reward values

This commit is contained in:
Suherdy Yacob 2026-06-05 13:29:10 +07:00
parent 3b8a2d8f4b
commit 9bb9281dd6

View File

@ -98,7 +98,7 @@ patch(PosOrder.prototype, {
(sum, line) =>
sum +
(line.combo_line_ids.length > 0
? line.comboTotalPriceWithoutTax
? line.comboTotalPriceWithoutTax * line.getQuantity()
: line.prices.total_excluded),
0
);
@ -143,7 +143,7 @@ patch(PosOrder.prototype, {
}
const priceToUse = rule.money_reward_point_mode === "before_tax"
? (line.combo_line_ids.length > 0 ? line.comboTotalPriceWithoutTax : line.prices.total_excluded)
? (line.combo_line_ids.length > 0 ? line.comboTotalPriceWithoutTax * line.getQuantity() : line.prices.total_excluded)
: (line.combo_line_ids.length > 0 ? line.comboTotalPrice : line.prices.total_included);
orderedProductPaid += priceToUse;