Spendex

Traffic Ledger

Client orders in, supplier payments out, profit split by order type — one book for the traffic business.

Loading…
Export CSV Backup JSON

Money in — client orders

What the client paid you for the order.
Date paidSiteClient / orderClient paidTypeNote
Total

Money out — supplier payments

What the traffic cost you, per client order. Type must match the order it pays for.
Date paidSiteClient / orderSupplier costTypeNote
Total

By month

MonthInOutProfitMy share

By site

SiteOrdersInOutProfitMargin

How this book works

Everything is computed from the two sheets above — there is nothing to reconcile by hand.

Order types

Personal — your own client. The whole profit on that order is yours.

Work — a job you split. You keep the share set in My cut on work orders (50% by default); the rest is the partner's.

The math

Profit = client paid − supplier cost, computed separately for each type.

My share = personal profit + work profit × my cut. A negative number means the supplier cost more than the client paid.

Matching cost to income

Rows are matched by type, not one-to-one, so a supplier payment made on a later date still lands in the same books. Use the same Site and Client / order text on both sheets and the By site panel will line them up. A site with income and no cost yet is tagged cost pending.

Saving

Every edit goes straight into your own D1 database on Cloudflare — the same data on every device that opens this link. Edits made with no connection are queued in the browser and sent as soon as it is back; the chip at the top shows exactly where things stand.

Period filter

The tiles, both sheets and By site all follow the selected period. By month always shows every month — click a row to jump to it. Rows always sit in date order; a new row slides into place once you set its date.

Getting the data out

Export CSV gives one flat file (both sheets, with a Kind column) for Excel or Google Sheets. Backup JSON is the exact contents of this book — Restore loads it back. A full SQL dump is one command away: npm run db:dump.

Restore from backup

Paste the contents of a traffic-ledger.json backup. This replaces everything currently in the book.

Spendex

Traffic Ledger

Enter the passphrase to open the book.