dolfindevelopers

Delivery note detail

ComponentPayablesSDK + UI

Blocks for one delivery note: header (DN number, quantity received, supplier, status, Close and Cancel), details card linking its purchase order, lines with received and matched quantities and matched bills, plus DeliveryNoteDetail composing them with loading and error states.

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

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-delivery-note-detail

Also installs: button, table, ap-purchase-order-parts, base-data-table, base-page, base-states, ui-ap-delivery-note-detail.

Usage

screen.tsx
import { DeliveryNoteDetail } from "@/components/dolfin/ap/delivery-note-detail";

// Place it anywhere inside your <DolfinProvider>.
<DeliveryNoteDetail />

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
deliveryNoteIdstringFetches the note, its supplier, order and matched bills, and wires Close and Cancel.
deliveryNote{ id?: string; organisationId?: string; supplierId?: null | string; externalRef?: null | string; dnNumber: string; purchaseOrderId?: null | …The note to show. Passing it (or `loading` / `error`) fetches nothing; null reads "not found".
supplier{ id?: string; organisationId?: string; name: string; email?: null | string; phone?: null | string; website?: null | string; taxNumber?: nul…
purchaseOrder{ id?: string; organisationId?: string; supplierId?: null | string; externalRef?: null | string; poNumber: string; currency: string; status?…The order the goods were despatched against.
matchedBillsreadonly { billId: string; matchGroupId: string; matchGroupStatus: components["schemas"]["MatchGroupStatus"]; invoiceNumber?: null | string;…
matchedBillCurrenciesReadonly<Record<string, string>>Each matched bill's currency by bill id.
loadingboolean
errorError
onRetry() => void
onClose() => voidShows Close in the header while the note is open.
onCancel() => voidShows Cancel in the header while the note is open.
pendingActionOrderTransitionThe transition running now: its button shows progress, and both wait.
headerActionsstring | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<ReactNode> | React.Re…Before Close and Cancel in the header; a function receives the loaded note (e.g. to open it for editing).
beforestring | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<ReactNode> | React.Re…Above the header (a back link).
classNamestring

Customisation

Without editing the source, you can change:

Class names
className
Messages
ap.orders

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.

useDeliveryNoteuseDeliveryNoteActionsuseDolfinLocaleuseMessagesuseSupplier

Files

Written to your app by the install command:

  • components/dolfin/ap/delivery-note-detail.tsx 387 lines