{
  "id": "bd4b79e3-3e08-4bd7-a0f6-ef4a2e9c5bee",
  "entity": "Wren Quay Joinery Ltd",
  "revision": 1,
  "createdAt": "2026-11-18T11:16:12.999Z",
  "documents": [
    {
      "name": "orchard-41.txt",
      "format": "txt",
      "role": "pds",
      "sha256": "9f44d8e8fc07f204b9dff70824b19b2bb7a77308121df3999b8b372a5fd03ec3",
      "pages": [
        {
          "number": 1,
          "lines": [
            "Fictional example for the CIS Clear trial",
            "Payment and deduction statement",
            "Subcontractor: Wren Quay Joinery Ltd",
            "Contractor: Orchard Wharf Build Ltd",
            "Statement reference: OW-41",
            "Invoice reference: J-301",
            "Payment date: 06/10/2026",
            "Tax month ending: 05/11/2026",
            "Gross amount: 1200.00",
            "Materials: 100.00",
            "VAT: 0.00",
            "CIS deduction: 220.00",
            "Net payment: 980.00"
          ]
        }
      ],
      "pdfPages": 0,
      "clientIdentityChecked": true,
      "id": "file-1"
    },
    {
      "name": "larch-87.txt",
      "format": "txt",
      "role": "pds",
      "sha256": "ce43b0909ef8eb2294f7c281b0d4b8e4eb042412af593d03b36c118ad04a4811",
      "pages": [
        {
          "number": 1,
          "lines": [
            "Fictional example for the CIS Clear trial",
            "Payment and deduction statement",
            "Subcontractor: Wren Quay Joinery Ltd",
            "Contractor: Larch Works Ltd",
            "Statement reference: LW-87",
            "Invoice reference: J-302",
            "Payment date: 05/11/2026",
            "Tax month ending: 05/11/2026",
            "Gross amount: 800.00",
            "Materials: 50.00",
            "VAT: 160.00",
            "CIS deduction: 150.00",
            "Transfer including VAT: 810.00"
          ]
        }
      ],
      "pdfPages": 0,
      "clientIdentityChecked": true,
      "id": "file-2"
    },
    {
      "name": "bank.csv",
      "format": "csv",
      "role": "ledger",
      "sha256": "26012a45e50e330d267e706958372e8daca29e957b2ddbf99cc91e0ad6c03857",
      "pages": [
        {
          "number": 1,
          "lines": [
            "entity,reference,date,kind,amount",
            "Wren Quay Joinery Ltd,J-301,06/10/2026,receipt,980.00",
            "Wren Quay Joinery Ltd,J-302,05/11/2026,receipt,785.00"
          ]
        }
      ],
      "pdfPages": 0,
      "clientIdentityChecked": true,
      "id": "file-3"
    }
  ],
  "records": [
    {
      "id": "record-1",
      "documentId": "file-1",
      "role": "pds",
      "raw": {
        "entity": "Wren Quay Joinery Ltd",
        "contractor": "Orchard Wharf Build Ltd",
        "reference": "OW-41",
        "payment_date": "06/10/2026",
        "period_end": "05/11/2026",
        "gross": "1200.00",
        "materials": "100.00",
        "vat": "0.00",
        "deduction": "220.00",
        "net": "980.00",
        "payment_status": "",
        "invoice_reference": "J-301"
      },
      "original": {
        "entity": "Wren Quay Joinery Ltd",
        "contractor": "Orchard Wharf Build Ltd",
        "reference": "OW-41",
        "payment_date": "06/10/2026",
        "period_end": "05/11/2026",
        "gross": "1200.00",
        "materials": "100.00",
        "vat": "0.00",
        "deduction": "220.00",
        "net": "980.00",
        "payment_status": "",
        "invoice_reference": "J-301"
      },
      "evidence": {
        "entity": [
          {
            "page": 1,
            "line": 3,
            "endLine": 3,
            "column": null,
            "text": "Subcontractor: Wren Quay Joinery Ltd"
          }
        ],
        "contractor": [
          {
            "page": 1,
            "line": 4,
            "endLine": 4,
            "column": null,
            "text": "Contractor: Orchard Wharf Build Ltd"
          }
        ],
        "reference": [
          {
            "page": 1,
            "line": 5,
            "endLine": 5,
            "column": null,
            "text": "Statement reference: OW-41"
          }
        ],
        "invoice_reference": [
          {
            "page": 1,
            "line": 6,
            "endLine": 6,
            "column": null,
            "text": "Invoice reference: J-301"
          }
        ],
        "payment_date": [
          {
            "page": 1,
            "line": 7,
            "endLine": 7,
            "column": null,
            "text": "Payment date: 06/10/2026"
          }
        ],
        "period_end": [
          {
            "page": 1,
            "line": 8,
            "endLine": 8,
            "column": null,
            "text": "Tax month ending: 05/11/2026"
          }
        ],
        "gross": [
          {
            "page": 1,
            "line": 9,
            "endLine": 9,
            "column": null,
            "text": "Gross amount: 1200.00"
          }
        ],
        "materials": [
          {
            "page": 1,
            "line": 10,
            "endLine": 10,
            "column": null,
            "text": "Materials: 100.00"
          }
        ],
        "vat": [
          {
            "page": 1,
            "line": 11,
            "endLine": 11,
            "column": null,
            "text": "VAT: 0.00"
          }
        ],
        "deduction": [
          {
            "page": 1,
            "line": 12,
            "endLine": 12,
            "column": null,
            "text": "CIS deduction: 220.00"
          }
        ],
        "net": [
          {
            "page": 1,
            "line": 13,
            "endLine": 13,
            "column": null,
            "text": "Net payment: 980.00"
          }
        ]
      },
      "conflicts": {},
      "editedFields": [],
      "reviewStatus": "unreviewed",
      "audit": [],
      "parseStatus": "parsed",
      "values": {
        "entity": "Wren Quay Joinery Ltd",
        "contractor": "Orchard Wharf Build Ltd",
        "reference": "OW-41",
        "payment_date": "06/10/2026",
        "period_end": "05/11/2026",
        "gross": 120000,
        "materials": 10000,
        "vat": 0,
        "deduction": 22000,
        "net": 98000,
        "payment_status": "",
        "invoice_reference": "J-301"
      },
      "issues": [],
      "warnings": [],
      "month": {
        "key": "2026-11-05",
        "start": "06/10/2026",
        "end": "05/11/2026"
      },
      "status": "parsed",
      "included": true,
      "comparisons": {
        "invoice": {
          "state": "not_in_supplied_ledger",
          "recordIds": [],
          "differencePence": null,
          "crossMonth": false
        },
        "receipt": {
          "state": "amount_matches_candidate",
          "recordIds": [
            "record-3"
          ],
          "differencePence": 0,
          "crossMonth": false
        }
      }
    },
    {
      "id": "record-2",
      "documentId": "file-2",
      "role": "pds",
      "raw": {
        "entity": "Wren Quay Joinery Ltd",
        "contractor": "Larch Works Ltd",
        "reference": "LW-87",
        "payment_date": "05/11/2026",
        "period_end": "05/11/2026",
        "gross": "800.00",
        "materials": "50.00",
        "vat": "160.00",
        "deduction": "150.00",
        "net": "810.00",
        "payment_status": "",
        "invoice_reference": "J-302"
      },
      "original": {
        "entity": "Wren Quay Joinery Ltd",
        "contractor": "Larch Works Ltd",
        "reference": "LW-87",
        "payment_date": "05/11/2026",
        "period_end": "05/11/2026",
        "gross": "800.00",
        "materials": "50.00",
        "vat": "160.00",
        "deduction": "150.00",
        "net": "810.00",
        "payment_status": "",
        "invoice_reference": "J-302"
      },
      "evidence": {
        "entity": [
          {
            "page": 1,
            "line": 3,
            "endLine": 3,
            "column": null,
            "text": "Subcontractor: Wren Quay Joinery Ltd"
          }
        ],
        "contractor": [
          {
            "page": 1,
            "line": 4,
            "endLine": 4,
            "column": null,
            "text": "Contractor: Larch Works Ltd"
          }
        ],
        "reference": [
          {
            "page": 1,
            "line": 5,
            "endLine": 5,
            "column": null,
            "text": "Statement reference: LW-87"
          }
        ],
        "invoice_reference": [
          {
            "page": 1,
            "line": 6,
            "endLine": 6,
            "column": null,
            "text": "Invoice reference: J-302"
          }
        ],
        "payment_date": [
          {
            "page": 1,
            "line": 7,
            "endLine": 7,
            "column": null,
            "text": "Payment date: 05/11/2026"
          }
        ],
        "period_end": [
          {
            "page": 1,
            "line": 8,
            "endLine": 8,
            "column": null,
            "text": "Tax month ending: 05/11/2026"
          }
        ],
        "gross": [
          {
            "page": 1,
            "line": 9,
            "endLine": 9,
            "column": null,
            "text": "Gross amount: 800.00"
          }
        ],
        "materials": [
          {
            "page": 1,
            "line": 10,
            "endLine": 10,
            "column": null,
            "text": "Materials: 50.00"
          }
        ],
        "vat": [
          {
            "page": 1,
            "line": 11,
            "endLine": 11,
            "column": null,
            "text": "VAT: 160.00"
          }
        ],
        "deduction": [
          {
            "page": 1,
            "line": 12,
            "endLine": 12,
            "column": null,
            "text": "CIS deduction: 150.00"
          }
        ],
        "net": [
          {
            "page": 1,
            "line": 13,
            "endLine": 13,
            "column": null,
            "text": "Transfer including VAT: 810.00"
          }
        ]
      },
      "conflicts": {},
      "editedFields": [],
      "reviewStatus": "unreviewed",
      "audit": [],
      "parseStatus": "parsed",
      "values": {
        "entity": "Wren Quay Joinery Ltd",
        "contractor": "Larch Works Ltd",
        "reference": "LW-87",
        "payment_date": "05/11/2026",
        "period_end": "05/11/2026",
        "gross": 80000,
        "materials": 5000,
        "vat": 16000,
        "deduction": 15000,
        "net": 81000,
        "payment_status": "",
        "invoice_reference": "J-302"
      },
      "issues": [],
      "warnings": [
        "Recorded gross minus deduction differs from recorded net. Check the source basis, including VAT; no amount was inferred."
      ],
      "month": {
        "key": "2026-11-05",
        "start": "06/10/2026",
        "end": "05/11/2026"
      },
      "status": "parsed",
      "included": true,
      "comparisons": {
        "invoice": {
          "state": "not_in_supplied_ledger",
          "recordIds": [],
          "differencePence": null,
          "crossMonth": false
        },
        "receipt": {
          "state": "amount_difference",
          "recordIds": [
            "record-4"
          ],
          "differencePence": 2500,
          "crossMonth": false
        }
      }
    },
    {
      "id": "record-3",
      "documentId": "file-3",
      "role": "ledger",
      "raw": {
        "entity": "Wren Quay Joinery Ltd",
        "reference": "J-301",
        "date": "06/10/2026",
        "kind": "receipt",
        "amount": "980.00"
      },
      "original": {
        "entity": "Wren Quay Joinery Ltd",
        "reference": "J-301",
        "date": "06/10/2026",
        "kind": "receipt",
        "amount": "980.00"
      },
      "evidence": {
        "entity": [
          {
            "page": 1,
            "line": 2,
            "endLine": 2,
            "column": "entity",
            "text": "Wren Quay Joinery Ltd"
          }
        ],
        "reference": [
          {
            "page": 1,
            "line": 2,
            "endLine": 2,
            "column": "reference",
            "text": "J-301"
          }
        ],
        "date": [
          {
            "page": 1,
            "line": 2,
            "endLine": 2,
            "column": "date",
            "text": "06/10/2026"
          }
        ],
        "kind": [
          {
            "page": 1,
            "line": 2,
            "endLine": 2,
            "column": "kind",
            "text": "receipt"
          }
        ],
        "amount": [
          {
            "page": 1,
            "line": 2,
            "endLine": 2,
            "column": "amount",
            "text": "980.00"
          }
        ]
      },
      "conflicts": {},
      "editedFields": [],
      "reviewStatus": "unreviewed",
      "audit": [],
      "parseStatus": "parsed",
      "values": {
        "entity": "Wren Quay Joinery Ltd",
        "reference": "J-301",
        "date": "06/10/2026",
        "kind": "receipt",
        "amount": 98000
      },
      "issues": [],
      "warnings": [],
      "month": {
        "key": "2026-11-05",
        "start": "06/10/2026",
        "end": "05/11/2026"
      },
      "status": "parsed",
      "included": true,
      "statementCandidates": [
        "record-1"
      ]
    },
    {
      "id": "record-4",
      "documentId": "file-3",
      "role": "ledger",
      "raw": {
        "entity": "Wren Quay Joinery Ltd",
        "reference": "J-302",
        "date": "05/11/2026",
        "kind": "receipt",
        "amount": "785.00"
      },
      "original": {
        "entity": "Wren Quay Joinery Ltd",
        "reference": "J-302",
        "date": "05/11/2026",
        "kind": "receipt",
        "amount": "785.00"
      },
      "evidence": {
        "entity": [
          {
            "page": 1,
            "line": 3,
            "endLine": 3,
            "column": "entity",
            "text": "Wren Quay Joinery Ltd"
          }
        ],
        "reference": [
          {
            "page": 1,
            "line": 3,
            "endLine": 3,
            "column": "reference",
            "text": "J-302"
          }
        ],
        "date": [
          {
            "page": 1,
            "line": 3,
            "endLine": 3,
            "column": "date",
            "text": "05/11/2026"
          }
        ],
        "kind": [
          {
            "page": 1,
            "line": 3,
            "endLine": 3,
            "column": "kind",
            "text": "receipt"
          }
        ],
        "amount": [
          {
            "page": 1,
            "line": 3,
            "endLine": 3,
            "column": "amount",
            "text": "785.00"
          }
        ]
      },
      "conflicts": {},
      "editedFields": [],
      "reviewStatus": "unreviewed",
      "audit": [],
      "parseStatus": "parsed",
      "values": {
        "entity": "Wren Quay Joinery Ltd",
        "reference": "J-302",
        "date": "05/11/2026",
        "kind": "receipt",
        "amount": 78500
      },
      "issues": [],
      "warnings": [],
      "month": {
        "key": "2026-11-05",
        "start": "06/10/2026",
        "end": "05/11/2026"
      },
      "status": "parsed",
      "included": true,
      "statementCandidates": [
        "record-2"
      ]
    }
  ],
  "months": [
    {
      "key": "2026-11-05",
      "start": "06/10/2026",
      "end": "05/11/2026",
      "pdsCount": 2,
      "invoiceCount": 0,
      "receiptCount": 2,
      "grossPence": 200000,
      "deductionPence": 37000,
      "netPence": 179000,
      "invoicePence": null,
      "receiptPence": 176500,
      "excludedCount": 0,
      "netLessReceiptsPence": 2500,
      "grossLessInvoicesPence": null,
      "reviewItemCount": 4,
      "checkedReceiptPence": 98000
    }
  ],
  "reviewItems": [
    {
      "id": "record-1:invoice_not_in_supplied_ledger",
      "recordId": "record-1",
      "code": "invoice_not_in_supplied_ledger",
      "message": "No invoice candidate in the supplied ledger; this does not mean unpaid.",
      "relatedRecordIds": [],
      "monthKeys": [
        "2026-11-05"
      ],
      "differencePence": null
    },
    {
      "id": "record-2:arithmetic_difference",
      "recordId": "record-2",
      "code": "arithmetic_difference",
      "message": "Recorded gross minus deduction differs from recorded net. Check the source basis, including VAT; no amount was inferred.",
      "relatedRecordIds": [],
      "monthKeys": [
        "2026-11-05"
      ],
      "differencePence": null
    },
    {
      "id": "record-2:invoice_not_in_supplied_ledger",
      "recordId": "record-2",
      "code": "invoice_not_in_supplied_ledger",
      "message": "No invoice candidate in the supplied ledger; this does not mean unpaid.",
      "relatedRecordIds": [],
      "monthKeys": [
        "2026-11-05"
      ],
      "differencePence": null
    },
    {
      "id": "record-2:receipt_amount_difference",
      "recordId": "record-2",
      "code": "receipt_amount_difference",
      "message": "Recorded net differs from the supplied receipt; check both sources.",
      "relatedRecordIds": [
        "record-4"
      ],
      "monthKeys": [
        "2026-11-05"
      ],
      "differencePence": 2500
    }
  ],
  "excludedCount": 0,
  "unassignedMonthCount": 0,
  "notice": "Document comparison only. Amount matches are candidates, not proof of payment or tax treatment. Missing rows mean absent from this upload, not unpaid. Monthly totals use each record’s own date; missing totals are blank, not zero. All amounts GBP.",
  "jobStatus": "ready",
  "updatedAt": "2026-11-18T11:16:13.044Z",
  "storage": "local_disk",
  "files": [
    {
      "name": "orchard-41.txt",
      "role": "pds",
      "format": "txt",
      "sha256": "9f44d8e8fc07f204b9dff70824b19b2bb7a77308121df3999b8b372a5fd03ec3",
      "bytes": 345
    },
    {
      "name": "larch-87.txt",
      "role": "pds",
      "format": "txt",
      "sha256": "ce43b0909ef8eb2294f7c281b0d4b8e4eb042412af593d03b36c118ad04a4811",
      "bytes": 348
    },
    {
      "name": "bank.csv",
      "role": "ledger",
      "format": "csv",
      "sha256": "26012a45e50e330d267e706958372e8daca29e957b2ddbf99cc91e0ad6c03857",
      "bytes": 142
    }
  ],
  "attempts": [
    {
      "number": 1,
      "status": "ready",
      "startedAt": "2026-11-18T11:16:13.001Z",
      "finishedAt": "2026-11-18T11:16:13.044Z",
      "parserVersion": "cis-local-rules-6",
      "error": null,
      "files": [
        {
          "position": 0,
          "status": "parsed",
          "recordCount": 1,
          "message": ""
        },
        {
          "position": 1,
          "status": "parsed",
          "recordCount": 1,
          "message": ""
        },
        {
          "position": 2,
          "status": "parsed",
          "recordCount": 2,
          "message": ""
        }
      ]
    }
  ],
  "error": null,
  "origin": "upload",
  "originalFilesAvailable": true,
  "progress": {
    "total": 3,
    "completed": 3,
    "files": [
      {
        "position": 0,
        "name": "orchard-41.txt",
        "role": "pds",
        "status": "parsed",
        "recordCount": 1,
        "message": ""
      },
      {
        "position": 1,
        "name": "larch-87.txt",
        "role": "pds",
        "status": "parsed",
        "recordCount": 1,
        "message": ""
      },
      {
        "position": 2,
        "name": "bank.csv",
        "role": "ledger",
        "status": "parsed",
        "recordCount": 2,
        "message": ""
      }
    ]
  }
}