Files
apskel-pos-backend/internal/processor
efrilmandClaude Opus 5.5 d7138b8f87 feat(loyalty): refund EnakPoint payments as EnakPoint only
Adds refunds of EnakPoint payments (docs/prd-point-coin.md F9, K7, Q13,
PC-307).

After a void or refund, onOrderRefunded now returns EnakPoint before taking
earning back. For each EnakPoint payment of the order it returns everything
on a void, and floor(refunded rupiah / the frozen point_value) when the
payment itself was refunded, so a later change of the point value does not
change how many come back and a remainder below one EnakPoint is lost. It
never returns more than the payment used, and only what has not come back
yet, so repeating is safe. PAYMENT_REFUND rows point at the PAYMENT they
reverse, and the EnakPoint go back into lots with the expiry of the lots
they were taken from, longest-lasting first (the 7-day extension waits on
note N4).

RefundOrder, which hands money back in cash or another method, is now
limited to what was paid with other methods; the EnakPoint part has to be
refunded through its own payment. That answers 400.

Fixes earning reversal from PC-204: a refund of the EnakPoint part raised
orders.refund_amount and so took earning back, although that part never
earned. It is now left out of the refund the reversal uses.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 11:55:30 +07:00
..
Fix
2025-09-12 15:41:08 +07:00
2026-08-11 22:41:10 +07:00
2026-08-05 19:28:38 +07:00
2026-08-13 14:38:28 +07:00
2026-08-13 14:38:28 +07:00
2025-09-12 16:37:16 +07:00
2025-09-18 12:01:20 +07:00
2025-07-18 20:10:29 +07:00
2026-08-13 14:38:28 +07:00
2026-08-13 14:38:28 +07:00
2026-06-03 14:56:27 +07:00
2025-07-18 20:10:29 +07:00
2025-07-18 20:10:29 +07:00
2025-09-18 13:39:37 +07:00
2025-09-17 19:30:17 +07:00
2025-08-14 01:35:19 +07:00
2026-05-10 10:57:38 +07:00
2025-07-18 20:10:29 +07:00
2025-07-18 20:10:29 +07:00
2026-09-30 11:20:29 +07:00
2026-04-20 12:31:33 +07:00
2025-07-18 20:10:29 +07:00
2025-07-18 20:10:29 +07:00
2025-07-18 20:10:29 +07:00
2026-08-13 14:38:28 +07:00
2025-09-17 23:55:11 +07:00
2026-05-10 14:52:02 +07:00
2026-08-13 14:38:28 +07:00
2025-09-17 19:30:17 +07:00
2025-08-10 20:58:32 +07:00
2025-09-12 15:37:19 +07:00
2026-05-10 10:42:09 +07:00
2025-07-30 23:18:20 +07:00
2025-07-18 20:10:29 +07:00