SalesTaxSummary
Taxable, exempt and collected by jurisdiction; the liability tied to the GL.
npx shadcn add @lopifi/sales-tax-summaryExamples
The same component, case by case. Each stage is the shipped code with the props it shows; switch to Code for the usage.
How it behaves
What it renders, what it refuses to render, and why. The same paragraphs as the family spec, so the two can’t disagree.
By jurisdiction: gross sales, exempt, taxable, rate, tax collected, tax due, and the return's state (open | filed | paid). Totals sit under single and double rules over the figure columns only.
The tie-out is the point. The unpaid liability on the returns (every row not yet paid) is compared to the sales-tax-payable balance in the GL, and the difference is on screen. Three renders: ties, differs (an alert, with the signed difference), and not tied out. A null GL balance never compares against zero; the component states that no tie-out was performed.
Each row proves itself. Gross less exempt must equal taxable. A row that doesn't gets a glyph in the taxable cell and is named in an alert above the table. A gap between collected and due is printed under the jurisdiction as "Collected $31.80 less than due". Over- and under-collection are both findings, in opposite directions.
Refuses to render: a computed average rate. A row blending several rates passes rate: null and prints "Blended". Mixed currencies are never summed either: one currency prop governs every row.
Edge cases: a 0-decimal currency (the amounts follow the currency's exponent through Money). Every row paid, so the unpaid liability is zero and ties to a zero GL balance. A jurisdiction exempt in full.
Accessibility: a real <table> with a caption naming the period and currency, row headers per jurisdiction, and the frozen header and first column from .ledger-frozen (CSS only, so the component stays server-safe).
The accounting it encodes
The concepts this component renders, each defined once in the lexicon.
More in Tax & compliance
See also
Where this component is specified, defined and running.
Elsewhere in the system
The live section SalesTaxSummary renders in, the calculators behind its figures, and the ledger payloads that feed it.
- SalesTaxSummary, runningThe compliance showcase — live, with theme, density, grayscale and reduced-motion switches.
- Tax & complianceControlTestResult sits beside them and speaks their idiom. Every component in this family takes an explicit asOf. "Today" is never the client clock, so a server render, a printed copy and a screenshot agree on what is late. Shared types live in src/ledger/lib/compliance.types.ts; the tax-ID checks l
Components are copied into your repository and meant to be edited. Rounding policy, fiscal calendar and compliance copy differ per company.
Release notes
Get an email when Tax & compliance changes
Your copy doesn’t update itself when we fix something here.
- One email when a Tax & compliance component needs a migration
- Nothing when nothing changes
Or install it now
npx shadcn add @lopifi/sales-tax-summary