Skip to content

Order, Quote, And Proforma PDF Templates ​

Order, quote, and proforma PDFs each have their own document template. This lets you keep different wording, layout, and fields for each document type.

Template Selection ​

PDF generation uses the template selected for the matching document type:

DocumentSettingTemplate type
Orderdocuments.orderPdfDocumentIdorder
Quotedocuments.quotePdfDocumentIdquote
Proformadocuments.proformaPdfDocumentIdproforma

If no specific template is selected, the system uses the default template for that document type. Older legacy offer/proforma templates can still be used for compatibility.

Template Schema ​

New templates should use:

text
renderSchema = orderDocument
renderSchemaVersion = 1

This schema provides a stable field set for order, quote, and proforma PDFs. Older templates can stay on the legacy schema until they are intentionally updated.

Changing visual HTML does not require a schema version change. A new schema version is only needed when existing field names or field meanings change.

Common Fields ​

The main document fields are available at the template root:

FieldMeaning
.documentTypeorder, quote, or proforma
.orderIdOrder/proforma ID
.quoteIdQuote ID
.dateDocument date
.companyNameBuyer company name
.companyInfoBuyer company details
.shippingAddressShipping address
.billingAddressBilling address
.lineItemsProduct/service lines
.linesByHeadingsPDF render-only product/service lines grouped under document headings
.currencyDocument currency
.totalExclTaxTotal excluding tax
.totalTaxTax total
.totalInclTaxTotal including tax
.commentsInternal/public document comments
.customerNoteCustomer note
.deliveryInstructionsDelivery instructions

Dates are JSON date-time values and numbers are JSON numbers. Empty optional fields may be missing or rendered as an empty value.

Field Types And Nested Objects ​

Root fields:

FieldTypeIncluded
.schemaVersionstringorderDocument.v1
.documentTypestringorder, quote, or proforma
.orderIdnumberPresent for orders and proformas
.quoteIdnumberPresent for quotes
.datedate-timeDocument date
.createdAtdate-timeCreation date/time
.companyIdnumberBuyer company ID
.companyNamestringBuyer company name
.titlestringDocument title/body intro
.documentstringExisting document number field, if set
.commentsstringDocument comments
.customerNotestringCustomer-facing note
.deliveryInstructionsstringDelivery instructions
.emailstringBuyer/order email
.externalUserIdnumberLinked external user ID
.paymentMethodstringPayment method
.paymentProviderstringPayment provider
.paymentIsCodbooleanCash-on-delivery flag
.paymentReferencestringPayment reference
.paymentTermIdnumberPayment term ID
.shippingMethodstringShipping method display name
.shippingMethodCodestringShipping method code
.trackingNumberstringShipment tracking number
.trackingCarrierstringTracking carrier/code
.currencystringCurrency code, for example EUR
.totalExclTaxnumberTotal excluding tax
.totalTaxnumberTax total
.totalInclTaxnumberTotal including tax
.totalDiscountInclTaxnumberDiscount including tax
.totalShippingInclTaxnumberShipping including tax
.totalDiscountExclTaxnumberDiscount excluding tax
.totalShippingExclTaxnumberShipping excluding tax
.statusobjectCurrent status
.companyInfoobjectBuyer company details
.shippingAddressobjectShipping address
.billingAddressobjectBilling address
.pickupLocationobjectPickup point/location, when used
.companyAddressInfoobjectBuyer contact/address details, when available
.customFieldsobjectTenant-specific custom fields, when configured
.lineItemsarrayFlat line list
.linesByHeadingsarrayPDF render-only grouped line list
.documentChargesarrayDocument-level charges
.invoiceInfoobjectLinked invoice information, when formed

.companyInfo:

FieldTypeIncluded
.companyInfo.companyIdnumberBuyer company ID
.companyInfo.companyNamestringBuyer company name
.companyInfo.companyCodestringBuyer registration/company code
.companyInfo.companyVatCodestringBuyer VAT code
.companyInfo.isPersonbooleanTrue when buyer is a person
.companyInfo.addressstringBuyer address
.companyInfo.postCodestringBuyer post code
.companyInfo.citystringBuyer city
.companyInfo.countrystringBuyer country
.companyInfo.phoneNumberstringBuyer phone number

.shippingAddress:

FieldTypeIncluded
.shippingAddress.addressIdnumberAddress ID
.shippingAddress.namestringRecipient/company display name
.shippingAddress.firstNamestringRecipient first name
.shippingAddress.lastNamestringRecipient last name
.shippingAddress.companyNamestringDeprecated alias, use .name
.shippingAddress.addressstringStreet/address line
.shippingAddress.citystringCity
.shippingAddress.countrystringCountry name
.shippingAddress.countryNamestringCountry name resolved from country code when available
.shippingAddress.countryCodestringCountry code
.shippingAddress.postCodestringPost code
.shippingAddress.homePhonestringHome phone
.shippingAddress.mobilePhonestringMobile phone

.billingAddress:

FieldTypeIncluded
.billingAddress.addressIdnumberAddress ID
.billingAddress.firstNamestringFirst name
.billingAddress.lastNamestringLast name
.billingAddress.companyNamestringCompany name
.billingAddress.addressstringStreet/address line
.billingAddress.citystringCity
.billingAddress.countryNamestringCountry name resolved from country code when available
.billingAddress.countryCodestringCountry code
.billingAddress.postCodestringPost code
.billingAddress.phonestringPhone

.pickupLocation:

FieldTypeIncluded
.pickupLocation.locationIdnumberPickup location ID
.pickupLocation.locationNamestringPickup location name
.pickupLocation.locationCitystringPickup city
.pickupLocation.locationPostCodestringPickup post code
.pickupLocation.locationCompanyCodestringPickup company code

.companyAddressInfo:

FieldTypeIncluded
.companyAddressInfo.contactIdnumberContact/address ID
.companyAddressInfo.titlestringContact title/display name
.companyAddressInfo.firstNamestringFirst name
.companyAddressInfo.lastNamestringLast name
.companyAddressInfo.mobilePhonestringMobile phone
.companyAddressInfo.emailstringEmail
.companyAddressInfo.contactTypestringContact type
.companyAddressInfo.addressstringAddress line
.companyAddressInfo.addressLine2stringSecond address line
.companyAddressInfo.regionstringRegion
.companyAddressInfo.citystringCity
.companyAddressInfo.countrystringCountry
.companyAddressInfo.postCodestringPost code

.status:

FieldTypeIncluded
.status.statusIdnumberStatus ID
.status.codestringStatus code
.status.namestringStatus name
.status.formInvoiceOnChangebooleanWhether status forms invoice on change
.status.isInvoiceDownloadablebooleanWhether invoice download is allowed
.status.showAsPaidbooleanWhether status is shown as paid
.status.isWaitingForPaymentbooleanWhether status waits for payment
.status.isCancelledbooleanWhether status is cancelled
.status.isOrderCompletedbooleanWhether order is completed
.status.isActivebooleanWhether status is active
.status.includeInOrderedQuantitybooleanWhether lines count in ordered quantity

Line items are available through:

gotemplate
{{ range .lineItems }}
  {{ .title }} {{ .quantity }} {{ .measurementUnit }}
  {{ formatPrice .priceExclTax }} {{ .currency }}
  {{ formatPrice .totalExclTax }} {{ .currency }}
{{ end }}

.lineItems[]:

FieldTypeIncluded
.idnumberInternal line ID
.lineTypenumber0 product/service, 1 heading, 2 note
.titlestringLine title
.descriptionstringLine description
.productIdnumberProduct ID
.productNamestringProduct name
.articulestringProduct article/code
.quantitynumberQuantity
.measurementUnitstringMeasurement unit
.currencystringCurrency code
.priceExclTaxnumberUnit price excluding tax
.priceInclTaxnumberUnit price including tax
.originalPricenumberOriginal unit price, if stored
.taxPercentagenumberTax percentage
.taxCodestringTax classification code
.taxAmountnumberFixed tax amount, when used
.discountPerUnitnumberDiscount per unit
.discountPercentnumberDiscount percentage
.priceIncludesDiscountbooleanWhether unit price already includes line discount
.totalExclTaxnumberLine total excluding tax
.totalInclTaxnumberLine total including tax
.totalDiscountExclTaxnumberLine discount total excluding tax
.chargesarrayLine-level charges

For document layouts that need section headings, use .linesByHeadings. This field is template-only and is not exposed on the external order-detail API:

gotemplate
{{ range .linesByHeadings }}
  {{ if .title }}<strong>{{ .title }}</strong>{{ end }}
  {{ range .lines }}
    {{ if eq .lineTypeString "2" }}
      {{ nl2br .title }}
    {{ else }}
      {{ .title }} {{ .quantity }} {{ .measurementUnit }}
      {{ formatPrice .totalExclTax }} {{ .currency }}
    {{ end }}
  {{ end }}
{{ end }}

.linesByHeadings[]:

FieldTypeIncluded
.titlestringHeading title
.totalExclTaxnumberGroup total excluding tax
.totalTaxnumberGroup tax total
.totalInclTaxnumberGroup total including tax
.currencystringGroup currency
.linesarrayLines under the heading

.linesByHeadings[].lines[] uses the same fields as .lineItems[], plus .lineTypeString for legacy-compatible note checks in templates.

.documentCharges[] and .lineItems[].charges[]:

FieldTypeIncluded
.chargeIdnumberCharge row ID
.chargeTypeIdnumberCharge type ID
.chargeCodestringCharge code
.chargeNamestringCharge name
.calculationTypestringpercentage, fixedAmount, or perUnit
.percentagenumberPercentage, when used
.baseAmountnumberAmount the charge was calculated from
.chargeAmountnumberCharge amount excluding tax
.isTaxablebooleanWhether charge is taxable
.taxPercentagenumberTax percentage
.taxAmountnumberTax amount
.totalAmountnumberCharge amount including tax
.currencystringCurrency code
.remarksstringRemarks

.invoiceInfo:

FieldTypeIncluded
.invoiceInfo.invoiceIsFormedbooleanWhether an invoice exists for the order
.invoiceInfo.invoiceIdnumberInvoice ID
.invoiceInfo.invoicePrefixstringInvoice series/prefix
.invoiceInfo.invoiceNumberstringInvoice number
.invoiceInfo.invoiceNumber2stringSecondary invoice number
.invoiceInfo.invoiceDatedate-timeInvoice date
.invoiceInfo.createdAtdate-timeInvoice creation date/time

Render Fields ​

PDF-specific helper fields are available under .render:

FieldMeaning
.render.titleLocalized document title
.render.documentNumberPreferred printable document number
.render.localeCurrent user language
.render.showExpiryDateTrue for quote templates
.render.amountInWordsTotal amount in words
.render.sumInWordsCompatibility alias for .render.amountInWords
.render.user.firstNameRendering user first name
.render.user.lastNameRendering user last name

Company Configuration ​

Use .render.configuration.company for seller/company details:

gotemplate
{{ .render.configuration.company.name }}
{{ .render.configuration.company.registrationCode }}
{{ .render.configuration.company.vatCode }}
{{ .render.configuration.company.address }}
{{ .render.configuration.company.city }}
{{ .render.configuration.company.phone }}
{{ .render.configuration.company.email }}
{{ .render.configuration.company.website }}
{{ .render.configuration.company.bankDetails }}
{{ .render.configuration.company.logo }}

Example:

gotemplate
{{ if .render.configuration.company.logo }}
  <img src="{{ .render.configuration.company.logo }}" style="max-height: 60px;">
{{ end }}
<strong>{{ .render.configuration.company.name }}</strong>

The header logo and the page background are separate settings:

SettingMeaning
company.logoLogo rendered by the template HTML
documents.pdf.backgroundFull-page PDF background/blank applied behind the rendered PDF

If documents.pdf.background is empty, no PDF background is applied.

Translations ​

Use translation keys for visible labels instead of hardcoded text:

gotemplate
{{ T "offer.buyer" }}
{{ T "offer.quantity" }}
{{ T "offer.price" }}
{{ T "offer.subtotal" }}
{{ T "offer.vat" }}
{{ T "offer.total2" }}

This keeps one template usable across supported languages.

Formatting Helpers ​

Common helpers available in templates:

gotemplate
{{ formatDate .date }}
{{ formatDateLithuanian .date }}
{{ formatDatetimeLithuanian .createdAt }}
{{ formatDateUS .date }}
{{ formatDatetimeUS .createdAt }}
{{ formatDateTimeUS .createdAt }}
{{ formatPrice .totalInclTax }}
{{ nl2br .comments }}

Date helper output formats:

HelperExample output
formatDate2026-05-26
formatDateLithuanian2026-05-26
formatDatetimeLithuanian2026-05-26 14:30:00
formatDateUS05/26/2026
formatDatetimeUS05/26/2026 02:30 PM
formatDateTimeUS05/26/2026 02:30 PM

formatDate is an alias for formatDateLithuanian. Use formatDateUS when a US-style MM/DD/YYYY date is needed.

Minimal Example ​

gotemplate
<h1>{{ .render.title }} {{ .render.documentNumber }}</h1>
<p>{{ formatDate .date }}</p>

<p>
  <strong>{{ T "offer.buyer" }}</strong><br>
  {{ .companyInfo.companyName }}<br>
  {{ .companyInfo.companyCode }}
</p>

<table>
  <thead>
    <tr>
      <th>{{ T "offer.title" }}</th>
      <th>{{ T "offer.quantity" }}</th>
      <th>{{ T "offer.price" }}</th>
      <th>{{ T "offer.subtotal" }}</th>
    </tr>
  </thead>
  <tbody>
    {{ range .lineItems }}
    <tr>
      <td>{{ .title }}</td>
      <td>{{ .quantity }} {{ .measurementUnit }}</td>
      <td>{{ formatPrice .priceExclTax }} {{ .currency }}</td>
      <td>{{ formatPrice .totalExclTax }} {{ .currency }}</td>
    </tr>
    {{ end }}
  </tbody>
</table>

<p>
  {{ T "offer.total2" }}:
  <strong>{{ formatPrice .totalInclTax }} {{ .currency }}</strong>
</p>

Pikselis Business documentation