efrilm and Claude Opus 5.5
2eb590caab
feat(wallet): add wallet engine as the only way to change a balance
...
WalletProcessor writes the balance, the ledger row and the lots or
allocations together, which keeps SUM(ledger) = balance = SUM(lot
remaining) (docs/prd-point-coin.md §7.5, PC-104).
- Credit writes the ledger row and creates lots, each with its own expiry
and origin lot.
- Debit draws from the preferred lots first (a reversal's own lots, or the
lot being expired), then from unexpired lots in K9 order, and returns the
allocations with their expiry so CarryOver can give the receiving side of
a transfer or exchange the same expiry.
- DebitUpTo takes what the wallet has and reports the shortfall (F10, Q3).
- An idempotency key returns the first result; reusing it for a different
operation is an error.
- §8.1 is checked in code from one rule table, ahead of the database
constraints, so callers get a readable error.
Each method locks the wallet itself, after validating the input and before
checking the idempotency key, so correctness does not depend on the caller.
Operations on two wallets still call LockWallets first to keep lock order.
Unit tests run on an in-memory repository and check the §7.5 invariants
after every scenario; one more test runs the engine against Postgres when
TEST_DATABASE_URL is set.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com >
2026-09-30 08:47:37 +07:00
Efril
2c6864147b
feat: cash advance
2026-08-13 14:38:28 +07:00
efrilm
9ae5be2c33
feat(purchasae): added team with category parent and central
2026-08-11 21:00:39 +07:00
ryan
c3db919531
Update expense for product category (non-inventory type)
2026-06-10 12:42:53 +07:00
ryan
e09feff36d
Update purchase for product category (inventory type)
2026-06-09 15:59:34 +07:00
ryan
e7dd9660da
Merge remote-tracking branch 'origin' into feature/expense
...
# Conflicts:
# internal/router/router.go
2026-06-09 13:25:09 +07:00
ryan
69d8c8ce5e
Add category table
2026-06-08 12:29:59 +07:00
Efril
021ec152e9
feat: implement idempotency key for critical API endpoints
2026-06-04 00:49:45 +07:00
Efril
afa1aa5b75
Merge branch 'main' of https://gits.altru.id/apksel-dev/apskel-pos-backend
2026-06-03 22:02:14 +07:00
Efril
328336ea5a
fix log error and omset tracker scheduled
2026-06-03 22:01:58 +07:00
ryan
024d9ee637
Update profit-loss
2026-05-26 14:59:56 +07:00
ryan
da87d659df
Add expense CRUD
2026-05-25 14:59:40 +07:00
ryan
5f379faf17
change product list to retrieve its data from product outlets
2026-05-13 23:15:09 +07:00
ryan
4130cb66df
refactor and add outlet product table
2026-05-13 21:58:54 +07:00
ryan
d38a770ec5
Add omset milestone scheduler with owner role and revenue tracking
2026-05-13 09:48:17 +07:00
Efril
f73a5d533c
add notif at create order
2026-05-10 23:36:22 +07:00
ryan
2c34578a98
Merge remote-tracking branch 'origin/feature/notification' into self-order+notification
...
# Conflicts:
# go.mod
# go.sum
# internal/app/app.go
# internal/router/router.go
2026-05-10 12:23:16 +07:00
Efril
9d71b339b5
notification
2026-05-10 10:57:38 +07:00
Efril
bbd6666299
user devices
2026-05-10 10:42:09 +07:00
ryan
4cc563f6f1
Add self-order/orders/:sessionId
2026-05-09 00:12:00 +07:00
ryan
3c103b7692
Token and session implementation with Redis
2026-05-08 18:41:14 +07:00
ryan
2d6df8e4c6
Self Order - BE
2026-05-05 21:07:03 +07:00
Efril
a7022dd4c1
ingredient composition
2026-04-27 21:17:12 +07:00
Aditya Siregar
f85929c575
Add Refresh token
2025-09-20 17:17:00 +07:00
Aditya Siregar
a520d0ed11
fix campaign rules
2025-09-18 13:39:37 +07:00
Aditya Siregar
be92ec8b23
test wheels
2025-09-18 12:01:20 +07:00
Aditya Siregar
f64fec1fe2
campaign
2025-09-18 02:01:50 +07:00
Aditya Siregar
65f61b65cf
user auth register
2025-09-18 01:32:01 +07:00
Aditya Siregar
155016dec8
Add Campaign
2025-09-17 23:55:11 +07:00
Aditya Siregar
201e24041b
Add Tiers and Game Prize
2025-09-17 19:30:17 +07:00
Aditya Siregar
12ee54390f
Revert "voucher"
...
This reverts commit cfe690a40f .
2025-09-16 19:31:39 +07:00
Aditya Siregar
cfe690a40f
voucher
2025-09-13 15:37:26 +07:00
Aditya Siregar
4f6208e479
fix
2025-09-13 02:17:51 +07:00
Aditya Siregar
3a04990ec8
add product ingredients
2025-09-12 15:37:19 +07:00
Aditya Siregar
efe09c21e4
Add coa purchase and vendors
2025-09-12 01:12:11 +07:00
Aditya Siregar
13d8c75be7
add total out
2025-08-14 01:35:19 +07:00
Aditya Siregar
ccb0458189
Update payment
2025-08-13 23:14:26 +07:00
Aditya Siregar
b72ab4ef3d
Update product receipe
2025-08-10 21:46:44 +07:00
Aditya Siregar
5a42523f0f
Update
2025-08-10 20:41:34 +07:00
Aditya Siregar
fe4f17b34d
Add ingredieints
2025-08-08 00:22:28 +07:00
Aditya Siregar
93a3b29ae9
Fix Split Bill
2025-08-07 22:45:02 +07:00
Aditya Siregar
5741243425
Add Customer users
2025-08-03 23:55:51 +07:00
Aditya Siregar
96743cf50b
Update
2025-08-03 00:34:25 +07:00
Aditya Siregar
a759e0f57c
init
2025-07-30 23:18:20 +07:00
aditya.siregar
4f5950543e
init
2025-07-18 20:10:29 +07:00
aditya.siregar
3c80b710af
Update Infra
2025-03-04 20:36:17 +07:00
aditya.siregar
876b46b10c
enaklo pos backend
2024-12-20 16:52:48 +07:00
aditya.siregar
414c980c13
Toggle
2024-08-10 23:52:09 +07:00
aditya.siregar
67f1dbc850
init project
2024-05-28 14:14:55 +07:00