Credit-balance pen sets an absolute target (mint up / invalidate down)

FixSecurityService
Ya
30 Julai 2026, 15:50 UTC
Mwandishi
Kamo
Ahadi ya
11103d6

The Manage-Credits pen edit only ever LOWERED a balance: updateAllotment routed creditBalance to invalidateCreditsToTarget, which no-ops when target >= current. And on a member/product with no allotment row yet, save() POSTs to createAllotment, which ignored the numeric balance entirely. So edits only "worked" when reducing an existing allotment — the cause of "works for some members/vendors, not others." Add **************** reconcile the available balance to the entered value in BOTH directions — mint the shortfall (createCredits) when raising, invalidate the excess (invalidateCreditsToTarget, oldest-first) when lowering, no-op when equal. updateAllotment now uses it; createAllotment mints the starting balance for a fresh row. The pen is now the single add/remove control.

Mabadiliko yote

Je, unaona nini kuhusu usafiri?

Kila moja ya hizi updates ardhi katika nafasi yako ya kazi moja kwa moja. Kuanza bure na kuangalia kukua wiki baada ya wiki.

Kuwa Huru MileleMtazamo wa bei