LedgerLoom Chapter 13 — Payroll as a multi-line event

This chapter shows how to take a payroll register export (a CSV from a payroll provider) and translate it into deterministic multi-line journal entries.

What you build

  • A tiny import pipeline for payroll_register.csv

  • A deterministic pay-run-to-entry generator that posts:

    • Gross wages to expense

    • Employee withholdings to payroll liabilities (control accounts)

    • Employer payroll taxes to expense + liabilities

    • Net pay as a payable that is then paid in cash

  • Statutory remittances (pay the withholdings + employer contributions)

  • A control reconciliation:

    payroll register totals G/L control account balances

How to run

make ll-ch13

Artifacts

The Chapter 13 runner writes outputs/ledgerloom/ch13 containing:

  • payroll_register.csv — the sample input register (CSV)

  • payroll_runs_summary.csv — pay-run totals (gross, deductions, net, employer taxes)

  • payroll_remittances.csv — remittance schedule and payments posted in-period

  • postings_payroll.csv — postings generated by payroll runs, payments, and remittances

  • payroll_control_reconciliation.csv — subledger vs G/L reconciliation for key balances

  • Standard LedgerLoom artifacts: postings, trial balance, statements, invariants, manifest

Notes and limitations

This is a teaching implementation:

  • The numbers are illustrative (not jurisdiction-accurate tax logic)

  • No accrual across periods (the demo posts each pay run on its pay date)

  • Remittances are modeled as a single cash payment that clears liabilities

The point is to show a clean, testable pipeline from payroll exports to ledger postings and control checks.