Files
apskel-pos-backend/internal/transformer
efrilmandClaude Opus 5.5 fc97c78300 feat(loyalty): show what an order earned on the order and receipt
Adds points_earned and coins_earned to the order response
(docs/prd-point-coin.md F3, PC-205). The POS prints the receipt from this
response, so the receipt gets them too.

The values are the sums of the order's EARN rows, read in one query for a
list of orders. They are filled for create, add items, update, detail and
list, and are 0 for an order that earned nothing. UpdateOrder earns before
building its response, so a payment completed there already shows the
earning. A failure to read them is logged and leaves them at 0 rather than
failing the order read. The self-order session listing reads orders
directly from the repository and still shows 0.

The two order hooks are merged into one OrderLoyalty interface (paid,
refunded, earned by orders) with a single SetLoyalty.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 10:50:37 +07:00
..
2026-08-11 22:41:10 +07:00
2026-08-13 14:38:28 +07:00
2026-08-05 19:28:38 +07:00
2025-07-18 20:10:29 +07:00
2025-09-18 00:37:46 +07:00
2026-08-13 14:38:28 +07:00
2025-07-18 20:10:29 +07:00
2025-09-18 12:01:20 +07:00
2025-08-13 21:02:26 +07:00
2026-05-10 10:57:38 +07:00
2025-07-18 20:10:29 +07:00
2025-08-07 22:45:02 +07:00
2025-08-03 00:34:25 +07:00
2025-07-18 20:10:29 +07:00
2026-05-10 10:42:09 +07:00
2025-07-30 23:18:20 +07:00