From 228a84c867424ca3f9c4537e7cbee5cbb8fb0b32 Mon Sep 17 00:00:00 2001 From: Suherdy Yacob Date: Mon, 15 Jun 2026 22:32:25 +0700 Subject: [PATCH] fix: display tax-inclusive prices in POS loyalty reward lines for cashier consistency --- static/src/overrides/models/orderline.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/static/src/overrides/models/orderline.js b/static/src/overrides/models/orderline.js index c4ffc28..e50c8dc 100644 --- a/static/src/overrides/models/orderline.js +++ b/static/src/overrides/models/orderline.js @@ -60,16 +60,21 @@ patch(PosOrderline.prototype, { line => line.reward_group_id === this.reward_group_id ); + // Display uses priceIncl (tax-inclusive) so cashier sees the full + // discount amount (e.g. Rp 20,000) instead of the pre-tax amount + // (e.g. Rp 18,181.82). The actual journal entry still uses the + // pre-tax price_unit computed in loyalty.js — this is display only. let totalDisplayPrice = 0; for (const line of groupLines) { - totalDisplayPrice += line.priceExcl; + totalDisplayPrice += line.priceIncl; } return formatCurrency(totalDisplayPrice, this.currency.id); } if (this.is_reward_line) { - return formatCurrency(this.priceExcl, this.currency.id); + // Same rationale: show tax-inclusive amount to cashier. + return formatCurrency(this.priceIncl, this.currency.id); } return super.currencyDisplayPrice; },