dolfindevelopers

Bill detail page

PagePayablesSDK + UI

One bill (exported as BillDetailPage, and as ApBillDetailPage beside ApBillsListPage): its document beside its summary, approval, lines, match, breakdown, payments, validation and history, with the actions its state allows. Accepts your own header actions, banners, aside cards, the match panel, extra actions and the create-supplier dialog (defaults to the supplier dialog prefilled from the bill).

Page: A complete screen for one route, such as a bill or the invoices list. Mount it on a route in your app; connected SDK pages provide data and actions; standalone UI pages receive them as props. Pages vs components

Choose your integration

Ready to connect to Dolfin. Loads data through SDK hooks, 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/ap-bill-detail-page

Also installs: base-states, ap-bill-header, ap-bill-summary, ap-bill-lines, ap-bill-match-panel, ap-bill-validation-card, ap-bill-attachments-card, ap-bill-payments-card, ap-bill-timeline, ap-bill-document-viewer, ap-submit-review-dialog, ap-create-supplier-dialog, ui-ap-bill-detail-page.

Usage

route.tsx
import { ApBillDetailPage } from "@/components/dolfin/ap/bill-detail-page";

// A whole screen: mount it on a route, inside your <DolfinProvider>.
export default function Route({ params }: { params: { billId: string } }) {
  return <ApBillDetailPage billId={params.billId} />;
}

Renders inside DolfinProvider (set it up once). By default it loads its own data through the SDK. Supplied-data examples show how to override that behavior.

API reference

PropTypeDescription
billId requiredstring
headerActionsstring | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<ReactNode> | React.Re…Buttons in the bar above the bill, after the built-in ones.
bannersstring | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<ReactNode> | React.Re…Above the bill's details: notices such as e-invoice faults.
asidestring | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<ReactNode> | React.Re…Cards after the payments (for example paying by bank, accounting sync, a bookkeeping card).
matchPanelstring | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<ReactNode> | React.Re…The three-way match panel. Defaults to `BillMatchPanel` (lines, variances, resolve actions) when the bill has a match; `null` hides it.
actionsstring | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<ReactNode> | React.Re…More primary actions, shown with approve and reject (for example paying the bill).
paymentActionsstring | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<ReactNode> | React.Re…Buttons in the payments card header (for example recording a payment).
hideCreateSupplierbooleanHides "Create supplier" on a bill naming a supplier not on file (it opens `ApCreateSupplierDialog`).
errorStatestring | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<ReactNode> | React.Re…Replaces the not-found and error state (`null` shows nothing).
onNavigate(route: DolfinRoute) => voidReplaces the provider's navigation for every link on the page.
settingsLinkstring | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<ReactNode> | React.Re…Where approval rules are managed, in the review dialog (null hides the link).
hideDocumentbooleanHides the document pane (for hosts that show the document elsewhere).
hideMatchbooleanHides the header's Match link (for hosts without the match workspace).
hideWorkspaceLinkbooleanHides "Open match workspace" in the match panel.
classNamestring

Customisation

Without editing the source, you can change:

Class names
className
Messages
ap.billbase.statescore.errors

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

Hooks

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

useBilluseBillActionsuseDolfinHasRouteuseMessages

Files

Written to your app by the install command:

  • components/dolfin/ap/bill-detail-page.tsx 205 lines