{
  "format": "vercy-enterprise-profile-fixtures/v1",
  "profileName": "Enterprise Invoice-Payment Allocation",
  "cases": [
    {
      "id": "cross-currency",
      "kind": "positive",
      "input": "One final USD payment allocates to two EUR documents using a pinned rate.",
      "expect": "Settlement, document allocations, rate source, FX and rounding differences remain distinct; one document may close while the other retains a disputed residual."
    },
    {
      "id": "multiple-payments",
      "kind": "positive",
      "input": "Several final payments allocate to one invoice.",
      "expect": "Residual derives from the complete accepted-allocation set and correction chain at the requested instant."
    },
    {
      "id": "one-to-many",
      "kind": "positive",
      "input": "One payment allocates to several invoices.",
      "expect": "Each tuple is separately sequenced and source-side conservation applies across all accepted allocations."
    },
    {
      "id": "on-account-cash",
      "kind": "positive",
      "input": "A final payment arrives without an accepted document allocation.",
      "expect": "The payment remains with an explicit unallocated residual and no invoice credit is inferred."
    },
    {
      "id": "factoring",
      "kind": "positive",
      "input": "The payee is a factor and differs from the seller that issued the document.",
      "expect": "Allocation keys payment and document identities and preserves party roles without requiring payee equals seller."
    },
    {
      "id": "recovery",
      "kind": "positive",
      "input": "Funds are recovered after payment finality.",
      "expect": "A new opposite-direction payment and signed counter-allocation preserve the original final payment."
    },
    {
      "id": "cancel-after-allocation",
      "kind": "positive",
      "input": "An issued document is cancelled after an accepted allocation exists.",
      "expect": "The correction chain recomputes residual; prior tuples remain; cancellation is not a payment reversal."
    },
    {
      "id": "voice-disagreement",
      "kind": "negative",
      "input": "Payer advice and payee cash application disagree and one silently overwrites the other.",
      "expect": "Validation rejects the overwrite and requires a reconciliation break."
    },
    {
      "id": "over-allocation",
      "kind": "negative",
      "input": "A settlement of 1000 fully closes two claims of 600 each.",
      "expect": "Source-side conservation rejects accepted allocation of 1200."
    },
    {
      "id": "absorbed-fx",
      "kind": "negative",
      "input": "FX and rounding differences are folded into document allocation or residual.",
      "expect": "Validation rejects conflated money facts."
    },
    {
      "id": "charge-equals-discharge",
      "kind": "negative",
      "input": "A charge-bearer deduction is treated automatically as discharged obligation amount.",
      "expect": "Validation rejects the inference without an explicit basis or exception."
    },
    {
      "id": "reconciliation-proves-delivery",
      "kind": "negative",
      "input": "A cash-application or bank match is treated as evidence that goods were delivered.",
      "expect": "The inference is rejected."
    },
    {
      "id": "three-way-conflation",
      "kind": "negative",
      "input": "Invoice/order/receipt matching is merged with payment/statement reconciliation.",
      "expect": "Validation rejects the namespace and evidence conflation."
    },
    {
      "id": "writable-closure",
      "kind": "negative",
      "input": "An implementation persists closure as authoritative payment or document state.",
      "expect": "Validation rejects the write; closure is recomputed as a read-side projection."
    },
    {
      "id": "return-revives-residual",
      "kind": "positive",
      "input": "A post-finality return occurs after a document had derived zero residual.",
      "expect": "A new opposite payment and counter-allocation revive the as-of residual without editing the document or original payment."
    },
    {
      "id": "voice-break-no-acceptance",
      "kind": "negative",
      "input": "Payer and payee allocations disagree and the system derives an empty accepted set without a break.",
      "expect": "Validation requires an explicit unresolved break and forbids silent acceptance or rejection."
    },
    {
      "id": "credit-exceeds-allocations",
      "kind": "positive",
      "input": "A credit note reduces the admissible claim below accepted allocations.",
      "expect": "The derived negative residual surfaces an explicit payment-side surplus and governed refund path; prior tuples remain."
    },
    {
      "id": "multi-reason-short-pay",
      "kind": "positive",
      "input": "One short payment contains discount, credit and adjustment components.",
      "expect": "Separate coded signed basis entries sum to the documented deduction and remain outside allocation amount."
    },
    {
      "id": "unsigned-recovery",
      "kind": "negative",
      "input": "An opposite-direction recovery is validated using unsigned conservation.",
      "expect": "Validation rejects the directionless calculation."
    },
    {
      "id": "unproven-factor",
      "kind": "negative",
      "input": "A factor accepts allocation without an external assignment or collection-authority reference.",
      "expect": "Validation fails closed."
    }
  ],
  "candidateRevision": 3
}
