Files
apskel-pos-backend/internal/validator
efrilmandClaude Opus 5.5 a6d5a8b056 feat(wallet): customer wallet and manual adjustments in the dashboard
Adds the dashboard side of a customer's wallet (docs/prd-point-coin.md F7,
PC-107), under /marketing for admins and managers:

- GET /marketing/customers/:id/wallet returns the customer, the ledger and
  spendable balances, every lot that still holds something (flagged when
  expired), and a page of history. Unlike the customer's own view, each row
  carries the real names behind it: the transfer counterparty, the admin or
  cashier, and the outlet, plus the reason and metadata.
- POST /marketing/customers/:id/wallet/adjust takes a signed amount and a
  required reason. It writes an ADJUSTMENT pointing at the admin through the
  wallet engine, refuses to take more than the customer can spend, and
  accepts an optional idempotency key so a retried request adjusts once.
  Reasons describing a cash-out are refused (K7).

The customer must belong to the caller's organization; otherwise both
endpoints answer 404. Positive adjustments create non-expiring lots until
the expiry model is decided (F12, note N4).

The mapping from ledger rows to what the apps show is now shared between the
customer and dashboard views.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 09:36:18 +07:00
..
2026-08-13 14:38:28 +07:00
2025-09-18 01:32:01 +07:00
2026-05-10 10:57:38 +07:00
2025-08-03 23:55:51 +07:00
fix
2026-05-13 22:30:55 +07:00
2026-08-11 22:41:10 +07:00
2026-08-11 22:41:10 +07:00
2025-09-17 23:55:11 +07:00
2025-07-30 23:18:20 +07:00
2026-05-10 10:42:09 +07:00
2026-06-19 13:31:33 +07:00
2025-08-03 00:34:25 +07:00