Keysproperty operations Corbelstone Residential

#386 · Invoice without ticket

done Mon 12:00 · invoice 5731

Ledger row
policy v2
The call
PUT /invoices/5731/hold
Action, tier
hold_invoice, tier 0
Decided by
rules: No matching job (job belongs to another vendor); 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
508 would go out in the next payment run (EUR 508)
Outcome
Invoice 5731 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": 508.36,
  "amount_at_risk": 508.36,
  "building_id": 116,
  "currency": "EUR",
  "invoice_id": 5731,
  "reason": "job belongs to another vendor",
  "reference": "Job 834",
  "referenced_ticket_exists": true,
  "referenced_ticket_id": 834,
  "referenced_ticket_vendor_id": 130,
  "stake_note": "508 would go out in the next payment run",
  "started_at": "2026-11-02T11:17:27.184046",
  "status": "received",
  "trade": "general",
  "vendor": "Valley Maintenance",
  "vendor_id": 213
}

Before and after

{
  "after": {
    "messages": [
      {
        "body": "Your invoice 'Job 834' 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-02T12:00:00",
        "id": 70,
        "kind": "vendor_request",
        "status": "outbox",
        "subject": "Invoice 5731: job number needed",
        "to_id": "213",
        "to_name": "Valley Maintenance",
        "to_type": "vendor"
      }
    ],
    "vendor_invoices": [
      {
        "held_at": "2026-11-02T12:00:00",
        "id": 5731,
        "paid_at": null,
        "status": "held"
      }
    ]
  },
  "before": {
    "vendor_invoices": [
      {
        "held_at": null,
        "id": 5731,
        "paid_at": null,
        "status": "received"
      }
    ]
  },
  "endpoint": "PUT /invoices/5731/hold",
  "note": "Invoice 5731 held; the vendor is asked for the job number.",
  "ok": true,
  "rollback_fn_name": "undo_hold_invoice"
}

Arguments

{
  "invoice_id": 5731
}