# Invoice Ledger block

> Billing operator workspace with invoice ledger and past due recovery

Review the billing position and recover overdue invoices. Pairs a statement summary card and past due alert with a filterable invoice ledger. Uses ReUI Alert, Badge, DataGrid, Filters; shadcn Card, Button. For accounts receivable and billing pages.

- Type: Pro block
- Category: [Billing](https://web.dev.reui.io/blocks/solutions/billing.md)
- Page: https://web.dev.reui.io/blocks/solutions/billing/solution-billing-1
- MCP: `get_block("solution-billing-1")`
- Built with: Alert, Alert Dialog, Avatar, Badge, Button, Card, Data Grid, Dropdown Menu, Filters, Item, Progress, Scroll Area, Select, Separator, Sheet, Skeleton, Timeline, Tooltip
- Installs with a ReUI Pro or Ultimate license; setup: https://web.dev.reui.io/docs/license-setup

## Best for

A statement card and a past due alert whose button filters the invoice ledger, plus bulk collector reminders and a void confirm

## Agent notes

- Replace `INVOICE_RECORDS` in data.tsx; `getBillingStatement` and `getPastDueSummary` derive the statement card and alert totals from it
- `handleSendReminder`, `handleStartRecovery` and `handleExport` only show a toast, so no reminder, recovery run or export file exists
- `handleVoidInvoice` and `handleApplySelected` change status and owner in local `invoices` state only, so persist the void and the collector

## When not to use

- A single customer's account page with tabbed invoices, subscription and payment methods: use [Billing Account Detail](https://web.dev.reui.io/blocks/solutions/billing/solution-billing-4.md) (`get_block("solution-billing-4")`)
- A signed in customer's own billing settings with plan, usage and invoice history: use [Billing Settings](https://web.dev.reui.io/blocks/application/profile/profile-8.md) (`get_block("profile-8")`)

## Third-party libraries

- TanStack Table v9: [API reference](https://tanstack.com/table/v9/docs/framework/react/reference/index), [docs](https://tanstack.com/table/v9/docs/framework/react/quick-start)
- Sonner v2: [API reference](https://sonner.emilkowal.ski/toast), [docs](https://sonner.emilkowal.ski/getting-started)

## Install

```bash
npx shadcn@latest add @reui/solution-billing-1
```

## About Billing blocks

### When to use

- A back office for billing operators: the invoice ledger, subscriptions, a dunning queue and metered usage
- Plan and discount admin: editing the plan catalog and coupon rules, or moving a subscription to a new tier
- One customer's billing account seen by staff, or an invoice built line by line and then sent

### When not to use

- A public page where visitors compare plan tiers and pick one before signing up: use the [Pricing blocks](https://web.dev.reui.io/blocks/marketing/pricing.md)
- A signed in customer's own settings page showing their plan, usage and invoices: use the [Profile blocks](https://web.dev.reui.io/blocks/application/profile.md)
- A stepped intake flow with no money in it, such as vendor onboarding or team invites: use the [Wizard blocks](https://web.dev.reui.io/blocks/application/wizard.md)

### Agent notes

- Each block sets a `min-h-svh` wrapper with `bg-background`, padding and a max width in page.tsx or its root component; drop it inside an app shell
- No block calls an API: sends, retries, saves and exports update `useState` or fire a sonner `toast`; post to your billing backend from those handlers

Every ReUI item has a twin like this one; the index is https://web.dev.reui.io/llms.txt. Agents with the ReUI MCP (https://web.dev.reui.io/docs/mcp) get the same guidance from the getters named above.
