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
@@ -317,6 +317,11 @@ export const en: Catalog = {
issueEntryTitle: "Issue an entry ticket & open the barrier (physical button broken)",
issueEntryConfirm: "A vehicle is at the entry. Issue an entry ticket and open the barrier?",
issueEntryOk: "Entry ticket {{ticket}} issued.",
forgiveExit: "Forgive & open exit",
forgiveExitTitle: "Open the exit barrier for a car with NO ticket — no money, signed and flagged",
forgiveExitPrompt: "Reason for opening the exit with no ticket (optional — OK to leave empty):",
forgiveExitOk: "Exit opened — forgiven, no payment.",
forgiveExitNotOpened: "Recorded, but the barrier did not open: {{reason}}",
exitedGrace: "exited · grace",
exitedGraceLeft: "exited · {{time}}",
exitedGraceTitle: "Paid and exited — barrier not confirmed; waiting out the grace period.",
@@ -419,6 +424,8 @@ export const en: Catalog = {
"exit.open.failed": "Exit recorded, but the barrier did not open — open manually",
"exit.freeGrace": "Free entry-grace (no charge)",
"exit.manualOpen": "Manual barrier open (human intervention)",
"exit.forgiven": "Forgiven exit by {{operator}} — fee of {{forgone}} {{currency}} waived: {{note}}",
"exit.forgiven.noSession": "Forgiven exit by {{operator}} — no ticket / no session: {{note}}",
"exit.plateSwapSuspected": "Possible ticket swap — plate {{plate}} is already inside under ticket {{otherIdentity}}",
"exit.plateSwapOverride": "Operator {{operator}} released a suspected ticket-swap exit (plate {{plate}}, also open under {{otherIdentity}})",
"sub.refused.notFound": "Subscription refused — not found",
@@ -991,6 +998,7 @@ export const en: Catalog = {
srcSubscriptions: "Subscriptions:",
srcOnTicket: "{{module}} (on ticket):",
srcSubWindow: "out-of-window",
srcForgone: "Forgiven exits ({{count}}):",
drawerSection: "— Drawer —",
openingFloat: "Opening cash:",
cashTaken: "Daily takings:",
@@ -1039,6 +1047,7 @@ export const en: Catalog = {
srcTickets: "Tickets",
srcSubscriptions: "Subscriptions",
srcSubWindow: "out-of-window",
srcForgone: "Forgiven exits ({{count}})",
expectedDrawer: "Expected drawer",
filterFrom: "From",
filterTo: "To",
@@ -1246,6 +1255,14 @@ export const en: Catalog = {
confirmCancelTicket: "Confirm cancellation",
cancelling: "cancelling…",
ticketCancelled: "Ticket cancelled.",
forgiveExit: "Forgive & open",
forgiveTitle: "Forgive this exit",
forgiveHint: "Lets the car out with NO payment. The fee owed ({{amount}}) is recorded as forgone on your shift report — never as cash. A reason is optional; nothing is printed.",
forgiveReasonPlaceholder: "Reason for forgiving (optional)…",
confirmForgive: "Confirm — open exit, no payment",
forgiving: "opening…",
exitForgiven: "Exit forgiven — {{amount}} waived, barrier opened.",
exitForgivenNotOpened: "Exit forgiven — {{amount}} waived, but the barrier did not open: {{reason}}",
noSnapshots: "no snapshots",
loadingSnapshots: "loading snapshots…",
snapEntry: "entry",
+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…",