feat(exit): forgiven exit — open the exit barrier with no payment (barrier:create)
Build & push images / images (push) Successful in 3m23s

The owner (or any role the owner grants barrier:create) lets a car out for free.
Exit side only. Every use is signed, attributed, photographed and on the operator's
Z-report; the shift's cash/card/drawer are untouched by construction.

- shared: resource 'barrier' + permission 'barrier:create'; reason codes
  exit.forgiven / exit.forgiven.noSession; LedgerPayload.forgoneMinor.
- pay-station: forgive() signs a $0 payment carrying the quoted fee as forgoneMinor
  (no tender), refuses a ticket with module charge lines (a wash is not forgiven).
- exit-flow: reopenBarrier(..., { forgiven }) bypasses the walk-back check and stamps
  the forgiven reason on the anomaly + vehicle_exit; forgiveExitNoSession() for a car
  with no ticket (anomaly under forgiven:<id> + exit snapshot + pulse). Relay driving
  shared in #pulseExit.
- route POST /api/barrier/forgive { identity?, note? }: barrier:create + open shift;
  the reason is optional (an empty note is signed as '(no reason given)').
- shift-service: forgoneTotalMinor + forgoneCount on the report/summary/signed
  shift_z_report (only when > 0), print line 'Dalje të falura (N)'.
- web: 'Forgive & open' in the pay/exit modal for an open transient that owes money;
  'Forgive & open exit' on the booth header for the no-ticket case; forgone line on
  the X-report, close confirm and history; en/sq. Prints nothing.
- tests: exit-flow, pay-station, shift-service, HTTP route (403 without the
  permission, 409 no shift, empty note accepted, ledger sequence, report figures).
- wiki: decisions/forgiven-exit.md (decision + as-built), booth-exit-flow, shift,
  index, log.
This commit is contained in:
2026-10-09 08:14:36 +02:00
parent 5d247a5729
commit a761398301
21 changed files with 710 additions and 26 deletions
+17
View File
@@ -319,6 +319,11 @@ export const sq = {
issueEntryTitle: "Lësho një biletë hyrjeje & hap barrierën (butoni fizik i prishur)",
issueEntryConfirm: "Një automjet është te hyrja. Të lëshohet një biletë hyrjeje dhe të hapet barriera?",
issueEntryOk: "Bileta e hyrjes {{ticket}} u lëshua.",
forgiveExit: "Fal & hap daljen",
forgiveExitTitle: "Hap barrierën e daljes për një automjet PA biletë — pa para, e nënshkruar dhe e shënuar",
forgiveExitPrompt: "Arsyeja e hapjes së daljes pa biletë (opsionale — mund të lihet bosh):",
forgiveExitOk: "Dalja u hap — e falur, pa pagesë.",
forgiveExitNotOpened: "U regjistrua, por barriera nuk u hap: {{reason}}",
exitedGrace: "doli · në afat",
exitedGraceLeft: "doli · {{time}}",
exitedGraceTitle: "Paguar dhe dalur — barriera nuk u konfirmua; po pret afatin kohor.",
@@ -422,6 +427,8 @@ export const sq = {
"exit.open.failed": "Dalja u regjistrua, por barriera nuk u hap — hape manualisht",
"exit.freeGrace": "Periudhë pa pagesë në hyrje (pa tarifë)",
"exit.manualOpen": "Hapje manuale e barrierës (ndërhyrje njerëzore)",
"exit.forgiven": "Dalje e falur nga {{operator}} — tarifa {{forgone}} {{currency}} u fal: {{note}}",
"exit.forgiven.noSession": "Dalje e falur nga {{operator}} — pa biletë / pa seancë: {{note}}",
"exit.plateSwapSuspected": "Mundësi ndërrimi biletash — targa {{plate}} është tashmë brenda me biletën {{otherIdentity}}",
"exit.plateSwapOverride": "Operatori {{operator}} lëshoi një dalje me dyshim ndërrimi biletash (targa {{plate}}, edhe e hapur me {{otherIdentity}})",
"sub.refused.notFound": "Abonimi u refuzua — nuk u gjet",
@@ -1004,6 +1011,7 @@ export const sq = {
srcSubscriptions: "Abonime:",
srcOnTicket: "{{module}} (në biletë):",
srcSubWindow: "jashtë orarit",
srcForgone: "Dalje të falura ({{count}}):",
drawerSection: "— Arka —",
openingFloat: "Arka fillestare:",
cashTaken: "Xhiro ditore:",
@@ -1052,6 +1060,7 @@ export const sq = {
srcTickets: "Bileta",
srcSubscriptions: "Abonime",
srcSubWindow: "jashtë orarit",
srcForgone: "Dalje të falura ({{count}})",
expectedDrawer: "Gjëndje arke",
// Filter (admin only).
filterFrom: "Nga",
@@ -1262,6 +1271,14 @@ export const sq = {
confirmCancelTicket: "Konfirmo anulimin",
cancelling: "duke anuluar…",
ticketCancelled: "Bileta u anulua.",
forgiveExit: "Fal & hap",
forgiveTitle: "Fal këtë dalje",
forgiveHint: "E lë automjetin të dalë PA pagesë. Shuma e detyruar ({{amount}}) regjistrohet si e falur në raportin e turnit — kurrë si para. Arsyeja është opsionale; nuk printohet asgjë.",
forgiveReasonPlaceholder: "Arsyeja e faljes (opsionale)…",
confirmForgive: "Konfirmo — hap daljen, pa pagesë",
forgiving: "duke hapur…",
exitForgiven: "Dalja u fal — {{amount}} u fal, barriera u hap.",
exitForgivenNotOpened: "Dalja u fal — {{amount}} u fal, por barriera nuk u hap: {{reason}}",
// snapshots
noSnapshots: "asnjë foto",
loadingSnapshots: "duke ngarkuar fotot…",