BILLmanager uses default service names in payments, invoices, and expenses. The names are based on XSLT-tempates from the /usr/local/mgr5/etc/xslt/ directory:
- itemname_certificate.xsl — "SSL certificate";
- itemname_dedic.xsl — "Dedicated server";
- itemname_domain.xsl — "Domain names";
- itemname_soft.xsl — "ISPsystem licenses";
- itemname_vds.xsl — "VPS";
- itemname_vhost.xsl — "Shared hosting";
- itemname.xsl — custom services.
To change a service name, create a custom template in the service type configuration form. The template will be used instead of the default one.
How to create a template
- Go to Products → Service types → Edit.
- Enter the text of the Service name template and click on Ok.
- If you see an error message, correct the template text and click on Ok again.
How to add a template
Information for templates
When a client orders a service, BILLmanager creates an XML-file with detailed information about that service. Use the data from this XML-file for the XSLT-template. You can specify the XML-file in the BILLmanager log /usr/local/mgr5/var/billmgr.log. To do so, set the maximum log level for the module "Additional functions": Settings → Logging settings → Additional functions (billmgr.util) → the button Maximum.
How to change the name of a previously created service
The new service naming template will only be applied to expenses that were created after the template was modified.
To bring the names of existing services in line with the template, execute the command:
/usr/local/mgr5/sbin/mgrctl -m billmgr fix.expensename fromdate=2022-04-10 todate=2022-10-25
Examples of templates
How to add the start and end date for "Shared hosting"
Create the template:
<?xml version='1.0' encoding='UTF-8'?>
<xsl:stylesheet version='1.0' xmlns:xsl='http://www.w3.org/1999/XSL/Transform' xmlns:mgr="http://ispsystem.com/xslplugin">
<xsl:output method='text' encoding='UTF-8' doctype-public="-W3CDTD HTML 4.01 Transitional//EN"/>
<xsl:template match="doc">
<xsl:value-of select="messages/hostingservice"/> - <xsl:value-of select="item/id"/> ( <xsl:value-of select="/doc/operation/param[@name='fromdate']"/> - <xsl:value-of select="/doc/operation/param[@name='todate']"/> ) for <xsl:value-of select="messages/period_number"/> </xsl:template>
</xsl:stylesheet>
How to change the phrase "Telematic services" in the service name "Shared hosting"
Use the text of the template itemname_vds.xsl and change the following section into "Shared hosting':
<xsl:value-of select="messages/telematic"/>
How to delete the phrase "Additional services" in the service name "Domain names"
Use the text of the template itemname_domain.xsl and delete the section:
<xsl:when test="is_addon = 'yes'"><xsl:value-of select="messages/addon"/><xsl:text> </xsl:text>