dolfindevelopers

Bill matching page

PagePayablesSDK + UI

The three-way match workspace for one bill (route ap.billMatch, /bills/:billId/match): back link, header with the bill and match status, the purchase order, bill and delivery note cards, every line with its variances and resolve actions, totals and the summary of what is left to decide. Accepts your own header actions, the empty state, an aside and a footer.

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-matching-page

Also installs: button, ap-bill-match-panel, ap-link-po-dialog, base-page, base-states, ui-ap-bill-matching-page.

Usage

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

// A whole screen: mount it on a route, inside your <DolfinProvider>.
export default function Route({ params }: { params: { billId: string } }) {
  return <BillMatchingPage 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…Beside the status pill, e.g. your own "Re-run matching" or export button.
emptyStatestring | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<ReactNode> | React.Re…Replaces the "No three-way match yet" state (`null` shows nothing).
asidestring | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<ReactNode> | React.Re…A column beside the match (notes, the bill document, an assistant).
footerstring | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<ReactNode> | React.Re…Under the summary.
onBack() => voidOverrides the back link (default: the bill).
hideBackLinkboolean
hideLinkingbooleanHide "Link purchase order" and "Match manually".
inDeliveryWindowReadonlySet<string>Purchase orders expected near the invoice date, to tag their suggestions.
classNamestring

Customisation

Without editing the source, you can change:

Class names
className
Messages
ap.match

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.

useMatchGroupuseMatchLineCommandsuseMessages

Files

Written to your app by the install command:

  • components/dolfin/ap/bill-matching-page.tsx 182 lines