Files
apskel-pos-backend/internal/service
efrilmandClaude Opus 5.5 4d63673a25 feat(loyalty): give new balances their expiry
Every lot now gets its expiry when it is created (docs/prd-point-coin.md
F12, PC-502), where it used to never expire until note N4 was settled:

- EARN and an ADJUSTMENT that adds: ComputeExpiry of the organization's
  settings for that currency, from the moment received.
- EXCHANGE_IN: the sooner of the EnakCoin lot's expiry and when EnakPoint
  received now expire (F4).
- PAYMENT_REFUND: the expiry of the lot the EnakPoint came from, but at
  least seven days from the refund (N4, decided). A lot that never expired
  stays so.
- TRANSFER_IN: unchanged, exactly the sender's expiry.

Turning expiry on for a currency for the first time dates every lot of the
organization that still holds something and has no expiry, MIGRATION lots
included, in the same transaction as the setting: a full period from now
when ROLLING, the second fixed date on or after today when FIXED_DATE, so
no customer loses a balance soon after the rule is announced (N4,
decided). Turning it off leaves dated lots as they are. PUT
/marketing/loyalty-settings reports these as expiry_activations (currency,
lots, amount, expires_at); a dry run counts them without dating anything.

The earning processor now also reads the organization settings, and the
wallet admin processor takes the settings reader.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 13:29:25 +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