Skip to content

Invoice templates

The invoice-template page at /admin/tables/from-template calls CreateInvoiceTemplateTable to provision a multi-table invoice structure (header, lines, and related tables) from one Typst template, instead of building the family by hand.

  • profile — the profile the tables are created in;
  • table_name — the base table name;
  • typst_source — the Typst template source (required);
  • row_display_columns — a comma-separated list of columns that identify a row, because the columns do not exist yet and are whatever the template’s contract declares.

The display columns are split and trimmed on submit; empty entries are dropped. A table name and the template source are both required.

On success the page lists every table the template produced, showing each table’s name, collection path, and parent table name, and reports how many tables were created. The form then resets, keeping the profile selected.

This is the web frontend of the server’s invoice-creation contract; see Invoice creation for how the field contract is turned into ordinary server tables.