dolfindevelopers

Invoice lines

ComponentReceivablesSDK + UI

The invoice's lines: product, quantity times price, tax rate (frozen once sent), discount, subtotal and total, with an empty state.

Component: A piece you place inside your own screens: a table, a form, a card or a dialog. You decide the layout around it. Pages vs components

Choose your integration

Works with Dolfin’s SDK context, with appearance and behaviour you can customise. Requires DolfinProvider.

Loading preview…

Installation

Needs the Dolfin registry token. The CLI copies the source into your app.

Terminal
bunx --bun shadcn@4.23.0 add @dolfin/ar-invoice-lines

Also installs: base-info-hint, base-money, base-states, ui-ar-invoice-lines.

Usage

screen.tsx
import { InvoiceLines } from "@/components/dolfin/ar/invoice-lines";

// Place it anywhere inside your <DolfinProvider>.
<InvoiceLines invoice={invoice} view={view} />

Renders inside DolfinProvider (set it up once). It renders the data you pass as props.

API reference

PropTypeDescription
invoice required{ id?: string; organisationId?: string; customerId?: string; documentNumber?: null | string; currency: string; issueDate?: string; dueDate?:…
view requiredInvoiceView
onNavigate(route: DolfinRoute) => voidReplaces provider navigation for the product links.
renderLineMeta(line: InvoiceLineView) => ReactNodeExtra content at the end of a line (e.g. an accounting code).
classNamestring

Customisation

Without editing the source, you can change:

Class names
className
Messages
ar.invoice.linesbase.infoHint.moreAbout

Or edit the installed file directly: it is your code. See theming for colours and fonts.

Hooks

The SDK hooks this component uses. Use them directly from @dolfinai/react to build your own version.

useDolfinLocaleuseMessages

Files

Written to your app by the install command:

  • components/dolfin/ar/invoice-lines.tsx 56 lines