Bill template
A bill with the amount in Korean words, the due date, the bank account and a seal.
How to use it
- Shape your data like the sample data below; serve it as JSON from your server.
- Load the definition with getTemplate(id), or save the JSON below in your project.
- Change the company name, logo, seal and wording with [Open in the designer], then [Save] the JSON.
- Printing and PDF, Excel and HWPX export are already in the viewer toolbar.
import { getTemplate, createViewer } from '@freereportjs/core';
import '@freereportjs/core/styles.css';
const t = getTemplate('bill'); // a fresh copy each call
createViewer(document.getElementById('report'), {
definition: t.definition,
data: myData, // same structure as the sample data below
});Seals are generated from text in the data; to use a real seal image, set an image on the seal element in the designer. The default fonts are Nanum Gothic and Nanum Myeongjo.
Data structure
| Key | Kind | Fields |
|---|---|---|
billNo | string | B-2026-10-0042 |
date | string | 2026-10-20 |
dueDate | string | 2026-10-31 |
supplier | object | name, ceo, bizNo, address, type, item, phone |
customer | object | name |
bank | object | name, account, holder |
items[] | rows (3) · repeated by the detail band | name, spec, unit, qty, price |
note | string | 기한 내 입금 부탁드립니다. 계산서는 입금 확인 후 발행됩니다. |
Report definition (JSON)
{
"version": 1,
"name": "청구서",
"page": {
"size": "A4",
"margins": 15
},
"font": {
"family": "Nanum Gothic",
"size": 9
},
"dataSource": "items",
"fillEmptyRows": true,
"bands": {
"title": {
"height": 96,
"elements": [
{
"type": "text",
"x": 0,
"y": 0,
"w": 180,
"h": 16,
"text": "청 구 서",
"style": {
"fontSize": 24,
"bold": true,
"align": "center",
"letterSpacing": 2
}
},
{
"type": "line",
"x": 55,
"y": 15,
"w": 70,
"h": 0,
"width": 0.6
},
{
"type": "text",
"x": 0,
"y": 22,
"w": 25,
"h": 7,
"text": "청구번호",
"style": {
"background": "#f2f4f7",
"bold": true,
"align": "center",
"border": "0.2 solid #555"
}
},
{
"type": "field",
"x": 25,
"y": 22,
"w": 55,
"h": 7,
"expr": "billNo",
"style": {
"border": "0.2 solid #555"
}
},
{
"type": "text",
"x": 0,
"y": 29,
"w": 25,
"h": 7,
"text": "청 구 일",
"style": {
"background": "#f2f4f7",
"bold": true,
"align": "center",
"border": "0.2 solid #555"
}
},
{
"type": "text",
"x": 25,
"y": 29,
"w": 55,
"h": 7,
"text": "{format(date, \"yyyy년 M월 d일\")}",
"style": {
"border": "0.2 solid #555"
}
},
{
"type": "text",
"x": 0,
"y": 36,
"w": 25,
"h": 7,
"text": "납부기한",
"style": {
"background": "#f2f4f7",
"bold": true,
"align": "center",
"border": "0.2 solid #555"
}
},
{
"type": "text",
"x": 25,
"y": 36,
"w": 55,
"h": 7,
"text": "{format(dueDate, \"yyyy년 M월 d일 (ddd)\")}",
"style": {
"border": "0.2 solid #555",
"bold": true,
"color": "#c8102e"
}
},
{
"type": "text",
"x": 0,
"y": 43,
"w": 25,
"h": 7,
"text": "수 신",
"style": {
"background": "#f2f4f7",
"bold": true,
"align": "center",
"border": "0.2 solid #555"
}
},
{
"type": "text",
"x": 25,
"y": 43,
"w": 55,
"h": 7,
"text": "{customer.name} 귀하",
"style": {
"border": "0.2 solid #555",
"bold": true
}
},
{
"type": "text",
"x": 0,
"y": 51,
"w": 80,
"h": 6,
"text": "아래와 같이 청구합니다.",
"style": {
"padding": 0.5
}
},
{
"type": "text",
"x": 86,
"y": 22,
"w": 9,
"h": 35,
"text": "공\n급\n자",
"style": {
"background": "#f2f4f7",
"bold": true,
"align": "center",
"border": "0.2 solid #555",
"lineHeight": 1.6
}
},
{
"type": "text",
"x": 95,
"y": 22,
"w": 20,
"h": 7,
"text": "등록번호",
"style": {
"background": "#f2f4f7",
"bold": true,
"align": "center",
"border": "0.2 solid #555"
}
},
{
"type": "field",
"x": 115,
"y": 22,
"w": 65,
"h": 7,
"expr": "bizNo(supplier.bizNo)",
"style": {
"border": "0.2 solid #555",
"align": "center",
"bold": true,
"letterSpacing": 0.4
}
},
{
"type": "text",
"x": 95,
"y": 29,
"w": 20,
"h": 7,
"text": "상 호",
"style": {
"background": "#f2f4f7",
"bold": true,
"align": "center",
"border": "0.2 solid #555"
}
},
{
"type": "field",
"x": 115,
"y": 29,
"w": 30,
"h": 7,
"expr": "supplier.name",
"style": {
"border": "0.2 solid #555"
}
},
{
"type": "text",
"x": 145,
"y": 29,
"w": 12,
"h": 7,
"text": "대표",
"style": {
"background": "#f2f4f7",
"bold": true,
"align": "center",
"border": "0.2 solid #555"
}
},
{
"type": "text",
"x": 157,
"y": 29,
"w": 23,
"h": 7,
"text": "{supplier.ceo} (인)",
"style": {
"border": "0.2 solid #555"
}
},
{
"type": "text",
"x": 95,
"y": 36,
"w": 20,
"h": 7,
"text": "주 소",
"style": {
"background": "#f2f4f7",
"bold": true,
"align": "center",
"border": "0.2 solid #555"
}
},
{
"type": "field",
"x": 115,
"y": 36,
"w": 65,
"h": 7,
"expr": "supplier.address",
"style": {
"border": "0.2 solid #555",
"fontSize": 8
}
},
{
"type": "text",
"x": 95,
"y": 43,
"w": 20,
"h": 7,
"text": "업 태",
"style": {
"background": "#f2f4f7",
"bold": true,
"align": "center",
"border": "0.2 solid #555"
}
},
{
"type": "field",
"x": 115,
"y": 43,
"w": 25,
"h": 7,
"expr": "supplier.type",
"style": {
"border": "0.2 solid #555",
"fontSize": 8
}
},
{
"type": "text",
"x": 140,
"y": 43,
"w": 12,
"h": 7,
"text": "종목",
"style": {
"background": "#f2f4f7",
"bold": true,
"align": "center",
"border": "0.2 solid #555"
}
},
{
"type": "field",
"x": 152,
"y": 43,
"w": 28,
"h": 7,
"expr": "supplier.item",
"style": {
"border": "0.2 solid #555",
"fontSize": 7.5
}
},
{
"type": "text",
"x": 95,
"y": 50,
"w": 20,
"h": 7,
"text": "전 화",
"style": {
"background": "#f2f4f7",
"bold": true,
"align": "center",
"border": "0.2 solid #555"
}
},
{
"type": "field",
"x": 115,
"y": 50,
"w": 65,
"h": 7,
"expr": "phone(supplier.phone)",
"style": {
"border": "0.2 solid #555"
}
},
{
"type": "seal",
"x": 166,
"y": 25.5,
"w": 14,
"h": 14,
"rotate": -6,
"generate": {
"text": "{supplier.name}",
"centerText": "대표이사인",
"shape": "circle"
},
"style": {
"fontFamily": "Nanum Myeongjo"
}
},
{
"type": "text",
"x": 0,
"y": 62,
"w": 35,
"h": 12,
"text": "청구금액\n(부가세 포함)",
"style": {
"background": "#f2f4f7",
"bold": true,
"align": "center",
"border": "0.2 solid #555",
"fontSize": 8.5
}
},
{
"type": "text",
"x": 35,
"y": 62,
"w": 145,
"h": 12,
"text": "{koreanAmount(sum(qty * price) + round(sum(qty * price) * 0.1))} (₩{sum(qty * price) + round(sum(qty * price) * 0.1):#,##0})",
"style": {
"border": "0.2 solid #555",
"fontSize": 12,
"bold": true,
"align": "center"
}
},
{
"type": "text",
"x": 0,
"y": 77,
"w": 35,
"h": 8,
"text": "입금 계좌",
"style": {
"background": "#f2f4f7",
"bold": true,
"align": "center",
"border": "0.2 solid #555"
}
},
{
"type": "text",
"x": 35,
"y": 77,
"w": 145,
"h": 8,
"text": "{bank.name} {bank.account} 예금주 {bank.holder}",
"style": {
"border": "0.2 solid #555",
"bold": true
}
}
]
},
"columnHeader": {
"height": 8,
"elements": [
{
"type": "text",
"x": 0,
"y": 0,
"w": 10,
"h": 8,
"text": "No",
"style": {
"background": "#f2f4f7",
"bold": true,
"align": "center",
"border": "0.2 solid #555"
}
},
{
"type": "text",
"x": 10,
"y": 0,
"w": 62,
"h": 8,
"text": "품 목",
"style": {
"background": "#f2f4f7",
"bold": true,
"align": "center",
"border": "0.2 solid #555"
}
},
{
"type": "text",
"x": 72,
"y": 0,
"w": 26,
"h": 8,
"text": "규 격",
"style": {
"background": "#f2f4f7",
"bold": true,
"align": "center",
"border": "0.2 solid #555"
}
},
{
"type": "text",
"x": 98,
"y": 0,
"w": 12,
"h": 8,
"text": "단위",
"style": {
"background": "#f2f4f7",
"bold": true,
"align": "center",
"border": "0.2 solid #555"
}
},
{
"type": "text",
"x": 110,
"y": 0,
"w": 12,
"h": 8,
"text": "수량",
"style": {
"background": "#f2f4f7",
"bold": true,
"align": "center",
"border": "0.2 solid #555"
}
},
{
"type": "text",
"x": 122,
"y": 0,
"w": 26,
"h": 8,
"text": "단 가",
"style": {
"background": "#f2f4f7",
"bold": true,
"align": "center",
"border": "0.2 solid #555"
}
},
{
"type": "text",
"x": 148,
"y": 0,
"w": 32,
"h": 8,
"text": "공급가액",
"style": {
"background": "#f2f4f7",
"bold": true,
"align": "center",
"border": "0.2 solid #555"
}
}
]
},
"detail": {
"height": 7.5,
"elements": [
{
"type": "field",
"x": 0,
"y": 0,
"w": 10,
"h": 7.5,
"expr": "rowNum",
"style": {
"border": "0.2 solid #555",
"align": "center"
}
},
{
"type": "field",
"x": 10,
"y": 0,
"w": 62,
"h": 7.5,
"expr": "name",
"style": {
"border": "0.2 solid #555"
}
},
{
"type": "field",
"x": 72,
"y": 0,
"w": 26,
"h": 7.5,
"expr": "spec",
"style": {
"border": "0.2 solid #555",
"align": "center",
"fontSize": 8
}
},
{
"type": "field",
"x": 98,
"y": 0,
"w": 12,
"h": 7.5,
"expr": "unit",
"style": {
"border": "0.2 solid #555",
"align": "center"
}
},
{
"type": "field",
"x": 110,
"y": 0,
"w": 12,
"h": 7.5,
"expr": "qty",
"format": "#,##0",
"style": {
"border": "0.2 solid #555",
"align": "right"
}
},
{
"type": "field",
"x": 122,
"y": 0,
"w": 26,
"h": 7.5,
"expr": "price",
"format": "#,##0",
"style": {
"border": "0.2 solid #555",
"align": "right"
}
},
{
"type": "field",
"x": 148,
"y": 0,
"w": 32,
"h": 7.5,
"expr": "qty * price",
"format": "#,##0",
"style": {
"border": "0.2 solid #555",
"align": "right"
}
}
]
},
"summary": {
"height": 46,
"elements": [
{
"type": "text",
"x": 0,
"y": 0,
"w": 122,
"h": 8,
"text": "공급가액",
"style": {
"background": "#f2f4f7",
"bold": true,
"align": "center",
"border": "0.2 solid #555"
}
},
{
"type": "field",
"x": 122,
"y": 0,
"w": 58,
"h": 8,
"expr": "sum(qty * price)",
"format": "#,##0",
"style": {
"border": "0.2 solid #555",
"align": "right",
"bold": true
}
},
{
"type": "text",
"x": 0,
"y": 8,
"w": 122,
"h": 8,
"text": "부가가치세 (10%)",
"style": {
"background": "#f2f4f7",
"bold": true,
"align": "center",
"border": "0.2 solid #555"
}
},
{
"type": "field",
"x": 122,
"y": 8,
"w": 58,
"h": 8,
"expr": "round(sum(qty * price) * 0.1)",
"format": "#,##0",
"style": {
"border": "0.2 solid #555",
"align": "right"
}
},
{
"type": "text",
"x": 0,
"y": 16,
"w": 122,
"h": 9,
"text": "청구 합계",
"style": {
"background": "#f2f4f7",
"bold": true,
"align": "center",
"border": "0.2 solid #555",
"fontSize": 10
}
},
{
"type": "field",
"x": 122,
"y": 16,
"w": 58,
"h": 9,
"expr": "sum(qty * price) + round(sum(qty * price) * 0.1)",
"format": "₩#,##0",
"style": {
"border": "0.2 solid #555",
"align": "right",
"bold": true,
"fontSize": 11
}
},
{
"type": "text",
"x": 0,
"y": 28,
"w": 25,
"h": 16,
"text": "비 고",
"style": {
"background": "#f2f4f7",
"bold": true,
"align": "center",
"border": "0.2 solid #555"
}
},
{
"type": "text",
"x": 25,
"y": 28,
"w": 155,
"h": 16,
"text": "{note}",
"style": {
"border": "0.2 solid #555",
"valign": "top",
"padding": 2
}
}
]
}
}
}Sample data
{
"billNo": "B-2026-10-0042",
"date": "2026-10-20",
"dueDate": "2026-10-31",
"supplier": {
"name": "(주)세컨드코리아",
"ceo": "구명석",
"bizNo": "7928703276",
"address": "경기도 파주시 와석순환로 507, 701호",
"type": "정보통신업",
"item": "소프트웨어 개발",
"phone": "07077681326"
},
"customer": {
"name": "(주)한빛물산"
},
"bank": {
"name": "국민은행",
"account": "123456-01-234567",
"holder": "(주)세컨드코리아"
},
"items": [
{
"name": "보고서 서버 유지보수 (10월)",
"spec": "월 정액",
"unit": "월",
"qty": 1,
"price": 550000
},
{
"name": "양식 수정 (급여명세서)",
"spec": "추가 요청",
"unit": "건",
"qty": 2,
"price": 150000
},
{
"name": "현장 출장 지원",
"spec": "반일",
"unit": "회",
"qty": 1,
"price": 200000
}
],
"note": "기한 내 입금 부탁드립니다. 계산서는 입금 확인 후 발행됩니다."
}