Стандартные шаблоны наименований услуг и расходов за услуги расположены в директории /usr/local/mgr5/etc/xslt/, для изменения шаблона наименований расходов виртуального хостинга вы можете либо изменить стандартный шаблон /usr/local/mgr5/etc/xslt/itemname_vhost.xsl :
В нем содержится блок
<xsl:when test="operation/param[@name='createexpense'] = 'yes'"> <xsl:value-of select="messages/telematic"/> - </xsl:when> </xsl:choose> <xsl:value-of select="pricelist/locale_name"/> #<xsl:value-of select='item/id'/> <xsl:choose>
в этом блоке текст «<xsl:value-of select=»messages/telematic»/> — » как раз и производит добавление текста «Телематические услуги — » к наименованию расходов для данного типа продукта. Эту часть шаблона можно удалить, при этом не изменяя остальные тэги. После этого все расходы по данному типу продукта будут формироваться без добавления «Телематические услуги — » в начале.
Либо же можно в меню Продукты — Типы продуктов — Изменить — в поле Шаблон наименования услуги — скопировать весь текст из файла /usr/local/mgr5/etc/xslt/itemname_vhost.xsl, удалив в нем «<xsl:value-of select=»messages/telematic»/> — »
Добавляем данный текст для услуги Виртуальный хостинг:
<?xml version='1.0'?> <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' omit-xml-declaration='yes'/> <xsl:template match='doc'> <xsl:choose> <xsl:when test="is_addon = 'yes'"><xsl:value-of select="messages/addon"/><xsl:text> </xsl:text> <xsl:choose> <xsl:when test="pricelist/billtype = '10'"> <xsl:value-of select="item/locale_name"/> </xsl:when> <xsl:otherwise> <xsl:choose> <xsl:when test="pricelist/manualname = 'on'"> <xsl:value-of select="pricelist/locale_name"/> </xsl:when> <xsl:otherwise> <xsl:value-of select="itemtype/locale_name"/> </xsl:otherwise> </xsl:choose> <xsl:choose> <xsl:when test="pricelist/addontype = '2'"> - <xsl:choose> <xsl:when test="operation/@name = 'changeaddon'"> <xsl:value-of select="operation/param[@name='newvalue'] - operation/param[@name='oldvalue']"/> </xsl:when> <xsl:when test="operation/@name = 'statdaily'"> <xsl:value-of select="operation/param[@name='statvalue']"/> </xsl:when> <xsl:when test="pricelist/billtype = '3'"> <xsl:choose> <xsl:when test="item/addonlimit = ''"> <xsl:value-of select="pricelist/addonlimit"/> </xsl:when> <xsl:otherwise> <xsl:value-of select="item/addonlimit"/> </xsl:otherwise> </xsl:choose> </xsl:when> <xsl:otherwise> <xsl:value-of select="item/intvalue"/> </xsl:otherwise> </xsl:choose> <xsl:text> </xsl:text><xsl:value-of select="measure/locale_name"/> </xsl:when> <xsl:when test="pricelist/addontype = '3'"> - <xsl:choose> <xsl:when test="pricelist/billtype = '3'"> <xsl:value-of select="enumeration/locale_name"/> </xsl:when> <xsl:otherwise> <xsl:value-of select="enumerationitem/locale_name"/> </xsl:otherwise> </xsl:choose> </xsl:when> </xsl:choose> </xsl:otherwise> </xsl:choose> (<xsl:value-of select="parent/pricelist/locale_name"/> #<xsl:value-of select='parent/item/id'/>)</xsl:when> <xsl:otherwise> <xsl:choose> <xsl:when test="operation/param[@name='createexpense'] = 'yes'"> <xsl:value-of select="messages/telematic1"/></xsl:when> </xsl:choose> <xsl:value-of select="pricelist/locale_name"/> #<xsl:value-of select='item/id'/> <xsl:choose> <xsl:when test="operation/@name='suspendpenalty'"> <xsl:text>, </xsl:text><xsl:value-of select="messages/suspendpenalty"/> </xsl:when> <xsl:when test="operation/param[@name='createexpense'] = 'yes' and pricelist/billdaily='off'"> <xsl:text>, </xsl:text> <xsl:value-of select="messages/period_number"/> </xsl:when> </xsl:choose> </xsl:otherwise> </xsl:choose> <xsl:if test="/doc/is_setup = 'yes'"><xsl:text> - </xsl:text><xsl:value-of select="/doc/messages/setup"/></xsl:if> </xsl:template> </xsl:stylesheet>
Добавляем данный текст для услуги Виртуальный сервер:
<?xml version='1.0'?> <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' omit-xml-declaration='yes'/> <xsl:template match='doc'> <xsl:choose> <xsl:when test="is_addon = 'yes'"><xsl:value-of select="messages/addon"/><xsl:text> </xsl:text> <xsl:choose> <xsl:when test="pricelist/billtype = '10'"> <xsl:value-of select="item/locale_name"/> </xsl:when> <xsl:otherwise> <xsl:choose> <xsl:when test="pricelist/manualname = 'on'"> <xsl:value-of select="pricelist/locale_name"/> </xsl:when> <xsl:otherwise> <xsl:value-of select="itemtype/locale_name"/> </xsl:otherwise> </xsl:choose> <xsl:choose> <xsl:when test="pricelist/addontype = '2'"> - <xsl:choose> <xsl:when test="operation/@name = 'changeaddon'"> <xsl:value-of select="operation/param[@name='newvalue'] - operation/param[@name='oldvalue']"/> </xsl:when> <xsl:when test="operation/@name = 'statdaily'"> <xsl:value-of select="operation/param[@name='statvalue']"/> </xsl:when> <xsl:when test="pricelist/billtype = '3'"> <xsl:choose> <xsl:when test="item/addonlimit = ''"> <xsl:value-of select="pricelist/addonlimit"/> </xsl:when> <xsl:otherwise> <xsl:value-of select="item/addonlimit"/> </xsl:otherwise> </xsl:choose> </xsl:when> <xsl:otherwise> <xsl:value-of select="item/intvalue"/> </xsl:otherwise> </xsl:choose> <xsl:text> </xsl:text><xsl:value-of select="measure/locale_name"/> </xsl:when> <xsl:when test="pricelist/addontype = '3'"> - <xsl:choose> <xsl:when test="pricelist/billtype = '3'"> <xsl:value-of select="enumeration/locale_name"/> </xsl:when> <xsl:otherwise> <xsl:value-of select="enumerationitem/locale_name"/> </xsl:otherwise> </xsl:choose> </xsl:when> </xsl:choose> </xsl:otherwise> </xsl:choose> (<xsl:value-of select="parent/pricelist/locale_name"/> #<xsl:value-of select='parent/item/id'/>)</xsl:when> <xsl:otherwise> <xsl:choose> <xsl:when test="operation/param[@name='createexpense'] = 'yes'"> <xsl:value-of select="messages/telematic1"/></xsl:when> </xsl:choose> <xsl:value-of select="pricelist/locale_name"/> #<xsl:value-of select='item/id'/> <xsl:choose> <xsl:when test="(item/domain or item/ip) and (item/domain!='' or item/ip!='')"> (<xsl:value-of select='item/ip'/> <xsl:choose> <xsl:when test="item/domain and item/ip and item/domain!='' and item/ip!=''">, </xsl:when> </xsl:choose> <xsl:value-of select='item/domain'/>) </xsl:when> </xsl:choose> <xsl:choose> <xsl:when test="operation/@name='suspendpenalty'"> <xsl:text>, </xsl:text><xsl:value-of select="messages/suspendpenalty"/> </xsl:when> <xsl:when test="operation/param[@name='createexpense'] = 'yes' and pricelist/billdaily='off'"> <xsl:text>, </xsl:text> <xsl:value-of select="messages/period_number"/> </xsl:when> </xsl:choose> </xsl:otherwise> </xsl:choose> <xsl:if test="/doc/is_setup = 'yes'"><xsl:text> - </xsl:text><xsl:value-of select="/doc/messages/setup"/></xsl:if> </xsl:template> </xsl:stylesheet>