dolfindevelopers

Send invoice dialog

DialogReceivablesSDK + UI

Confirms sending an invoice: where it goes and what stops it (from the send plan, with fix buttons), then the email to review and tweak (tone, reminders, subject, CC, reply-to, greeting, opening message) beside a live preview.

Dialog: a modal you open from your own screen. You control when it opens with its 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-send-invoice-dialog

Also installs: button, checkbox, dialog, input, label, select, textarea, ui-ar-send-invoice-dialog.

Usage

screen.tsx
import { SendInvoiceDialog } from "@/components/dolfin/ar/send-invoice-dialog";

// Place it anywhere inside your <DolfinProvider>.
<SendInvoiceDialog invoiceId={invoiceId} open={open} onOpenChange={handleOpenChange} />

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
invoiceId requiredstring
open requiredboolean
onOpenChange required(open: boolean) => void
onFix(fix: InvoiceSendFix) => voidWhere a send problem is fixed. Without it, problems show no button.
canFix(fix: InvoiceSendFix) => boolean
onSent() => voidCalled with the sent invoice's id once the send went through.

Customisation

Without editing the source, you can change:

Messages
ar.invoice.preview.emailTitlear.invoice.send

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

Hooks

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

useInvoiceActionsuseInvoiceSendComposeruseMessages

Files

Written to your app by the install command:

  • components/dolfin/ar/send-invoice-dialog.tsx 69 lines