dolfindevelopers

Invoice summary

ComponentReceivablesSDK + UI

InvoiceBreakdown (subtotal, discount, tax, total, early payment discount, credit applied and balance due) and InvoiceKeyDates (created, updated, issued, due and payment terms); InvoiceSummary shows both.

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-summary

Also installs: separator, base-info-hint, base-money, base-status-badge, ui-ar-invoice-summary.

Usage

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

// Place it anywhere inside your <DolfinProvider>.
<InvoiceSummary 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
hideKeyDatesbooleanHides the key dates card.
earlyDiscountCreditNotestring | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<ReactNode> | React.Re…When the early payment discount was taken, the credit note that closed the invoice at the discount (a link, for example). Its presence marks the discount Taken.
classNamestring

Customisation

Without editing the source, you can change:

Class names
className
Messages
ar.invoice.summary

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-summary.tsx 75 lines