Sanjaay Gowda T S

← All runnable toolkits

RUNNABLE TOOLKIT · VERSION 1.0.0

Order and payment totals disagree?

Trace the difference to its source rows. A local Python and SQL reference workflow for Excel, SQL and MIS analysts reconciling order, line-item and payment CSV exports.

USD · one-time purchase · Automation category: $6.99. This category includes its guided skills and this separate toolkit ZIP. Any applicable tax is shown at checkout.

Python 3.10+ · Standard library only · Runs locally · No API key

CHECK THE FIT FIRST

For an analyst investigating CSV mismatches.

Use this starter when you can export separate orders, line items and payments, and want to inspect totals, duplicate revisions and rejected rows with source evidence.

The supplied sample is fictional. Run it unchanged first, then map your exports to the documented schema and review your own money and correction rules.

Inspect the required CSV headers
orders.csv
order_id,revision,order_date,customer,currency,order_total

line_items.csv
line_id,revision,order_id,description,quantity,unit_price

payments.csv
payment_id,revision,order_id,paid_date,amount,status

UTF-8 comma-separated files with these exact columns, in any order. Extra, missing or duplicate headers fail the run. The download includes the full validation and money rules.

What you need, and what you get

  • Python 3.10+ with the standard-library sqlite3 module; a terminal and three schema-matching CSV files.
  • A reconciliation CSV, source-lineage CSV, contribution CSV, JSON summary and readable Markdown report.
  • Local execution with no API key or third-party Python package. No Excel workbook or production database connector is included.
Check your CSV headers privately

Will the column names fit?

Choose an orders, line-item and payments CSV exported from your own system. This free preflight reads only the first CSV record, up to 64 KiB, on your device. Files are not uploaded, stored or modified. You can also use fictional files.

This checks exact header names only, in any column order. It does not run the paid Python workflow, inspect all data rows or establish that totals reconcile. UTF-8 comma-separated CSV; each file must be within the toolkit’s 20 MiB limit.

Enable JavaScript to check files locally. The required headers are listed above.

INSPECT BEFORE YOU BUY

Follow one mismatch from CSV input to source evidence.

All examples below use the shipped synthetic fixtures. They demonstrate operation and limitations, not customer outcomes.

81-second MIS walkthrough with US English narration and captions. A rendered walkthrough of an actual local run, using synthetic data; this is not a live terminal screen recording. Read the transcript.

01 / SUPPLIED INPUT

Start with a documented case

orders.csv + line_items.csv + payments.csv
ORD1009: stated total 60.00 USD
L1012 revision 1: quantity 1, unit price 60.00
L1012 revision 2: quantity "two", unit price 60.00

Illustration of rows from the supplied fictional exports. The newer line-item revision contains an invalid quantity.

02 / RUN LOCALLY

Use the included command

python scripts/run.py --input examples/input --output demo-report

Extract the toolkit ZIP and run from its folder. Use a new output directory. On Windows, py -3 can replace python; on macOS/Linux, use your Python 3 command.

04 / FOLLOW AN EXCEPTION

Keep the failure visible

The invalid newest L1012 revision blocks that line. The runner retains the earlier row as superseded instead of falling back to it. ORD1009 is flagged LINE_MISMATCH with a -6000-cent line delta and source lineage for investigation.

Read the complete synthetic sample report
# MIS reconciliation report

Orders reviewed: **9**. Matched: **4**. Mismatched: **5**. Rejected source rows: **5**.

Sources are CSV snapshots; these findings do not update a ledger or authorize transactions.

## Currency totals

| Currency | Stated total | Line total | Net payments | Line delta | Payment delta |
| --- | ---: | ---: | ---: | ---: | ---: |
| USD | 1245.48 | 1175.48 | 1099.98 | -70.00 | -145.50 |

## Order review queue

| Order | Status | Line delta | Payment delta | Source |
| --- | --- | ---: | ---: | --- |
| ORD1003 | LINE_AND_PAYMENT_MISMATCH | -10.00 USD | -10.00 USD | orders.csv:5 |
| ORD1004 | PAYMENT_MISMATCH | 0.00 USD | -40.00 USD | orders.csv:6 |
| ORD1005 | PAYMENT_MISMATCH | 0.00 USD | -20.00 USD | orders.csv:7 |
| ORD1007 | PAYMENT_MISMATCH | 0.00 USD | -75.50 USD | orders.csv:9 |
| ORD1009 | LINE_MISMATCH | -60.00 USD | 0.00 USD | orders.csv:11 |

## Rejected source rows

| Source | Entity | Reason |
| --- | --- | --- |
| orders.csv:12 | ORD_BAD | INVALID_ORDER_DATE: expected calendar date YYYY-MM-DD |
| line_items.csv:14 | L1012 | INVALID_QUANTITY: expected integer from 1 to 1000000 |
| line_items.csv:15 | L_ORPHAN | ORPHAN_ORDER: referenced order is absent, invalid or ambiguous |
| payments.csv:12 | P_DUP | DUPLICATE_ID_REVISION: ambiguous source rows; no deduplication guess |
| payments.csv:13 | P_DUP | DUPLICATE_ID_REVISION: ambiguous source rows; no deduplication guess |

## Interpretation

- Negative payment delta means net payments are below the stated order value.
- Refund events subtract from settlement; an order total is never silently revised.
- Missing lines are findings even when the stated order value is zero.
- Highest revisions must be valid and unambiguous; older versions are not fallback data.
- Line items and payments were independently aggregated before joining; currencies remain separate.
- 0 source rows had a half-up money rounding warning; inspect lineage.csv.
- Read lineage.csv for every raw row, rejected/superseded decision and normalized value.

WHAT ARRIVES IN YOUR DOWNLOAD

Code, practice data and checks.

  • Orders, lines and payments reconciled
  • Child tables aggregated before joining
  • Rejected and superseded rows stay traceable
  • Python source, documented input contract, regression tests and expected outputs
  • README quickstart and adoption guidance
  • Optional SKILL.md entry point; the Python runner works independently

Know the boundaries

This reference workflow uses Python and its standard-library sqlite3 module locally. It requires the documented CSV schema and two-decimal money policy. It does not include an Excel workbook or connect to your production database. Review rounding, corrections and business rules before adapting it to your own reporting process.

Standalone toolkit files are MIT licensed. The category’s premium guided runbooks have separate single-user terms. Ongoing consulting, hosted execution and model subscriptions are not included.

Setup and delivery help ↗

TRY IT HERE / FIXED SYNTHETIC EXERCISE

See where a total goes wrong.

Explore a two-order join example in this browser. Compare the inflated result, a grain-preserving repair and a timing exception. The supplied Python toolkit is a separate workflow with its own CSV schema; this illustration does not run it or import your files.

Enable JavaScript for the interactive steps. The initial fictional input is shown below.

Two orders total 200.00 USD.
Three line items total 200.00 USD.
Three payments total 200.00 USD.
Target grain: one row per order.

All amounts are in USD with a two-decimal convention. No customer data, model or server execution is used.

The walkthrough demonstrates arithmetic and reporting grain; it does not establish production readiness or an accounting conclusion. Inspect the read-only SQL repair pattern ↗

Pack and toolkit edition notes ↗

CHOOSE YOUR SCOPE

One category, or all three toolkits.

The Automation category is $6.99. The complete 108-skill collection is $19.99 and includes all 3 runnable toolkits as separate ZIPs. Individual $0.99 skills are guided instructional packs.