Skip to content
Calm motion: animations on this site only fade, with no movement

Invoice ​

An invoice with the parties, the lines, the tax, the totals, and the payment state

Shows a bill in an ERP, an accounting app, or a customer portal. It also prints on one page. To edit the lines, use the line-item editor.

Basic

Invoice

INV-2026-0042

Sent

From

Home Studio
Jl. Kemang Raya 12
Jakarta Selatan 12730
NPWP 01.234.567.8-901.000

Bill to

Radio Kita
Jl. Cikini Raya 7
Jakarta Pusat 10330

Issued
Due
ItemQtyPriceAmount
Sponsored episode, 30-second read · Tax 11%2Rp 1.500.000Rp 3.000.000
Studio time, per hour · Tax 11%3Rp 350.000Rp 1.050.000
Travel to the guest1Rp 150.000Rp 150.000
SubtotalRp 4.200.000
Tax 11%Rp 445.500
TotalRp 4.645.500
Paid−Rp 1.000.000
Amount dueRp 3.645.500
Pay by bank transfer to BCA 123 456 7890, Home Studio. Thank you!
  • number, issued, from, to, and lines are required. issued and due are days as YYYY-MM-DD, in time elements.
  • from and to each have a name and optional lines, such as the address and a tax number.
  • lines is a list. Each line has a description, a quantity, the price of one without tax, and an optional tax rate in percent.
  • The table ends with the subtotal, the tax for each rate, and the total. paid takes off what is already paid, and the last line is the amount due.
  • status is draft (default), sent, paid, or overdue. It shows as a mark and a word.
  • notes shows under the table, for example the bank details. In print, the frame and the colors go away.
  • currency is an ISO 4217 code (default USD), and locale sets the format of the money and the dates.
  • Change the words with labels or a label pack. The keys are the four states, the column and total names, and tax (a function). The API table lists them all.

The invoiceTotals function adds up the lines. It is exported for your own views.

Usage ​

ts
import { BlessInvoice } from "blessing-ui";

API ​

Props

NameTypeDefaultDescription
number*string—
issued*string—YYYY-MM-DD
duestring—
from*BlessInvoiceParty—
to*BlessInvoiceParty—
lines*BlessInvoiceLine[]—
statusBlessInvoiceStatus"draft"
paidnumber0what is already paid
notesstring—
currencystring"USD"
localestring"en"
labelsPartial<Record<BlessInvoiceStatus, string> & { invoice: string; from: string; to: string; issued: string; due: string; item: string; quantity: string; price: string; amount: string; subtotal: string; tax: (rate: number) => string; total: string; paidAmount: string; balance: string; }>—

Released under the MIT License. Character names and artwork belong to their owners.