BILLmanager 6
en En
es Es

Document templates

BILLmanager generates an e-document for every financial operation. It contains information about the operations and company data. Document templates show how your real documents will look like.

BILLmanager is able to generate: 

  • Contracts;
  • Invoices.

EJS-template

A document template is an EJS-code that specifies which fields shall be displayed on the form, how to arrange them and what formatting type to select. See also EJS-templates

During the preliminary configuration, we recommend finding document templates and configure them if necessary. To do this, go to the section Settings → Documents templates → select a document template → Edit button.

The template configuration page:

You can see the final version of your document only after the document is already created.

For security reasons, XHR and Fetch queries are prohibited by default:

  • in document templates;
  • in email notification templates. 

If XHR and Fetch requests need to be executed, you can disable the protection mechanisms at your own risk. For more details, see the article Contents EJS-code.

Adding an image

You can add an image to the template. For example, an image of a stamp or signature. To do this, add a line in the necessary place in the template:

<div class="company"><img src="stamp009_4.png" width="270" height="145"/></div>

where stamp009_4.png is the image of the stamp with the signature.

If the stamp and signature are separate images, then such lines should be added according to the number of images. Place the images in the /usr/local/mgr5/skins/userdata/ directory.

Security

Isolating the environment

Starting with version 6.124, templates are generated in an isolated environment to protect against vulnerabilities. When installing or upgrading BILLmanager, the billmanager-plugin-template-processor software package is installed. This package:

  1. Sets up the containerization environment:
    • in Ubuntu — Docker;
    • in AlmaLinux — Podman.
  2. Downloads an image with scripts to safely generate templates.

You can disable the use of the isolated environment. For example, if templates are not formed correctly. To do this:

  1. Add the Option DisableTemplateProcessor to the /usr/local/mgr5/etc/billmgr.conf configuration file. For more information, see the Configuration file article.
  2. Restart the platform: 
    /usr/local/mgr5/sbin/mgrctl -m billmgr -R

Useful tips
The article was last updated on 06.10.2025. The article was prepared by technical writers of ISPsystem.