Use casesMoney

Invoice matching and reconciliation

Ecko has a real decimal type with 19.99m literals. Financial matching in a float language is a latent bug.

The problem

Three-way match compares PO, receipt, and invoice lines. Amounts look equal until 0.1 + 0.2 != 0.3 shows up on a ten-million-row ledger and the ERP will not post.

Teams bolt on Decimal libraries in Python or use integers in cents, but JSON from OCR and LLM extraction still arrives as floats unless something enforces decimal at the boundary.

Why Ecko

Decimal literals
Write 19.99m and arithmetic stays exact. No string parsing step, no "multiply by 100 and hope" convention scattered through the codebase.
Typed line items
Extract invoice rows into structs with decimal fields. A model that returns 19.9900001 fails validation instead of silently reconciling.
The money package
ISO 4217 minor units, allocation that never loses a cent, and currency-safe operations when you outgrow bare decimals.

In practice

match.ecko
type Line = { sku: str, qty: int, unit_price: decimal }

fn total(lines: list(Line)) -> decimal {
  mut sum = 0m
  for ln in lines { sum = sum + ln.unit_price * decimal(ln.qty) }
  sum
}

Try it on your workload.