dolfindevelopers

Credit note detail page

PageReceivablesSDK + UI

One credit note: back link, header with Issue and Delete on drafts, amounts, details, the invoice it credits and its history. Plain node props for header actions, a status badge (e.g. e-invoice delivery), extra detail rows, extra sections and an aside.

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

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-credit-note-detail-page

Also installs: ar-credit-note-detail, base-page, ui-ar-credit-note-detail-page.

Usage

route.tsx
import { CreditNoteDetailPage } from "@/components/dolfin/ar/credit-note-detail-page";

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

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

API reference

PropTypeDescription
creditNoteId requiredstring
headerActionsstring | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<ReactNode> | React.Re…Buttons after Issue and Delete.
statusstring | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<ReactNode> | React.Re…Beside the status badge (e.g. e-invoice delivery).
detailsstring | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<ReactNode> | React.Re…Extra rows at the end of the details card, as `<dt>`/`<dd>` pairs.
sectionsstring | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<ReactNode> | React.Re…Extra cards after the invoice (e.g. the e-invoice).
asidestring | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<ReactNode> | React.Re…A column beside the note.
hideBackLinkbooleanHide the "Back to credit notes" link.
onDeleted() => voidAfter a draft is deleted; goes back to the list by default.
classNamestring

Customisation

Without editing the source, you can change:

Class names
className
Messages
ar.creditNotes.detail

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.

useMessages

Files

Written to your app by the install command:

  • components/dolfin/ar/credit-note-detail-page.tsx 59 lines