Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?xml version="1.0" encoding="UTF-8"?>
- <xsl:stylesheet version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:fo="http://www.w3.org/1999/XSL/Format">
- <xsl:import href="../monthly_invoice.common.xsl"/>
- <xsl:variable name="invoice_in.page" select="/document/pages[@name = 'ingoing_calls_detalization']"/>
- <xsl:variable name="invoice_in.table_content_info">
- <row fo.height="5mm">
- <cell value="Абонент:" fo.font-weight="bold"/>
- <cell value-code="P3" fo.font-weight="bold" fo.number-columns-spanned="2"/>
- </row>
- <row fo.height="5mm">
- <cell value-code="P4" fo.font-weight="bold" fo.number-columns-spanned="3"/>
- </row>
- <row fo.height="5mm">
- <cell value-code="P5" fo.font-weight="bold" fo.number-columns-spanned="3"/>
- </row>
- </xsl:variable>
- <xsl:variable name="P4Length" select="string-length($invoice_in.page/var[@name = 'P4']/text())"/>
- <xsl:variable name="invoice_in.table_content_info_double_height">
- <row fo.height="5mm">
- <cell value="Абонент:" fo.font-weight="bold"/>
- <cell value-code="P3" fo.font-weight="bold" fo.number-columns-spanned="2"/>
- </row>
- <row fo.height="10mm">
- <cell value-code="P4" fo.font-weight="bold" fo.number-columns-spanned="3"/>
- </row>
- <row fo.height="5mm">
- <cell value-code="P5" fo.font-weight="bold" fo.number-columns-spanned="3"/>
- </row>
- </xsl:variable>
- <xsl:template name="table_detail_info_1">
- <xsl:param name="invoice_in_table.page"/>
- <xsl:param name="is_3_colums" select='false'/>
- <xsl:param name="abonent"/>
- <xsl:variable name="invoice_in.table_general_content_info">
- <row fo.font-size="8">
- <xsl:choose>
- <xsl:when test="not($is_3_colums = 'true')">
- <cell value-code="P11"/>
- <cell value-code="P12" fo.text-align="right"/>
- </xsl:when>
- <xsl:otherwise>
- <cell value-code="P12" fo.number-columns-spanned="2"/>
- </xsl:otherwise>
- </xsl:choose>
- <cell value-code="P13" fo.text-align="right"/>
- <cell value-code="P14" fo.text-align="right"/>
- </row>
- </xsl:variable>
- <fo:table table-layout="fixed" width="100%" margin-top="2px">
- <fo:table-column column-width="proportional-column-width(20)"/>
- <fo:table-column column-width="proportional-column-width(18)"/>
- <fo:table-column column-width="proportional-column-width(13)"/>
- <fo:table-column column-width="proportional-column-width(11)"/>
- <fo:table-body>
- <xsl:choose>
- <xsl:when test="$invoice_in_table.page = 'calls'">
- <xsl:for-each select="$abonent/page[@name = 'calls']">
- <xsl:call-template name="common.general_table_filling">
- <xsl:with-param name="content" select="$invoice_in.table_general_content_info"/>
- <xsl:with-param name="source" select="."/>
- </xsl:call-template>
- </xsl:for-each>
- </xsl:when>
- <xsl:when test="$invoice_in_table.page = 'roum-calls'">
- <xsl:for-each select="$abonent/page[@name = 'roum-calls']">
- <xsl:call-template name="common.general_table_filling">
- <xsl:with-param name="content" select="$invoice_in.table_general_content_info"/>
- <xsl:with-param name="source" select="."/>
- </xsl:call-template>
- </xsl:for-each>
- </xsl:when>
- <xsl:when test="$invoice_in_table.page = 'sms'">
- <xsl:for-each select="$abonent/page[@name = 'sms']">
- <xsl:call-template name="common.general_table_filling">
- <xsl:with-param name="content" select="$invoice_in.table_general_content_info"/>
- <xsl:with-param name="source" select="."/>
- </xsl:call-template>
- </xsl:for-each>
- </xsl:when>
- <xsl:when test="$invoice_in_table.page = 'roum-sms'">
- <xsl:for-each select="$abonent/page[@name = 'roum-sms']">
- <xsl:call-template name="common.general_table_filling">
- <xsl:with-param name="content" select="$invoice_in.table_general_content_info"/>
- <xsl:with-param name="source" select="."/>
- </xsl:call-template>
- </xsl:for-each>
- </xsl:when>
- <xsl:when test="$invoice_in_table.page = 'mms'">
- <xsl:for-each select="$abonent/page[@name = 'mms']">
- <xsl:call-template name="common.general_table_filling">
- <xsl:with-param name="content" select="$invoice_in.table_general_content_info"/>
- <xsl:with-param name="source" select="."/>
- </xsl:call-template>
- </xsl:for-each>
- </xsl:when>
- <xsl:when test="$invoice_in_table.page = 'roum-mms'">
- <xsl:for-each select="$abonent/page[@name = 'roum-mms']">
- <xsl:call-template name="common.general_table_filling">
- <xsl:with-param name="content" select="$invoice_in.table_general_content_info"/>
- <xsl:with-param name="source" select="."/>
- </xsl:call-template>
- </xsl:for-each>
- </xsl:when>
- <xsl:when test="$invoice_in_table.page = 'internet'">
- <xsl:for-each select="$abonent/page[@name = 'internet']">
- <xsl:call-template name="common.general_table_filling">
- <xsl:with-param name="content" select="$invoice_in.table_general_content_info"/>
- <xsl:with-param name="source" select="."/>
- </xsl:call-template>
- </xsl:for-each>
- </xsl:when>
- <xsl:when test="$invoice_in_table.page = 'wap'">
- <xsl:for-each select="$abonent/page[@name = 'wap']">
- <xsl:call-template name="common.general_table_filling">
- <xsl:with-param name="content" select="$invoice_in.table_general_content_info"/>
- <xsl:with-param name="source" select="."/>
- </xsl:call-template>
- </xsl:for-each>
- </xsl:when>
- <xsl:when test="$invoice_in_table.page = 'video-calls'">
- <xsl:for-each select="$abonent/page[@name = 'video-calls']">
- <xsl:call-template name="common.general_table_filling">
- <xsl:with-param name="content" select="$invoice_in.table_general_content_info"/>
- <xsl:with-param name="source" select="."/>
- </xsl:call-template>
- </xsl:for-each>
- </xsl:when>
- <xsl:when test="$invoice_in_table.page = 'roum-video-calls'">
- <xsl:for-each select="$abonent/page[@name = 'roum-video-calls']">
- <xsl:call-template name="common.general_table_filling">
- <xsl:with-param name="content" select="$invoice_in.table_general_content_info"/>
- <xsl:with-param name="source" select="."/>
- </xsl:call-template>
- </xsl:for-each>
- </xsl:when>
- <xsl:otherwise>
- <fo:table-row font-size="7">
- <fo:table-cell number-columns-spanned="2" font-weight="bold" display-align="center" text-align="left">
- <fo:block><xsl:value-of select="$invoice_in_table.page"/></fo:block>
- </fo:table-cell>
- <fo:table-cell text-align="right" font-weight="bold">
- <fo:block><xsl:value-of select="$abonent/var[@name='P15']"/></fo:block>
- </fo:table-cell>
- <fo:table-cell text-align="right" font-weight="bold">
- <fo:block><xsl:value-of select="$abonent/var[@name='P16']"/></fo:block>
- </fo:table-cell>
- </fo:table-row>
- </xsl:otherwise>
- </xsl:choose>
- </fo:table-body>
- </fo:table>
- </xsl:template>
- <xsl:template name="table_detail_info">
- <xsl:param name="first_row"/>
- <xsl:param name="first_column"/>
- <xsl:param name="second_column"/>
- <xsl:param name="third_column"/>
- <xsl:param name="fourth_column"/>
- <fo:table table-layout="fixed" width="100%" margin-top="2px">
- <fo:table-column column-width="proportional-column-width(20)"/>
- <fo:table-column column-width="proportional-column-width(18)"/>
- <fo:table-column column-width="proportional-column-width(18)"/>
- <fo:table-column column-width="proportional-column-width(11)"/>
- <fo:table-body>
- <fo:table-row>
- <fo:table-cell number-columns-spanned="4">
- <fo:block font-size="8" height="10mm" font-weight="bold"><xsl:value-of select="$first_row"/></fo:block>
- </fo:table-cell>
- </fo:table-row>
- <fo:table-row font-size="6" >
- <fo:table-cell font-weight="bold" text-align="left">
- <fo:block><xsl:value-of select="$first_column"/></fo:block>
- </fo:table-cell>
- <fo:table-cell font-weight="bold" text-align="right">
- <fo:block><xsl:value-of select="$second_column"/></fo:block>
- </fo:table-cell>
- <fo:table-cell font-weight="bold" text-align="right">
- <fo:block><xsl:value-of select="$third_column"/></fo:block>
- </fo:table-cell>
- <fo:table-cell font-weight="bold" text-align="right">
- <fo:block><xsl:value-of select="$fourth_column"/></fo:block>
- </fo:table-cell>
- </fo:table-row>
- <fo:table-row>
- <fo:table-cell border-top="black solid 0.1px" number-columns-spanned="4"><fo:block/></fo:table-cell>
- </fo:table-row>
- </fo:table-body>
- </fo:table>
- </xsl:template>
- <xsl:template name="invoice_1_2_before">
- <xsl:if test="$invoice_in.page/var[@name = 'P1']">
- <!-- Title -->
- <xsl:call-template name="common.life_logo"></xsl:call-template>
- <fo:block font-size="13" text-align="center" font-weight="bold" margin-bottom="7px" margin-top="7mm">
- Детализация входящих вызовов
- </fo:block>
- <fo:block text-align="center" margin-bottom="7px" font-size="9">
- за расчетный период с <xsl:value-of select="$invoice_in.page/var[@name = 'P8']"/>г. по <xsl:value-of select="$invoice_in.page/var[@name = 'P9']"/>
- </fo:block>
- <fo:block font-size="9" text-align="center" margin-bottom="10px" font-weight="bold">
- Договор оказания услуг электросвязи стандарта GSM 900/1800 №<xsl:value-of select="$invoice_in.page/var[@name = 'P1']"/>г. от <xsl:value-of select="$invoice_in.page/var[@name = 'P2']"/>г.
- </fo:block>
- <!-- Header. Signature -->
- <fo:table table-layout="fixed" width="100%" margin-top="10px">
- <fo:table-column column-width="proportional-column-width(10)"/>
- <fo:table-column column-width="proportional-column-width(30)"/>
- <fo:table-column column-width="proportional-column-width(50)"/>
- <fo:table-body>
- <!-- <xsl:call-template name="common.general_table_filling">
- <xsl:with-param name="content" select="$invoice_in.table_content_info"/>
- <xsl:with-param name="source" select="$invoice_in.page"/>
- </xsl:call-template> -->
- <xsl:choose>
- <xsl:when test="$P4Length>'80'">
- <xsl:call-template name="common.general_table_filling">
- <xsl:with-param name="content" select="$invoice_in.table_content_info_double_height"/>
- <xsl:with-param name="source" select="$invoice_in.page"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:otherwise>
- <xsl:call-template name="common.general_table_filling">
- <xsl:with-param name="content" select="$invoice_in.table_content_info"/>
- <xsl:with-param name="source" select="$invoice_in.page"/>
- </xsl:call-template>
- </xsl:otherwise>
- </xsl:choose>
- </fo:table-body>
- </fo:table>
- </xsl:if>
- </xsl:template>
- <!-- Invoice page 1 template -->
- <xsl:template name="invoice_1_2">
- <xsl:choose>
- <xsl:when test="$P4Length>'80'">
- <fo:block padding-top="5mm"></fo:block>
- </xsl:when>
- <xsl:otherwise>
- <fo:block></fo:block>
- </xsl:otherwise>
- </xsl:choose>
- <xsl:for-each select="/document/pages[@name = 'ingoing_calls_detalization']/pages[@name = 'ingoing_calls_detalization_line']">
- <fo:table table-layout="fixed" width="100%" margin-bottom="8px">
- <fo:table-column column-width="proportional-column-width(47)"/>
- <fo:table-column column-width="proportional-column-width(53)"/>
- <fo:table-body>
- <fo:table-row height="2mm" border-bottom="black solid 1px"><fo:table-cell number-columns-spanned="2"><fo:block/></fo:table-cell></fo:table-row>
- <fo:table-row>
- <fo:table-cell number-columns-spanned="2">
- <fo:block font-size="10" text-decoration="underline" font-weight="bold">Абонентский номер: <xsl:value-of select="./var[@name='P10']"/>
- </fo:block>
- </fo:table-cell>
- </fo:table-row>
- <!-- <fo:table-row>
- <fo:table-cell>
- <fo:block font-size="10" font-weight="bold" text-decoration="underline">
- <xsl:value-of select="./var[@name='P10']"></xsl:value-of>
- </fo:block>
- </fo:table-cell>
- </fo:table-row> -->
- </fo:table-body>
- </fo:table>
- <xsl:if test="./page[@name = 'calls']">
- <!-- Detail table about in CALL -->
- <xsl:call-template name="table_detail_info">
- <xsl:with-param name="first_row">Сведения о входящих вызовах</xsl:with-param>
- <xsl:with-param name="first_column">Номер телефона</xsl:with-param>
- <xsl:with-param name="second_column">Дата, время</xsl:with-param>
- <xsl:with-param name="third_column">Длительность</xsl:with-param>
- <xsl:with-param name="fourth_column">Стоимость</xsl:with-param>
- </xsl:call-template>
- <xsl:call-template name="table_detail_info_1">
- <xsl:with-param name="invoice_in_table.page">calls</xsl:with-param>
- <xsl:with-param name="abonent" select="."/>
- </xsl:call-template>
- <xsl:call-template name="table_detail_info_1">
- <xsl:with-param name="invoice_in_table.page">Итого за входящие вызовы</xsl:with-param>
- <xsl:with-param name="abonent" select="./page[@name = 'calls_itogo']"/>
- </xsl:call-template>
- </xsl:if>
- <xsl:if test="./page[@name = 'roum-calls']">
- <!-- Detail table about in ROUM-CALL -->
- <xsl:call-template name="table_detail_info">
- <xsl:with-param name="first_row">Сведения о входящих вызовах в роуминге*</xsl:with-param>
- <xsl:with-param name="first_column">Номер телефона</xsl:with-param>
- <xsl:with-param name="second_column">Дата, время</xsl:with-param>
- <xsl:with-param name="third_column">Длительность</xsl:with-param>
- <xsl:with-param name="fourth_column">Стоимость</xsl:with-param>
- </xsl:call-template>
- <xsl:call-template name="table_detail_info_1">
- <xsl:with-param name="invoice_in_table.page">roum-calls</xsl:with-param>
- <xsl:with-param name="abonent" select="."/>
- </xsl:call-template>
- <xsl:call-template name="table_detail_info_1">
- <xsl:with-param name="invoice_in_table.page">Итого за входящие вызовы в роуминге*</xsl:with-param>
- <xsl:with-param name="abonent" select="./page[@name = 'roum-calls_itogo']"/>
- </xsl:call-template>
- </xsl:if>
- <xsl:if test="./page[@name = 'video-calls']">
- <!-- Detail table about in video-calls -->
- <xsl:call-template name="table_detail_info">
- <xsl:with-param name="first_row">Сведения о входящих видео-вызовах</xsl:with-param>
- <xsl:with-param name="first_column">Номер телефона</xsl:with-param>
- <xsl:with-param name="second_column">Дата, время</xsl:with-param>
- <xsl:with-param name="third_column">Кол-во</xsl:with-param>
- <xsl:with-param name="fourth_column">Стоимость</xsl:with-param>
- </xsl:call-template>
- <xsl:call-template name="table_detail_info_1">
- <xsl:with-param name="invoice_in_table.page">video-calls</xsl:with-param>
- <xsl:with-param name="abonent" select="."/>
- </xsl:call-template>
- <xsl:call-template name="table_detail_info_1">
- <xsl:with-param name="invoice_in_table.page">Итого за входящие видео-вызовы</xsl:with-param>
- <xsl:with-param name="abonent" select="./page[@name = 'video-calls_itogo']"/>
- </xsl:call-template>
- </xsl:if>
- <xsl:if test="./page[@name = 'sms']">
- <!-- Detail table about in SMS -->
- <xsl:call-template name="table_detail_info">
- <xsl:with-param name="first_row">Сведения о входящих SMS</xsl:with-param>
- <xsl:with-param name="first_column">Номер телефона</xsl:with-param>
- <xsl:with-param name="second_column">Дата, время</xsl:with-param>
- <xsl:with-param name="third_column">Кол-во</xsl:with-param>
- <xsl:with-param name="fourth_column">Стоимость</xsl:with-param>
- </xsl:call-template>
- <xsl:call-template name="table_detail_info_1">
- <xsl:with-param name="invoice_in_table.page">sms</xsl:with-param>
- <xsl:with-param name="abonent" select="."/>
- </xsl:call-template>
- <xsl:call-template name="table_detail_info_1">
- <xsl:with-param name="invoice_in_table.page">Итого за входящие SMS</xsl:with-param>
- <xsl:with-param name="abonent" select="./page[@name = 'sms_itogo']"/>
- </xsl:call-template>
- </xsl:if>
- <xsl:if test="./page[@name = 'roum-sms']">
- <!-- Detail table about in ROUM-SMS -->
- <xsl:call-template name="table_detail_info">
- <xsl:with-param name="first_row">Сведения о входящих SMS в роуминге*</xsl:with-param>
- <xsl:with-param name="first_column">Номер телефона</xsl:with-param>
- <xsl:with-param name="second_column">Дата, время</xsl:with-param>
- <xsl:with-param name="third_column">Кол-во</xsl:with-param>
- <xsl:with-param name="fourth_column">Стоимость</xsl:with-param>
- </xsl:call-template>
- <xsl:call-template name="table_detail_info_1">
- <xsl:with-param name="invoice_in_table.page">roum-sms</xsl:with-param>
- <xsl:with-param name="abonent" select="."/>
- </xsl:call-template>
- <xsl:call-template name="table_detail_info_1">
- <xsl:with-param name="invoice_in_table.page">Итого за входящие SMS в роуминге*</xsl:with-param>
- <xsl:with-param name="abonent" select="./page[@name = 'roum-sms_itogo']"/>
- </xsl:call-template>
- </xsl:if>
- <xsl:if test="./page[@name = 'mms']">
- <!-- Detail table about in MMS -->
- <xsl:call-template name="table_detail_info">
- <xsl:with-param name="first_row">Сведения об входящих MMS</xsl:with-param>
- <xsl:with-param name="first_column">Номер телефона</xsl:with-param>
- <xsl:with-param name="second_column">Дата, время</xsl:with-param>
- <xsl:with-param name="third_column">Кол-во</xsl:with-param>
- <xsl:with-param name="fourth_column">Стоимость</xsl:with-param>
- </xsl:call-template>
- <xsl:call-template name="table_detail_info_1">
- <xsl:with-param name="invoice_in_table.page">mms</xsl:with-param>
- <xsl:with-param name="abonent" select="."/>
- </xsl:call-template>
- <xsl:call-template name="table_detail_info_1">
- <xsl:with-param name="invoice_in_table.page">Итого за входящие MMS</xsl:with-param>
- <xsl:with-param name="abonent" select="./page[@name = 'mms_itogo']"/>
- </xsl:call-template>
- </xsl:if>
- <xsl:if test="./page[@name = 'roum-mms']">
- <!-- Detail table about in ROUM-MMS -->
- <xsl:call-template name="table_detail_info">
- <xsl:with-param name="first_row">Сведения об входящих MMS в роуминге*</xsl:with-param>
- <xsl:with-param name="first_column">Номер телефона</xsl:with-param>
- <xsl:with-param name="second_column">Дата, время</xsl:with-param>
- <xsl:with-param name="third_column">Кол-во</xsl:with-param>
- <xsl:with-param name="fourth_column">Стоимость</xsl:with-param>
- </xsl:call-template>
- <xsl:call-template name="table_detail_info_1">
- <xsl:with-param name="invoice_in_table.page">roum-mms</xsl:with-param>
- <xsl:with-param name="abonent" select="."/>
- </xsl:call-template>
- <xsl:call-template name="table_detail_info_1">
- <xsl:with-param name="invoice_in_table.page">Итого за входящие MMS в роуминге*</xsl:with-param>
- <xsl:with-param name="abonent" select="./page[@name = 'roum-mms_itogo']"/>
- </xsl:call-template>
- </xsl:if>
- <!-- Detail table about in Internet -->
- <xsl:if test="./page[@name = 'internet']">
- <xsl:call-template name="table_detail_info">
- <xsl:with-param name="first_row">Интернет-трафик</xsl:with-param>
- <xsl:with-param name="first_column">Дата, время</xsl:with-param>
- <xsl:with-param name="third_column">Объем</xsl:with-param>
- <xsl:with-param name="fourth_column">Стоимость</xsl:with-param>
- </xsl:call-template>
- <xsl:call-template name="table_detail_info_1">
- <xsl:with-param name="invoice_in_table.page">internet</xsl:with-param>
- <xsl:with-param name="is_3_colums">true</xsl:with-param>
- <xsl:with-param name="abonent" select="."/>
- </xsl:call-template>
- <xsl:call-template name="table_detail_info_1">
- <xsl:with-param name="invoice_in_table.page">Итого Интернет-трафик</xsl:with-param>
- <xsl:with-param name="is_3_colums">true</xsl:with-param>
- <xsl:with-param name="abonent" select="./page[@name = 'internet_itogo']"/>
- </xsl:call-template>
- </xsl:if>
- <xsl:if test="./page[@name = 'wap']">
- <!-- Detail table about in WAP -->
- <xsl:call-template name="table_detail_info">
- <xsl:with-param name="first_row">WAP-трафик</xsl:with-param>
- <xsl:with-param name="first_column">Дата, время</xsl:with-param>
- <xsl:with-param name="third_column">Объем</xsl:with-param>
- <xsl:with-param name="fourth_column">Стоимость</xsl:with-param>
- </xsl:call-template>
- <xsl:call-template name="table_detail_info_1">
- <xsl:with-param name="invoice_in_table.page">wap</xsl:with-param>
- <xsl:with-param name="abonent" select="."/>
- <xsl:with-param name="is_3_colums">true</xsl:with-param>
- </xsl:call-template>
- <xsl:call-template name="table_detail_info_1">
- <xsl:with-param name="invoice_in_table.page">Итого WAP-трафик</xsl:with-param>
- <xsl:with-param name="is_3_colums">true</xsl:with-param>
- <xsl:with-param name="abonent" select="./page[@name = 'wap_itogo']"/>
- </xsl:call-template>
- </xsl:if>
- <xsl:if test="./page[@name = 'roum-video-calls']">
- <!-- Detail table about in roum-video-calls -->
- <xsl:call-template name="table_detail_info">
- <xsl:with-param name="first_row">Сведения о входящих видео-вызовах</xsl:with-param>
- <xsl:with-param name="first_column">Номер телефона</xsl:with-param>
- <xsl:with-param name="second_column">Дата, время</xsl:with-param>
- <xsl:with-param name="third_column">Длительность</xsl:with-param>
- <xsl:with-param name="fourth_column">Стоимость</xsl:with-param>
- </xsl:call-template>
- <xsl:call-template name="table_detail_info_1">
- <xsl:with-param name="invoice_in_table.page">roum-video-calls</xsl:with-param>
- <xsl:with-param name="abonent" select="."/>
- </xsl:call-template>
- <xsl:call-template name="table_detail_info_1">
- <xsl:with-param name="invoice_in_table.page">Итого за входящие видео-вызовы</xsl:with-param>
- <xsl:with-param name="abonent" select="./page[@name = 'roum-video-calls_itogo']"/>
- </xsl:call-template>
- </xsl:if>
- </xsl:for-each>
- </xsl:template>
- </xsl:stylesheet>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement