Files
apskel-pos-backend/internal/service
efrilmandClaude Opus 5.5 8bf1d5c1a8 feat(loyalty): trace a wallet row lot by lot in the dashboard
Adds GET /marketing/wallet-transactions/:id/trace (docs/prd-point-coin.md
F7, §8.1, PC-404).

From any ledger row of the organization, the trace lists the lots a debit
took from, with how much it took from each, or the lots a credit created.
Each lot is followed back through origin_lot_id, across transfers,
exchanges and refunds, to the lot an EARN, ADJUSTMENT or MIGRATION first
created. Every step shows the lot and the row that created it, with the
real name of the customer it belongs to, so the example of §8 (A sends 120
to B, B pays 30) leads from B's payment to A's order #ORD-1.

Lots are loaded a generation at a time, and a chain stops at 100 steps or
at a lot it has already seen, which only bad data could cause. A row of
another organization answers 404.

The dashboard's wallet view now builds its lots with the same helper.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 12:25:17 +07:00
..
2026-06-08 12:30:39 +07:00
2026-08-11 22:41:10 +07:00
2026-08-11 22:41:10 +07:00
2026-05-10 10:42:09 +07:00
2026-08-13 14:38:28 +07:00
2025-09-12 16:37:16 +07:00
2025-09-18 01:32:01 +07:00
2025-07-18 20:10:29 +07:00
2026-06-03 14:56:27 +07:00
2025-07-18 20:10:29 +07:00
2026-04-27 21:17:12 +07:00
2026-04-27 21:17:12 +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-08-07 22:45:02 +07:00
2025-07-18 20:10:29 +07:00
2026-06-08 12:30:39 +07:00
2025-07-18 20:10:29 +07:00
2026-08-11 22:41:10 +07:00
2025-08-10 20:41:34 +07:00
2025-09-17 23:55:11 +07:00
2025-08-03 23:55:51 +07:00
2025-08-03 23:55:51 +07:00
2026-05-10 10:42:09 +07:00
2025-07-30 23:18:20 +07:00
2025-08-08 00:32:05 +07:00
2025-09-12 01:12:11 +07:00