fix: multiply combo total price by quantity when calculating loyalty points to ensure accurate reward values
This commit is contained in:
parent
3b8a2d8f4b
commit
9bb9281dd6
@ -98,7 +98,7 @@ patch(PosOrder.prototype, {
|
|||||||
(sum, line) =>
|
(sum, line) =>
|
||||||
sum +
|
sum +
|
||||||
(line.combo_line_ids.length > 0
|
(line.combo_line_ids.length > 0
|
||||||
? line.comboTotalPriceWithoutTax
|
? line.comboTotalPriceWithoutTax * line.getQuantity()
|
||||||
: line.prices.total_excluded),
|
: line.prices.total_excluded),
|
||||||
0
|
0
|
||||||
);
|
);
|
||||||
@ -143,7 +143,7 @@ patch(PosOrder.prototype, {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const priceToUse = rule.money_reward_point_mode === "before_tax"
|
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);
|
: (line.combo_line_ids.length > 0 ? line.comboTotalPrice : line.prices.total_included);
|
||||||
orderedProductPaid += priceToUse;
|
orderedProductPaid += priceToUse;
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user