Keysproperty operations Corbelstone Residential

#256 · Invoice without ticket

done Thu 11:00 · invoice 4636

Ledger row
policy v2
The call
PUT /invoices/4636/hold
Action, tier
hold_invoice, tier 0
Decided by
rules: No matching job (job number does not exist); hold it out of the payment run.
Controller
Allowed: hold_invoice is tier 0 (just do it); within budget (0 of 40 back-office actions this minute).
authority
conditions
cooldown
budget
Definition
invoice_without_ticket v2
At stake
495 would go out in the next payment run (EUR 495)
Outcome
Invoice 4636 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": 495.13,
  "amount_at_risk": 495.13,
  "building_id": 75,
  "currency": "EUR",
  "invoice_id": 4636,
  "reason": "job number does not exist",
  "reference": "T-14491",
  "referenced_ticket_exists": false,
  "referenced_ticket_id": 14491,
  "referenced_ticket_vendor_id": null,
  "stake_note": "495 would go out in the next payment run",
  "started_at": "2026-10-29T10:15:23.221745",
  "status": "approved",
  "trade": "cleaning",
  "vendor": "Venneman Facility Cleaning",
  "vendor_id": 272
}

Before and after

{
  "after": {
    "messages": [
      {
        "body": "Your invoice 'T-14491' does not match a job we sent you. Please reply with the ticket number; the invoice is on hold until then.",
        "created_at": "2026-10-29T11:00:00",
        "id": 42,
        "kind": "vendor_request",
        "status": "outbox",
        "subject": "Invoice 4636: job number needed",
        "to_id": "272",
        "to_name": "Venneman Facility Cleaning",
        "to_type": "vendor"
      }
    ],
    "vendor_invoices": [
      {
        "held_at": "2026-10-29T11:00:00",
        "id": 4636,
        "paid_at": null,
        "status": "held"
      }
    ]
  },
  "before": {
    "vendor_invoices": [
      {
        "held_at": null,
        "id": 4636,
        "paid_at": null,
        "status": "approved"
      }
    ]
  },
  "endpoint": "PUT /invoices/4636/hold",
  "note": "Invoice 4636 held; the vendor is asked for the job number.",
  "ok": true,
  "rollback_fn_name": "undo_hold_invoice"
}

Arguments

{
  "invoice_id": 4636
}