@get-asset/react
Balance Sheet Report
Styled hierarchical balance sheet table grouped into Assets, Liabilities and Equity, taken at a specific point in time. Without an asOf it reports on the last day of the range selected on AssetProvider. Subtotal rows render bold; nested ledger rows are indented by depth. The download button in the card header exports the same point-in-time view as an XLSX file.
Built on the headless BalanceSheetReport compound from @get-asset/sdk.
Preview
Loading preview…
Required scopes
The access token used by AssetProvider must include these scopes for this primitive to fetch data successfully:
report:readbusiness:read
API reference
Root props
| Prop | Type | Default | Description |
|---|---|---|---|
asOf | Date | string | — | The point-in-time the report is taken at. Accepts a Date or any ISO-8601 string, and pins the card to that instant. Omit it to take the report at the end of the range selected on the provider. |
records | ReportLine[] | — | Override fetched data. Skips the API call. |
state | "loading" | "error" | "empty" | — | Force a specific state for testing. |
basis | "accrual" | "modified_cash" | — | Report on a specific accounting basis. Omit to inherit the AssetProvider's basis, which itself falls back to the Business's country — Canadian Businesses report on Accrual, everyone else on Cash (see Accounting basis). |
basisToggle | boolean | — | Show the Cash/Accrual select in the report header. Off by default. Flipping it moves every component that inherits the provider's basis, so it can't leave a screen half cash and half accrual (see Accounting basis). |
onLedgerSelect | (ledgerId: string) => void | — | Called with a row's ledger id when the viewer picks it (click or keyboard). When set, ledger rows render as interactive links; group headings and calculated rows stay inert. |
className | string | — | Forwarded to the outer card element. |
States
Loading preview…
Loading preview…
Loading preview…
Loading preview…
Accounting basis
AssetBalanceSheetReport reports on one of two accounting bases: Accrual (accrual on the wire), which counts invoices and bills when they are issued, or Cash (modified_cash), which counts them when the money moves. Cashflow components take no basis — cashflow is a cash concept.
The basis is resolved per component, first match winning:
- the report's own
basisprop; - the provider's basis —
defaultBasisonAssetProvider, or whatever the toggle was last flipped to; - the Business's country — Canadian Businesses report on Accrual, everyone else on Cash.
Only the last step costs a request — a Business read, which is why every basis-aware component's scopes includes business:read — and it is serial: the report holds its own fetch until the Business answers. One request is shared across every basis-aware component on the screen, but pass defaultBasis on AssetProvider when you already know the basis and skip it entirely. If the lookup fails the report falls back to Cash and stays there — the Retry button re-runs the report, not the basis lookup.
basisToggle is off by default: no control renders in the header and the report reports on its resolved basis. Turn it on and flipping the control moves every basis-aware component under the provider with it, so the toggle can never leave a screen half cash and half accrual. A component pinned with its own basis prop is the exception — it keeps the basis you gave it and renders no toggle of its own, which is how you show both bases side by side on purpose.
The XLSX export sends the basis currently on screen, so a downloaded file always matches what the viewer was looking at.