Keysproperty operations Corbelstone Residential

#354 · Invoice without ticket

done Mon 08:00 · invoice 4787

Ledger row
policy v2
The call
PUT /invoices/4787/hold
Action, tier
hold_invoice, tier 0
Decided by
rules: No matching job (no job number); hold it out of the payment run.
Controller
Allowed: hold_invoice is tier 0 (just do it); within budget (1 of 40 back-office actions this minute).
authority
conditions
cooldown
budget
Definition
invoice_without_ticket v2
At stake
402 would go out in the next payment run (EUR 402)
Outcome
Invoice 4787 held; the vendor is asked for the job number.
Undo
Release the hold.

Undo

Restores the before-snapshot below and writes a new row.

Evidence

{
  "amount": 402.29,
  "amount_at_risk": 402.29,
  "building_id": 99,
  "currency": "EUR",
  "invoice_id": 4787,
  "reason": "no job number",
  "reference": "Works as agreed",
  "referenced_ticket_exists": false,
  "referenced_ticket_id": null,
  "referenced_ticket_vendor_id": null,
  "stake_note": "402 would go out in the next payment run",
  "started_at": "2026-11-02T07:22:33.291254",
  "status": "received",
  "trade": "locksmith",
  "vendor": "Kuiper & Sons Access Services",
  "vendor_id": 145
}

Before and after

{
  "after": {
    "messages": [
      {
        "body": "Your invoice 'Works as agreed' does not match a job we sent you. Please reply with the ticket number; the invoice is on hold until then.",
        "created_at": "2026-11-02T08:00:00",
        "id": 49,
        "kind": "vendor_request",
        "status": "outbox",
        "subject": "Invoice 4787: job number needed",
        "to_id": "145",
        "to_name": "Kuiper & Sons Access Services",
        "to_type": "vendor"
      }
    ],
    "vendor_invoices": [
      {
        "held_at": "2026-11-02T08:00:00",
        "id": 4787,
        "paid_at": null,
        "status": "held"
      }
    ]
  },
  "before": {
    "vendor_invoices": [
      {
        "held_at": null,
        "id": 4787,
        "paid_at": null,
        "status": "received"
      }
    ]
  },
  "endpoint": "PUT /invoices/4787/hold",
  "note": "Invoice 4787 held; the vendor is asked for the job number.",
  "ok": true,
  "rollback_fn_name": "undo_hold_invoice"
}

Arguments

{
  "invoice_id": 4787
}