print.rk
Rangka print format
Lives in modules/<module>/print/<name>.rk or <site>/print/<name>.rk · Schema print.json (source) · first line: # yaml-language-server: $schema=https://rangka-os.github.io/rangka-os/schema/0.5/print.json
Properties
| Property | Type | Meaning |
|---|---|---|
name required | string | pattern ^[a-z][a-z0-9_]*$ |
model required | string | pattern ^[a-z][a-z0-9_]*$ |
label | map of string | |
paper | A4 · A5 · 80mm | |
template required | string | pattern \.(html|xml)$ |
output | html · xml | html: a printed page (contract 0008); xml: a downloaded XML file (contract 0029) default "html" |
default | boolean | |
related | map of or |
Example
From rangka-apps/modules/invoicing/print/sales_invoice.rk (first 60 lines):
yaml
# yaml-language-server: $schema=https://rangka-os.github.io/rangka-os/schema/0.5/print.json
name: sales_invoice
model: sales_invoice
label: {id: Faktur, en: Invoice}
paper: A4
template: sales_invoice.html
default: true
# "Cara bayar" copied when the invoice was submitted (payment_instruction); empty for an older invoice or one
# submitted without a default account, which then shows the letterhead's bank accounts.
related:
cara_bayar:
model: payment_instruction
match: {sales_invoice: name}
limit: 1Generated from the schema by website/scripts/gen-reference.mjs. Edit the schema, not this page.