dolfindevelopers

Create recurring invoice page

PageReceivablesSDK + UI

Set up a recurring invoice: the schedule form with New customer and New product dialogs, optionally prefilled from contract terms (with the reading's confidence and missing fields) or from a contract dropped on the page. Opens the schedule once created. Takes header actions, banners and extra form cards as plain nodes.

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/ar-create-recurring-invoice-page

Also installs: button, base-theme, base-page, base-states, ar-schedule-form, ar-schedule-contract, ar-create-customer-dialog, ar-create-product-dialog, ui-ar-create-recurring-invoice-page.

Usage

route.tsx
import { ArCreateRecurringInvoicePage } from "@/components/dolfin/ar/create-recurring-invoice-page";

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

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
contractTerms{ customerName?: null | string; customerEmail?: null | string; currency?: null | string; memo?: null | string; startDate?: null | string; ca…Terms read off a contract (e.g. from `ArRecurringInvoicesListPage`'s `onContractRead`): the form starts prefilled.
allowContractUploadbooleanOffer "Start from a contract" on this page when no terms were passed. Default true.
onCreated(schedule: Schedule) => voidCalled with the new schedule before the page moves to it.
onNavigate(route: DolfinRoute) => voidReplaces the provider's navigation (back, cancel, after creating).
headerActionsstring | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<ReactNode> | React.Re…Buttons beside the title.
bannersstring | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<ReactNode> | React.Re…Above the form: notices such as delivery or accounting status.
fieldsstring | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<ReactNode> | React.Re…Extra cards after the line items.
hideCreateCustomerbooleanHides "New customer" and "New product" in the pickers.
hideCreateProductboolean
titlestring | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<ReactNode> | React.Re…
descriptionstring | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<ReactNode> | React.Re…
classNamestring

Customisation

Without editing the source, you can change:

Class names
className
Messages
ar.schedules

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.

useCanManageSchedulesuseDolfinNavigateuseMessages

Files

Written to your app by the install command:

  • components/dolfin/ar/create-recurring-invoice-page.tsx 116 lines