action.skip

Standard Template Basic Setup

Configuring standard templates according to your needs usually comprises the following tasks:

Info

For topics beyond the scope of the usual template configuration, refer to Standard Template Advanced Options, Template CSS and the FAQ section PDF and Email.

For further help with template customization, contact JustOn Support.

Creating New Template

Info

JustOn recommends to create one or more custom templates and to leave the default template (named Default) untouched.

To cover multiple targets, like different locales or specific customer groups, you need to create new templates. To do so:

  1. Open the Templates tab.
  2. Click New.
  3. Specify at least the template name and the template language.

    You can edit the other information later as required.

  4. Click Save.

    This generates the new template, copying the contents of the default template.

Info

Alternatively, you can also clone an existing template.

Populating Common Template Fields

Usually, your organization has defined a layout model for printed documents. When customizing a template, you must provide information to fields (text blocks) that are empty by default in order to comply with your organization's design specifications. Common header and footer fields to be populated with your custom information include

  • Header
  • Sender Address
  • Info Left
  • Info Right
  • Footer

For an overview of other fields that are to be filled, their placement etc., see Template Structure and Building Blocks.

To edit header and footer:

  1. Open the template to be edited.
  2. In the Header & Footer section, click next to the Header, Sender Address, Info Left, Info Right or Footer fields and specify the information as required.

    Alternatively, you can click Edit in the detail view and edit all fields at once.

  3. Click Save.

Info

Template text blocks can contain

  • plain text
  • placeholders
  • HTML code for tables, lists and links

If you use HTML code in template text blocks, make sure to write all code in a single line to avoid line breaks being converted to <br/> tags.

Specifying Counter

Invoices, credits, cancellations and dunnings must have unique numbers to comply with legal regulations. In Draft status, these numbers are temporary and of no legal relevance. When setting them to Open, however, JustOn creates the unique and unalterable numbers for invoices, credits, cancellations and dunnings based on defined counters. For details, see Counters and Number Ranges.

Customizing templates therefore involves specifying the counter to be used. To do so:

  1. Open the template or template detail to be edited.
  2. In the Information section, double-click the Counter field and specify the counter as required.

    Alternatively, you can click Edit in the detail view to edit the field.

  3. Click Save.

Info

Counters defined on templates overwrite counters defined for business entities.

Specifying Default Payment Due

Depending on your business requirements, you can specify the number of days that is added to the invoice date by default in order to calculate the payment due date of the invoice. To do so, you configure the template field Default Payment Due.

  1. Open the template to be edited.
  2. In the Payment Information section, double-click the Default Payment Due field and specify the required number of days.
  3. Click Save.

Info

A default payment due set on the account takes precedence. If you have not set a default payment due on the account or the template, JustOn defaults to 0.

Editing Standard Text Blocks

In the main content area, the template includes three generic text blocks that you can use for any running text to be rendered in the final document.

  • Text 1: Text to be rendered above the invoice line item table, can be used, for example, to edit a letter-like text introducing the invoice that follows.
  • Text 2: Text to be rendered below the invoice line item table, can be used, for example, to add payment terms.
  • Text 3: Additional text to be rendered below the Text 2 block.

To edit the generic text blocks:

  1. Open the template to be edited.
  2. In the Texts section, double-click the Text 1, Text 2 or Text 3 field and specify the information as required.

    Alternatively, you can click Edit in the detail view and edit all fields at once.

  3. Click Save.

Info

Template text blocks can contain

  • plain text
  • placeholders
  • HTML code for tables, lists and links

If you use HTML code in template text blocks, make sure to write all code in a single line to avoid line breaks being converted to <br/> tags.

Adjusting Invoice Line Item Table

The Table Columns field determines the contents of the line item table on the printed invoice. This field contains a list of invoice line item fields, separated by semicolon, which determines the visible table columns and their sequence.

If the Table Columns field is left blank, JustOn defaults to the following setting:

PosNo;Title__c+Description__c;UnitPriceCalc__c;Quantity__c+Unit__c;TaxRate__c;PosTotalNet__c

This produces the following invoice line item information:

  • Position number
  • Item title and description
  • Calculated item price (the unit price multiplied with the commission, if defined)
  • Item quantity
  • Tax rate
  • Item net total

Adding or Removing Columns

Depending on your organization's requirements, you must remove columns you do not need or add new columns.

  1. Open the template to be edited.
  2. In the Information section, double-click the Table Columns field and specify the information as required.

    You can use any invoice line item field. Note that the specified order defines the column sequence.

    To not break the table layout, you must include at least four columns.

  3. Click Save.

To remove, for example, the item description, quantity unit and tax rate and to show the billing factor and an applicable item discount, type the following line in the Table Columns field:

PosNo;Title__c;UnitPriceNet__c;Quantity__c;BillingFactor__c;Discount__c;PosTotalNet__c

Info

The discount/discount amount columns are conditional. That is, JustOn hides these columns if there is no discount defined.

If you still need the discount column – and display 0 if there is no discount – on the printed invoice:

  1. Create a custom field on the invoice line item that retrieves the original discount value.
  2. Include this field in the table configuration.

Setting Fix Column Width

Depending on your table setup, you may have to set fix column widths. To do so:

  1. Open the template to be edited.
  2. In the Layout & Design section, double-click the Custom CSS field and specify the CSS code as required.

    This example assumes that you want a fixed column width for line item total column:

    .invoice-table th.PosTotalNet__c {
        width:2.5cm;
    }
    

    Repeat this rule for any defined table column, replacing PosTotalNet__c.

  3. Click Save.

Configuring Payment Information Texts

Depending on the payment method set for an invoice, you may want to provide some payment-relevant information to the invoice recipient – tell them that you collect the invoice amount via direct debit, or that you charge their credit card, or ask them to transfer the invoice amount themselves, for example.

To this end, you can use the Payment Info template fields. There are payment info fields for every applicable payment method. Depending on the payment method set on the invoice, JustOn copies the corresponding text to the Payment Info field on the invoice. Consequently, this text is printed to the invoice PDF.

Payment Method Template Payment Info Field
SEPA Payment Info Direct Debit
Payment Info Credit Transfer
Online Payment Payment Info Online Payment
Bank Transfer Payment Info Bank Transfer
Deprecated payment methods and payment info fields

JustOn 2.91 has introduced the generic payment method Online Payment to cover all payment methods available through payment service provider integrations via JustOn Cash Management.

The new payment method replaces the (too specific) payment methods Credit Card and Paypal. For compatibility reasons with existing solutions, however, JustOn Billing & Invoice Management still supports the template fields Payment Info Credit Card and Payment Info PayPal when using the deprecated payment methods Credit Card and Paypal.

To edit the payment info text blocks:

  1. Open the template to be edited.
  2. In the Payment Information section, double-click the Payment Info Online Payment, Payment Info Direct Debit, Payment Info Credit Transfer or Payment Info Bank Transfer field and specify the information as required.

    Alternatively, you can click Edit in the detail view and edit all fields at once.

    To ask your customer to transfer the payable amount in the next two weeks, you use the field Payment Info Bank Transfer specifying, for example, the following text:

    Please transfer [Balance] within 14 days.
    
  3. Click Save.

For details on including QR codes, see Displaying QR Codes.

Info

Template text blocks can contain

  • plain text
  • placeholders
  • HTML code for tables, lists and links

If you use HTML code in template text blocks, make sure to write all code in a single line to avoid line breaks being converted to <br/> tags.

Adjusting Invoice Formatting

The invoice template defines display formats for date and time display as well as currency and number display.

Field Description
Use Unicode Font (checkbox) Specifies whether to use the font Arial Unicode MS for the text rendering, which allows for printing virtually any character of any language.
Using the Unicode font impedes bold and italic text formatting.
Date Format Specifies the format for all date fields of the invoice.
For details about supported date and time formats, refer to the Simple Date Format syntax in the Java Documentation.
Month Format Specifies the format for the [LastMonth], [CurrentMonth] and [NextMonth] placeholders.
Time Format Specifies the format for displaying time values.
To correctly display values of custom date/time fields, you may have to add an appropriate pattern string to the value picklist (see How to control the date/time field display on the PDF?).
For details about supported date and time formats, refer to the Simple Date Format syntax in the Java Documentation.
Leading Currency (checkbox) Controls whether the currency sign (like $ or €) is displayed before (checked) or after (unchecked) the value.
Decimal Separator Specifies the decimal separator for all number fields like currency values or percentage values.
Grouping Separator Specifies the grouping separator for all number fields like currency values.

Note

Selecting or changing the template language does not modify the (region-specific) formatting settings.

Depending on your organization's localization requirements, you must adjust the display of date, time, currency or number values. To do so:

  1. Open the template to be edited.
  2. Click Edit.
  3. In the Formatting section, modify the fields as required.
  4. Click Save.

Info

If you send email with non-Latin data, like the Euro symbol, Hebrew, Chinese, Japanese, Russian, etc., set your email encoding to Unicode (UTF-8). For details, see Why do emails contain garbage characters?.

Usually, your organization has defined a layout model for printed documents. As this model most certainly includes a company logo, you have to add an image file and configure its display when customizing your template.

Info

When attaching an image file as your organization's logo, consider that the recommended file format is PNG and that the file size should not exceed 30 kB in order to keep the resulting PDF file size manageable.

Adding Image File

You can add image files to your template. As of JustOn 2.58, images are loaded from Salesforce Files.

Note

This operation requires the custom Type field (ONB2__Type__c) to be available on the page layout of the Content Version object. For details about adding fields to page layouts, see Modifying Page Layouts or Search Layouts.

  1. Open the template to be edited.
  2. In the Notes & Attachments area, click to open the action menu, then select Upload Files.
  3. Select the intended file using your browser's file selection dialog.

    This uploads the selected file.

  4. Click Done.

    This displays the uploaded file in the Notes & Attachments area.

  5. Open the Details page of the uploaded file.

    From the Preview, click to open the action menu, then select View File Details.

    From the Notes & Attachments list, click next to the file record, then select View File Details.

  6. Open the Details sub-tab.

  7. Double-click the Type field, then select Template Logo.

    The picklist value Template Logo may not be available in your org. In this case, add it to the value picklist for the Type field of the Content Version object. For details, see Modifying Picklist Values.

  8. Click Save.

    Invoice PDF files generated from the current template will now include the selected image file as the logo.

Handling Multiple Images

You can add multiple image files as attachments to your template. There are two ways to specify the image attachment to be used as the company logo:

  • JustOn uses the first image file found as the logo. Available image files must be of the type Template Logo.
  • Use the placeholder [img|byid:<CONTENTDOCUMENTID>] in the header text (see Populating Required Template Fields). Replace <CONTENTDOCUMENTID> with the Salesforce record ID of the image file. Find the file record ID in the URL of the file's Details page.

    Using this placeholder allows for including other image file attachments in other text fields, if necessary.

Configuring Image Display

Generally, the layout, styling, positioning of the template building blocks is controlled using CSS, see Template CSS.

By default, the company logo is rendered unscaled on top of the page and aligned with the left margin. Depending on your organization's requirements, you must adjust the image display, like changing the display size or aligning the image with the right margin.

To adjust the image display, you have to provide custom CSS rules. To do so:

  1. Open the template to be edited.
  2. In the Layout & Design section, double-click the Custom CSS field and specify the CSS code as required.

    Following the mentioned examples, you can use this CSS to resize the image:

    • Using a percentage value:
      .logo {width: 60%}
      
    • Using an absolute value:
      .logo {width: 3cm}
      

    To align the image, you can use this CSS:

    • Aligning the logo with the right margin:
      .c1 .block_0 {
          width: 100%;
          text-align: right;
      }
      
    • Centering the logo:
      .c1 .block_0 {
          width: 100%;
          text-align: center;
      }
      
  3. Click Save.

Modifying Invoice Email

In addition to the fields that are printed to the PDF, the invoice template also includes texts for the email that JustOn can send to distribute the rendered PDF documents (see Distributing Invoices). These fields include:

Template Section Field Description
Email Text PDF Name Specifies the name for the generated PDF file. It can contain placeholders, the default is [InvoiceDate]_[InvoiceNo]_[AccountName].pdf. The allowed characters include the alphanumeric characters a-z A-Z 0-9 as well as the underscore _ and hyphen - characters.
Attach Files To Outgoing Email (checkbox) Controls whether attached files are included in any outgoing email.
Email File Types Defines which file types will be attached to emails (comma separated list of file extensions). For example, pdf,csv sends all PDF and CSV files; if empty (default), all files files are attached except for transaction table HTMLs.
Email Sender Defines an email sender address, must be available as an organization-wide email address.
Takes precedence over the email sender address set on the business entity.
Email Subject Defines the default email subject. Can include placeholders, like Invoice: [InvoiceNo] (default).
Email Body Defines the plain text (or HTML source code) body for the email. Can include placeholders, and line breaks are considered.
Make sure that the email text includes the placeholder [PaymentPageURL|no-persist] for the recipients to be able to access the payment page of JustOn Cash Management.
Email HTML Body Defines a rich HTML body text for the email. The editing area of this field includes an inline HTML editor.
Must not include HTML source code. If you want to use HTML source code for preparing the email body, you use the field Email Body.
Make sure that the email text includes the placeholder [PaymentPageURL|no-persist] for the recipients to be able to access the payment page of JustOn Cash Management.

Note

Be aware of the following specifics:

  • Email Body is ignored if there is content in Email HTML Body.
  • You must use either Email Body or Email HTML Body in both the template and its associated template details.
  • Email HTML Body must not include HTML source code. If you want to use HTML source code for preparing the email body, you use the field Email Body.

Info

If you send email with non-Latin data, like the Euro symbol, Hebrew, Chinese, Japanese, Russian, etc., set your email encoding to Unicode (UTF-8). For details, see Why do PDF files or emails contain garbage characters?

If you specify a company signature in the email body, consider disabling user signatures. For details, see Why do emails include two signatures?

To edit the email contents:

  1. Open the template or template detail to be edited.
  2. Click Edit.
  3. In the Email Text section, modify the fields as required.
  4. Click Save.

Info

Template text blocks can contain

  • plain text
  • placeholders
  • HTML code for tables, lists and links

If you use HTML code in template text blocks, make sure to write all code in a single line to avoid line breaks being converted to <br/> tags.