тама немного по другому получается не то что в топе выше
что бы правельно все прописью писалось
Код:
Итого к оплате:
<xsl:variable name="x" select="number(@total_sum + $total_nds)" />
<xsl:variable name="xsum" select="format-number($x,'0.00')" />
<xsl:value-of select="st:summaToString($xsum)" />
<xsl:variable name="xnds" select="format-number($total_nds,'0.00')" />
, в том числе ндс 18% - <xsl:value-of select="number($xnds)" />
Код:
<!-- начало цикл pay -->
<xsl:for-each select="pos">
<xsl:variable name="nds" select="number((@summ * ($nds_rate div 100))div($nds_rate div 100 + 1))" />
<fo:table-row>
<fo:table-cell xsl:use-attribute-sets="cell_border">
<fo:block xsl:use-attribute-sets="table_text_center"><xsl:value-of select="position()"/></fo:block>
</fo:table-cell>
<fo:table-cell xsl:use-attribute-sets="cell_border">
<fo:block xsl:use-attribute-sets="table_text_left"><xsl:value-of select="@name"/></fo:block>
</fo:table-cell>
<fo:table-cell xsl:use-attribute-sets="cell_border">
<fo:block xsl:use-attribute-sets="table_text_center">месяц</fo:block>
</fo:table-cell>
<fo:table-cell xsl:use-attribute-sets="cell_border">
<fo:block xsl:use-attribute-sets="table_text_center">1</fo:block>
</fo:table-cell>
<fo:table-cell xsl:use-attribute-sets="cell_border">
<fo:block xsl:use-attribute-sets="table_text_right"><xsl:value-of select="format-number(@summ , '0.00')"/></fo:block>
</fo:table-cell>
<fo:table-cell xsl:use-attribute-sets="cell_border">
<fo:block xsl:use-attribute-sets="table_text_right"><xsl:value-of select="format-number(@summ , '0.00')"/></fo:block>
</fo:table-cell>
<fo:table-cell xsl:use-attribute-sets="cell_border">
<fo:block xsl:use-attribute-sets="table_text_right"><xsl:value-of select="format-number($nds, '0.00')"/></fo:block>
</fo:table-cell>
<fo:table-cell xsl:use-attribute-sets="cell_border">
<fo:block xsl:use-attribute-sets="table_text_right"><xsl:value-of select="format-number(@summ + $nds, '0.00')"/></fo:block>
</fo:table-cell>
</fo:table-row>
</xsl:for-each>
<!-- конец цикл pos -->
<!-- итого -->
<fo:table-row>
<fo:table-cell></fo:table-cell>
<fo:table-cell></fo:table-cell>
<fo:table-cell>
<fo:block xsl:use-attribute-sets="table_text_center">Итого:</fo:block>
</fo:table-cell>
<fo:table-cell></fo:table-cell>
<fo:table-cell></fo:table-cell>
<fo:table-cell xsl:use-attribute-sets="cell_border">
<fo:block xsl:use-attribute-sets="table_text_right"><xsl:value-of select="format-number(@total_sum , '0.00')"/></fo:block>
</fo:table-cell>
<fo:table-cell xsl:use-attribute-sets="cell_border">
<fo:block xsl:use-attribute-sets="table_text_right"><xsl:value-of select="format-number($total_nds, '0.00')"/></fo:block>
</fo:table-cell>
<fo:table-cell xsl:use-attribute-sets="cell_border">
<fo:block xsl:use-attribute-sets="table_text_right"><xsl:value-of select="format-number(@total_sum + $total_nds, '0.00')"/></fo:block>
</fo:table-cell>
</fo:table-row>
<!-- итого -->
вот так все работает как надо
