# Cleanup reconciliation

Source: [input.md](../input.md), **Brief and rules** and **CSV export**. Outputs: [cleaned.csv](cleaned.csv) and [exceptions.csv](exceptions.csv).

## Rows and preservation

- Input: 14 data rows. Output: 14 data rows in the original order. No rows were removed, merged or added.
- Every original field was preserved, including date and amount strings, name whitespace, original cost-center case, blank currency and identifiers with leading zeros. `source_row` traces each record.
- The cleaned file adds normalized name, cost center, date and amount fields, duplicate/conflict flags and scoped-total eligibility. A read-back comparison verified all original field values and row order.
- CSV preserves ID characters but does not carry spreadsheet column types. Import `expense_id` as text to retain leading zeros.

## Changes applied

- Row 1: normalized person ` Riley Chen ` to `Riley Chen`; normalized USD amount `1,250.00` to `1250.00`.
- Row 2: normalized cost center `ops` to `OPS`.
- Row 11: normalized USD refund `(45.00)` to `-45.00`.
- ISO dates were retained in normalized date fields. Row 9's `03/04/2026` stays unchanged in the original field; normalized date is blank because its locale is unknown.
- Plain numeric amounts, including EUR rows 3 and 12 and row 10's `95.00`, were copied into normalized numeric fields. Row 10's currency remains blank and it is excluded from totals. Rows 13 and 14 have blank normalized amounts; originals `TBC` and `1.234,50` were preserved.
- Rows 5 and 6 were retained. Row 6 is flagged as an exact duplicate of row 5. Rows 7 and 8 are separately flagged as conflicting records for expense ID `001006`.

## Scoped totals

Only one first occurrence of a fully clear record is eligible. These are scoped sums, not a final accounting total. No currency conversion was applied.

| Currency | Included source rows | Values included | Scoped total |
| --- | --- | --- | ---: |
| USD | 1, 2, 4, 5, 11 | 1250.00 + 85.50 + 19.99 + 65.00 − 45.00 | 1375.49 |
| EUR | 3, 12 | 240.00 + 180.00 | 420.00 |

Seven rows are included and seven excluded. No combined-currency total is reported.

| Excluded source row(s) | Expense ID | Reason / decision needed |
| --- | --- | --- |
| 6 | 001005 | Second exact duplicate of row 5. Retained; exclusion follows the brief and requires no new decision. |
| 7, 8 | 001006 | Conflicting USD amounts, 120.00 and 140.00. Confirm the valid amount or explain the records/identifiers; neither was chosen. |
| 9 | 001007 | Ambiguous date locale. Confirm date/locale; known USD amount 49.00 remains excluded because the record requires a decision. |
| 10 | 001008 | Missing currency. Confirm currency; numeric amount 95.00 is not assigned to any currency total. |
| 13 | 001011 | `TBC` amount. Supply the confirmed invoice amount; no zero substituted. |
| 14 | 001012 | Unknown locale for `1.234,50`. Confirm locale and value; no numeric value inferred. |

## Exceptions and remaining limits

The exception file contains seven entries covering seven source rows: 6, 7, 8, 9, 10, 13 and 14. Each entry includes source row, expense ID, issue, treatment and decision needed.

All requested files were created. Conflicting amounts, the ambiguous date, missing currency, pending invoice amount and ambiguous amount locale remain unresolved. Inputs were preserved; no payment, live-system write or external sending occurred. Source accuracy and final accounting totals cannot be established from this pack alone.
