Every financial operation in BILLmanager, the billing system generates an electronic document which contains information about the operation and company data.
BILLmanager can generate the following documents:
- contracts;
- envelopes;
- invoices;
- acts of delivery and acceptance;
- service agreements.
The system generates documents automatically when a user clicks the Print button. A printing form of a document is based on EJS-templates. The system performs the following operations to generate a printing form of a document:
- Generates an XML-file (a source file) when you click Print a document.
- Generates a list of available document templates.
- Applies a base printing template. The base template defines text formatting parameters that will be applied to the document (defines the formatting styles).
- Applies the resulting document template.
Navigate to Settings → Document templates. If a base template is not present, the billing system will apply a standard base template.
Source file
A source code is an XML-file with information that will be used when printing a document. To view the source file, open the printing form of the document and in the address bar change the output format using the out parameter:
- "out=doc_print" — a printing form of a document;
- "out=xml" — source XML-file.
E.g., you can open the printing form by this URL:
https://domain.com/billmgr?func=payment.print&elid=20&plid=&out=doc_print
Therefore, the source XML-file will be accessible at:
https://domain.com/billmgr?func=payment.print&elid=20&plid=&out=xml
Logging
Source data for the document can be stored in the billing system log file /usr/local/mgr5/var/billmgr.log. To do so, set the maximum logging level for the module "Document flow (billmgr.docflow)": Settings → Logging settings → select Document flow ( (billmgr.docflow) → Maximum.