forum.bitel.ru http://forum.bitel.ru/ |
|
Не выводит цифры после запяой в счет-факт в колонке "ко http://forum.bitel.ru/viewtopic.php?f=14&t=732 |
Страница 1 из 1 |
Автор: | snowman78 [ 05 фев 2008, 15:30 ] |
Заголовок сообщения: | Не выводит цифры после запяой в счет-факт в колонке "ко |
Прилагаю XML-скрин из счета-фактуры. В конфиге Модуля Счетов, в строке Quantity делителем выступет 1. Деление происходит через div. В чем ошибка? <fo:table-row> <fo:table-cell xsl:use-attribute-sets="cell_border"> <fo:block xsl:use-attribute-sets="table_text7_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_text7_center"> <xsl:if test="@unit"> <xsl:value-of select="@unit"/> </xsl:if> <xsl:if test="not(@unit)"> месяц </xsl:if> </fo:block> </fo:table-cell> <fo:table-cell xsl:use-attribute-sets="cell_border"> <fo:block xsl:use-attribute-sets="table_text7_right"><xsl:value-of select="format-number(@quantity div 1024, '0.000')"/> <xsl:if test="@quantity"> <xsl:value-of select="@quantity"/> </xsl:if> <xsl:if test="not(@quantity)"> 1 </xsl:if> </fo:block> </fo:table-cell> <fo:table-cell xsl:use-attribute-sets="cell_border"> <fo:block xsl:use-attribute-sets="table_text7_right"><xsl:value-of select="format-number(@summ - $nds, '0.00')"/></fo:block> </fo:table-cell> <fo:table-cell xsl:use-attribute-sets="cell_border"> <fo:block xsl:use-attribute-sets="table_text7_right"><xsl:value-of select="format-number(@summ - $nds, '0.00')"/></fo:block> </fo:table-cell> <fo:table-cell xsl:use-attribute-sets="cell_border"> <fo:block xsl:use-attribute-sets="table_text7_right"> </fo:table-cell> <fo:table-cell xsl:use-attribute-sets="cell_border"> <fo:block xsl:use-attribute-sets="table_text7_center"><xsl:value-of select="format-number($nds_rate, '0.00')"/></fo:block> </fo:table-cell> <fo:table-cell xsl:use-attribute-sets="cell_border"> <fo:block xsl:use-attribute-sets="table_text7_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_text7_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_text7_right"></fo:block> </fo:table-cell> <fo:table-cell xsl:use-attribute-sets="cell_border"> <fo:block xsl:use-attribute-sets="table_text7_right"></fo:block> </fo:table-cell> </fo:table-row> </xsl:for-each> |
Автор: | Администратор [ 05 фев 2008, 17:24 ] |
Заголовок сообщения: | |
А если просто сделать: Код: <fo:block xsl:use-attribute-sets="table_text7_right"><xsl:value-of select="@quantity div 1024"/>
что выходит? |
Автор: | snowman78 [ 05 фев 2008, 17:55 ] |
Заголовок сообщения: | |
При таком раскладе, он выдает трафик в байтах.... |
Автор: | Администратор [ 05 фев 2008, 19:29 ] |
Заголовок сообщения: | |
Правлю шаблон invoice_pdf.xsl строка 362: Код: <fo:table-cell xsl:use-attribute-sets="cell_border">
<fo:block xsl:use-attribute-sets="table_text7_right"> <xsl:if test="@quantity"> <xsl:value-of select="@quantity div 1024"/> </xsl:if> <xsl:if test="not(@quantity)"> 1 </xsl:if> </fo:block> </fo:table-cell> Получаю что значение количества в верхней таблице счетов счета-фактуры делится с плавающей точкой.. Попробуйте так же точно повторить. |
Автор: | snowman78 [ 06 фев 2008, 16:52 ] |
Заголовок сообщения: | |
<?xml version="1.0" encoding="windows-1251"?> <!DOCTYPE xsl:stylesheet [ <!ENTITY nbsp " "> <!ENTITY copy "©"> <!ENTITY reg "®"> <!ENTITY trade "™"> <!ENTITY mdash "—"> <!ENTITY ldquo "“"> <!ENTITY rdquo "”"> <!ENTITY pound "£"> <!ENTITY yen "¥"> <!ENTITY euro "€"> ]> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:svg="http://www.w3.org/2000/svg" xmlns:xalan="http://xml.apache.org/xalan" xmlns:counter="bitel.billing.server.util.exslt.Counter" version="1.0"> <xalan:component prefix="counter" functions="add set get"> <xalan:script lang="javaclass" src="xalan://bitel.billing.server.util.exslt.Counter"/> </xalan:component> <xsl:output encoding="windows-1251" method='xml' indent='yes' /> <!-- Список атрибутов: payment_purpose Назначение платежа bill_number Номер счета date Дата выписки payer Плательщик total_sum Итого: Сумма total_NDS Итого: НДС total_sumWithNDS Итого: Всего с НДС total_toPay Итого к оплате <pay //\//\//\//\//\//\//\//\//\// goods Товар unit Ед. amount Кол-во price Цена sum Сумма NDS НДС sumWithNDS Всего с НДС //\//\//\//\//\//\//\//\//\// /> --> <!-- РЕКВИЗИТЫ ПРЕДПРИЯТИЯ --> <xsl:variable name="postal_address" select="'443022, Российская Федерация, Самарская обл., г.Самара, Заводское шоссе, д. 13 "Б", р/с 40702810500040000009 в ОАО "Волго-Камский Банк" Самара, БИК 043601709, корр/с 30101810700000000709'" /> <xsl:variable name="INN" select="'6318124827'" /> <xsl:variable name="KPP" select="'631801001'" /> <xsl:variable name="title" select="'ООО "Жигули-Телеком"'" /> <xsl:variable name="OKVED" select="'ОКВЭД ----'" /> <xsl:variable name="OKPO" select="'ОКПО ------'" /> <!-- РЕКВИЗИТЫ ПРЕДПРИЯТИЯ --> <xsl:variable name="currency" select="'рубль'" /> <!-- конец Костанты --> <xsl:attribute-set name="text"> <xsl:attribute name="text-align">left</xsl:attribute> <xsl:attribute name="font-family">arial</xsl:attribute> <xsl:attribute name="font-size">8pt</xsl:attribute> <xsl:attribute name="start-indent">0.1cm</xsl:attribute> <xsl:attribute name="end-indent">0.1cm</xsl:attribute> </xsl:attribute-set> <xsl:attribute-set name="text7"> <xsl:attribute name="text-align">left</xsl:attribute> <xsl:attribute name="font-family">arial</xsl:attribute> <xsl:attribute name="font-size">7pt</xsl:attribute> <xsl:attribute name="start-indent">0.1cm</xsl:attribute> <xsl:attribute name="end-indent">0.1cm</xsl:attribute> </xsl:attribute-set> <xsl:attribute-set name="text_ban"> <xsl:attribute name="text-align">right</xsl:attribute> <xsl:attribute name="font-family">arial</xsl:attribute> <xsl:attribute name="font-size">6pt</xsl:attribute> <xsl:attribute name="start-indent">0.1cm</xsl:attribute> <xsl:attribute name="end-indent">0.1cm</xsl:attribute> </xsl:attribute-set> <xsl:attribute-set name="text_bold"> <xsl:attribute name="text-align">left</xsl:attribute> <xsl:attribute name="font-family">arial</xsl:attribute> <xsl:attribute name="font-weight">bold</xsl:attribute> <xsl:attribute name="font-size">8pt</xsl:attribute> <xsl:attribute name="start-indent">0.1cm</xsl:attribute> <xsl:attribute name="end-indent">0.1cm</xsl:attribute> </xsl:attribute-set> <xsl:attribute-set name="table_text_left"> <xsl:attribute name="text-align">left</xsl:attribute> <xsl:attribute name="font-family">arial</xsl:attribute> <xsl:attribute name="font-size">8pt</xsl:attribute> <xsl:attribute name="start-indent">0.2cm</xsl:attribute> <xsl:attribute name="end-indent">0.2cm</xsl:attribute> <xsl:attribute name="space-before">0.1cm</xsl:attribute> </xsl:attribute-set> <xsl:attribute-set name="table_text_right"> <xsl:attribute name="text-align">right</xsl:attribute> <xsl:attribute name="font-family">arial</xsl:attribute> <xsl:attribute name="font-size">8pt</xsl:attribute> <xsl:attribute name="start-indent">0.2cm</xsl:attribute> <xsl:attribute name="end-indent">0.2cm</xsl:attribute> <xsl:attribute name="space-before">0.1cm</xsl:attribute> </xsl:attribute-set> <xsl:attribute-set name="table_text_center"> <xsl:attribute name="text-align">center</xsl:attribute> <xsl:attribute name="font-family">arial</xsl:attribute> <xsl:attribute name="font-size">8pt</xsl:attribute> <xsl:attribute name="start-indent">0.2cm</xsl:attribute> <xsl:attribute name="end-indent">0.2cm</xsl:attribute> <xsl:attribute name="space-before">0.1cm</xsl:attribute> </xsl:attribute-set> <xsl:attribute-set name="text_title"> <xsl:attribute name="text-align">center</xsl:attribute> <xsl:attribute name="font-family">arial</xsl:attribute> <xsl:attribute name="font-size">14pt</xsl:attribute> <xsl:attribute name="font-weight">bold</xsl:attribute> <xsl:attribute name="start-indent">0.1cm</xsl:attribute> <xsl:attribute name="end-indent">0.1cm</xsl:attribute> <xsl:attribute name="space-before">0.3cm</xsl:attribute> <xsl:attribute name="space-after">0.2cm</xsl:attribute> </xsl:attribute-set> <xsl:attribute-set name="text_italic"> <xsl:attribute name="text-align">left</xsl:attribute> <xsl:attribute name="font-family">arial</xsl:attribute> <xsl:attribute name="font-size">8pt</xsl:attribute> <xsl:attribute name="start-indent">0.1cm</xsl:attribute> <xsl:attribute name="end-indent">0.1cm</xsl:attribute> </xsl:attribute-set> <xsl:attribute-set name="table_text7_left"> <xsl:attribute name="text-align">left</xsl:attribute> <xsl:attribute name="font-family">arial</xsl:attribute> <xsl:attribute name="font-size">7pt</xsl:attribute> <xsl:attribute name="start-indent">0.1cm</xsl:attribute> <xsl:attribute name="end-indent">0.1cm</xsl:attribute> <xsl:attribute name="space-before">0.05cm</xsl:attribute> </xsl:attribute-set> <xsl:attribute-set name="table_text7_right"> <xsl:attribute name="text-align">right</xsl:attribute> <xsl:attribute name="font-family">arial</xsl:attribute> <xsl:attribute name="font-size">7pt</xsl:attribute> <xsl:attribute name="start-indent">0.1cm</xsl:attribute> <xsl:attribute name="end-indent">0.1cm</xsl:attribute> <xsl:attribute name="space-before">0.05cm</xsl:attribute> </xsl:attribute-set> <xsl:attribute-set name="table_text7_center"> <xsl:attribute name="text-align">center</xsl:attribute> <xsl:attribute name="font-family">arial</xsl:attribute> <xsl:attribute name="font-size">7pt</xsl:attribute> <xsl:attribute name="start-indent">0.05cm</xsl:attribute> <xsl:attribute name="end-indent">0.05cm</xsl:attribute> <xsl:attribute name="space-before">0.05cm</xsl:attribute> <xsl:attribute name="space-after">0.05cm</xsl:attribute> </xsl:attribute-set> <xsl:attribute-set name="cell_border"> <xsl:attribute name="border-width">0.7pt</xsl:attribute> <xsl:attribute name="border-top-style">solid</xsl:attribute> <xsl:attribute name="border-bottom-style">solid</xsl:attribute> <xsl:attribute name="border-left-style">solid</xsl:attribute> <xsl:attribute name="border-right-style">solid</xsl:attribute> </xsl:attribute-set> <xsl:attribute-set name="cell_border_top"> <xsl:attribute name="border-width">0.7pt</xsl:attribute> <xsl:attribute name="border-top-style">solid</xsl:attribute> <xsl:attribute name="border-left-style">solid</xsl:attribute> <xsl:attribute name="border-right-style">solid</xsl:attribute> </xsl:attribute-set> <xsl:attribute-set name="cell_border_bottom"> <xsl:attribute name="border-width">0.7pt</xsl:attribute> <xsl:attribute name="border-bottom-style">solid</xsl:attribute> <xsl:attribute name="border-left-style">solid</xsl:attribute> <xsl:attribute name="border-right-style">solid</xsl:attribute> </xsl:attribute-set> <xsl:template match="data"> <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"> <xsl:apply-templates select="bill" /> </fo:root> </xsl:template> <xsl:template match="bill"> <xsl:variable name="nds_rate" select="number(params/@nds)"/> <xsl:value-of select="counter:set('total_nds', '0.0')"/> <!-- <xsl:variable name="total_nds" select="number((@total_sum * ($nds_rate div 100))div($nds_rate div 100 + 1))" /> --> <fo:layout-master-set> <fo:simple-page-master margin-right="2cm" margin-left="2cm" margin-bottom="1cm" margin-top="0.5cm" page-width="21cm" page-height="29.7cm" master-name="first"> <fo:region-body margin-top="0cm" margin-bottom="0.0cm" /> <fo:region-before extent="0cm" /> <fo:region-after extent="0.5cm" /> </fo:simple-page-master> </fo:layout-master-set> <fo:page-sequence master-reference="first"> <fo:flow flow-name="xsl-region-body"> <!-- заголовок --> <fo:block xsl:use-attribute-sets="text_ban">Приложение №1</fo:block> <fo:block xsl:use-attribute-sets="text_ban">к правилам ведения журналов учетов полученных и выставленных счетов-фактур,</fo:block> <fo:block xsl:use-attribute-sets="text_ban">книг покупок и книг продаж при расчетах по налогу на добавленную стоимость,</fo:block> <fo:block xsl:use-attribute-sets="text_ban">утвержденным постановлением Правительства РФ от 2 декабря 2000г. №914</fo:block> <fo:block xsl:use-attribute-sets="text_ban">(в ред. постановления Правительства РФ от 11 мая 2006 г. № 283)</fo:block> <fo:block xsl:use-attribute-sets="text_title" text-align="left">Счет-фактура № <xsl:value-of select="@bill_number"/> от <xsl:value-of select="@date"/></fo:block> <fo:block xsl:use-attribute-sets="text_bold">Продавец: <xsl:value-of select="$title"/></fo:block> <fo:block xsl:use-attribute-sets="text">Адрес: <xsl:value-of select="$postal_address"/></fo:block> <fo:block xsl:use-attribute-sets="text">ИНН/КПП Продавца: <xsl:value-of select="$INN"/>/<xsl:value-of select="$KPP"/></fo:block> <fo:block xsl:use-attribute-sets="text">Грузоотправитель и его адрес: -----</fo:block> <fo:block xsl:use-attribute-sets="text">Грузополучатель и его адрес: -----</fo:block> <fo:block xsl:use-attribute-sets="text">К платежно-расчетному документу</fo:block> <fo:block xsl:use-attribute-sets="text">Покупатель: <xsl:value-of select="/data/bill/attributes/@org_name"/></fo:block> <fo:block xsl:use-attribute-sets="text">Адрес: <xsl:value-of select="/data/bill/attributes/@address"/></fo:block> <fo:block xsl:use-attribute-sets="text">ИНН/КПП покупателя: <xsl:value-of select="/data/bill/attributes/@inn"/>/<xsl:value-of select="/data/bill/attributes/@kpp"/></fo:block> <fo:block xsl:use-attribute-sets="text">Дополнение:</fo:block> <fo:table space-before="0.2cm" table-layout="fixed"> <fo:table-column column-width="3cm" /> <fo:table-column column-width="1.1cm" /> <fo:table-column column-width="1cm" /> <fo:table-column column-width="1.4cm" /> <fo:table-column column-width="2.0cm" /> <fo:table-column column-width="0.9cm" /> <fo:table-column column-width="1.3cm" /> <fo:table-column column-width="1.7cm" /> <fo:table-column column-width="1.9cm" /> <fo:table-column column-width="1.4cm" /> <fo:table-column column-width="1.6cm" /> <fo:table-header> <fo:table-row> <fo:table-cell xsl:use-attribute-sets="cell_border"> <fo:block xsl:use-attribute-sets="table_text7_center">Наименование товара (описание выполненных работ, оказанных услуг), имущественного права</fo:block> </fo:table-cell> <fo:table-cell xsl:use-attribute-sets="cell_border"> <fo:block end-indent="0.01cm" start-indent="0.01cm" xsl:use-attribute-sets="table_text7_center">Единица измере- ния</fo:block> </fo:table-cell> <fo:table-cell xsl:use-attribute-sets="cell_border"> <fo:block xsl:use-attribute-sets="table_text7_center">Коли- чество</fo:block> </fo:table-cell> <fo:table-cell xsl:use-attribute-sets="cell_border"> <fo:block xsl:use-attribute-sets="table_text7_center">Цена (тариф) за единицу измерения</fo:block> </fo:table-cell> <fo:table-cell xsl:use-attribute-sets="cell_border"> <fo:block xsl:use-attribute-sets="table_text7_center">Стоимость товаров (работ, услуг), имущественных прав, всего без налога</fo:block> </fo:table-cell> <fo:table-cell xsl:use-attribute-sets="cell_border"> <fo:block xsl:use-attribute-sets="table_text7_center">В том числе акциз</fo:block> </fo:table-cell> <fo:table-cell xsl:use-attribute-sets="cell_border"> <fo:block xsl:use-attribute-sets="table_text7_center">Нало- говая ставка</fo:block> </fo:table-cell> <fo:table-cell xsl:use-attribute-sets="cell_border"> <fo:block xsl:use-attribute-sets="table_text7_center">Сумма налога</fo:block> </fo:table-cell> <fo:table-cell xsl:use-attribute-sets="cell_border"> <fo:block xsl:use-attribute-sets="table_text7_center">Стоимость товаров (работ, услуг), имущественных прав, всего с учетом налога</fo:block> </fo:table-cell> <fo:table-cell xsl:use-attribute-sets="cell_border"> <fo:block xsl:use-attribute-sets="table_text7_center">Страна происхож- дения</fo:block> </fo:table-cell> <fo:table-cell xsl:use-attribute-sets="cell_border"> <fo:block xsl:use-attribute-sets="table_text7_center">Номер таможенной декларации</fo:block> </fo:table-cell> </fo:table-row> <fo:table-row> <fo:table-cell xsl:use-attribute-sets="cell_border"> <fo:block xsl:use-attribute-sets="table_text7_center">1</fo:block> </fo:table-cell> <fo:table-cell xsl:use-attribute-sets="cell_border"> <fo:block xsl:use-attribute-sets="table_text7_center">2</fo:block> </fo:table-cell> <fo:table-cell xsl:use-attribute-sets="cell_border"> <fo:block xsl:use-attribute-sets="table_text7_center">3</fo:block> </fo:table-cell> <fo:table-cell xsl:use-attribute-sets="cell_border"> <fo:block xsl:use-attribute-sets="table_text7_center">4</fo:block> </fo:table-cell> <fo:table-cell xsl:use-attribute-sets="cell_border"> <fo:block xsl:use-attribute-sets="table_text7_center">5</fo:block> </fo:table-cell> <fo:table-cell xsl:use-attribute-sets="cell_border"> <fo:block xsl:use-attribute-sets="table_text7_center">6</fo:block> </fo:table-cell> <fo:table-cell xsl:use-attribute-sets="cell_border"> <fo:block xsl:use-attribute-sets="table_text7_center">7</fo:block> </fo:table-cell> <fo:table-cell xsl:use-attribute-sets="cell_border"> <fo:block xsl:use-attribute-sets="table_text7_center">8</fo:block> </fo:table-cell> <fo:table-cell xsl:use-attribute-sets="cell_border"> <fo:block xsl:use-attribute-sets="table_text7_center">9</fo:block> </fo:table-cell> <fo:table-cell xsl:use-attribute-sets="cell_border"> <fo:block xsl:use-attribute-sets="table_text7_center">10</fo:block> </fo:table-cell> <fo:table-cell xsl:use-attribute-sets="cell_border"> <fo:block xsl:use-attribute-sets="table_text7_center">11</fo:block> </fo:table-cell> </fo:table-row> </fo:table-header> <fo:table-body> <xsl:for-each select="pos"> <xsl:variable name="nds" select="number((@summ * ($nds_rate div 100))div($nds_rate div 100 + 1))" /> <xsl:value-of select="counter:add( 'total_nds', format-number($nds, '0.00') )"/> <fo:table-row> <fo:table-cell xsl:use-attribute-sets="cell_border"> <fo:block xsl:use-attribute-sets="table_text7_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_text7_center"> <xsl:if test="@unit"> <xsl:value-of select="@unit"/> </xsl:if> <xsl:if test="not(@unit)"> месяц </xsl:if> </fo:block> </fo:table-cell> <fo:table-cell xsl:use-attribute-sets="cell_border"> <fo:block xsl:use-attribute-sets="table_text7_right"> <xsl:if test="@quantity"> <xsl:value-of select="@quantity div 1024('quantity div 1024', format-number(@quantity div 1024, '0.00') )"/> </xsl:if> <xsl:if test="not(@quantity)"> 1 </xsl:if> </fo:block> </fo:table-cell> <fo:table-cell xsl:use-attribute-sets="cell_border"> <fo:block xsl:use-attribute-sets="table_text7_right"><xsl:value-of select="format-number(@summ - $nds, '0.00')"/></fo:block> </fo:table-cell> <fo:table-cell xsl:use-attribute-sets="cell_border"> <fo:block xsl:use-attribute-sets="table_text7_right"><xsl:value-of select="format-number(@summ - $nds, '0.00')"/></fo:block> </fo:table-cell> <fo:table-cell xsl:use-attribute-sets="cell_border"> <fo:block xsl:use-attribute-sets="table_text7_right"></fo:block> </fo:table-cell> <fo:table-cell xsl:use-attribute-sets="cell_border"> <fo:block xsl:use-attribute-sets="table_text7_center"><xsl:value-of select="format-number($nds_rate, '0.00')"/></fo:block> </fo:table-cell> <fo:table-cell xsl:use-attribute-sets="cell_border"> <fo:block xsl:use-attribute-sets="table_text7_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_text7_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_text7_right"></fo:block> </fo:table-cell> <fo:table-cell xsl:use-attribute-sets="cell_border"> <fo:block xsl:use-attribute-sets="table_text7_right"></fo:block> </fo:table-cell> </fo:table-row> </xsl:for-each> <fo:table-row> <fo:table-cell> <fo:block xsl:use-attribute-sets="table_text7_left">Всего к оплате</fo:block> </fo:table-cell> <fo:table-cell> </fo:table-cell> <fo:table-cell> </fo:table-cell> <fo:table-cell> </fo:table-cell> <fo:table-cell> <!-- <fo:block xsl:use-attribute-sets="table_text7_right"><xsl:value-of select="format-number(@total_sum - $total_nds, '0.00')"/></fo:block> --> </fo:table-cell> <fo:table-cell> <!-- <fo:block xsl:use-attribute-sets="table_text7_right"></fo:block> --> </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_text7_right"><xsl:value-of select="format-number(counter:get( '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_text7_right"><xsl:value-of select="format-number(@total_sum, '0.00')"/></fo:block> </fo:table-cell> <fo:table-cell> </fo:table-cell> <fo:table-cell> </fo:table-cell> </fo:table-row> </fo:table-body> </fo:table> <fo:table space-before="0.5cm" start-indent="0.5cm" table-layout="fixed" width="100%"> <fo:table-column column-width="1.9cm"/> <fo:table-column column-width="2.3cm"/> <fo:table-column column-width="2.4cm"/> <fo:table-column column-width="proportional-column-width(1)"/> <fo:table-column column-width="1.9cm"/> <fo:table-column column-width="2.3cm"/> <fo:table-column column-width="2.4cm"/> <fo:table-body> <fo:table-row> <fo:table-cell> <fo:block xsl:use-attribute-sets="text7">Руководитель</fo:block> </fo:table-cell> <fo:table-cell border-bottom-style="solid" border-bottom-width="0.6pt"> </fo:table-cell> <fo:table-cell> <fo:block xsl:use-attribute-sets="text7"><xsl:value-of select="/data/inline_params/@name"/></fo:block> </fo:table-cell> <fo:table-cell> </fo:table-cell> <fo:table-cell> <fo:block xsl:use-attribute-sets="text7">Гл. бухгалтер</fo:block> </fo:table-cell> <fo:table-cell border-bottom-style="solid" border-bottom-width="0.6pt"> </fo:table-cell> <fo:table-cell> <fo:block xsl:use-attribute-sets="text7"><xsl:value-of select="/data/inline_params/@name2"/></fo:block> </fo:table-cell> </fo:table-row> <fo:table-row> <fo:table-cell number-columns-spanned="3"> <fo:block xsl:use-attribute-sets="text7" text-align="center"><xsl:value-of select="/data/inline_params/@prikaz"/></fo:block> </fo:table-cell> <fo:table-cell> </fo:table-cell> <fo:table-cell number-columns-spanned="3"> <fo:block xsl:use-attribute-sets="text7" text-align="center"><xsl:value-of select="/data/inline_params/@prikaz"/></fo:block> </fo:table-cell> </fo:table-row> </fo:table-body> </fo:table> <fo:table space-before="0.4cm" start-indent="0.5cm" table-layout="fixed" width="100%"> <fo:table-column column-width="4.4cm"/> <fo:table-column column-width="3.5cm"/> <fo:table-column column-width="1cm"/> <fo:table-column column-width="proportional-column-width(1)"/> <fo:table-body> <fo:table-row> <fo:table-cell> <fo:block xsl:use-attribute-sets="text7">Индивидуальный предприниматель</fo:block> </fo:table-cell> <fo:table-cell border-bottom-style="solid" border-bottom-width="0.6pt"> </fo:table-cell> <fo:table-cell> <fo:block xsl:use-attribute-sets="text7">(Ф.И.О)</fo:block> </fo:table-cell> <fo:table-cell> <fo:block xsl:use-attribute-sets="text7" start-indent="1.5cm">(реквизиты свидетельства о государственной</fo:block> </fo:table-cell> </fo:table-row> <fo:table-row> <fo:table-cell> </fo:table-cell> <fo:table-cell> </fo:table-cell> <fo:table-cell> </fo:table-cell> <fo:table-cell> <fo:block xsl:use-attribute-sets="text7" start-indent="1.5cm">регистрации индивидуального предпринимателя)</fo:block> </fo:table-cell> </fo:table-row> </fo:table-body> </fo:table> <fo:block xsl:use-attribute-sets="text7" space-before="0.0cm">Примечание: первый экземпляр - покупателю, второй экземпляр - продавцу.</fo:block> <xsl:call-template name="line"><xsl:with-param name="width" select="'100%'"/><xsl:with-param name="weight" select="'0.7pt'"/><xsl:with-param name="space-before" select="'0.2cm'"/></xsl:call-template> <fo:block xsl:use-attribute-sets="text" space-before="0.2cm">К договору <xsl:value-of select="@contract"/></fo:block> <fo:block xsl:use-attribute-sets="text_title" text-align="center">Акт приемки-сдачи услуг № <xsl:value-of select="@bill_number"/> от <xsl:value-of select="@date"/></fo:block> <fo:block xsl:use-attribute-sets="text7" space-before="0.0cm">Мы, нижеподписавшиеся, от лица Исполнителя, <xsl:value-of select="/data/inline_params/@dolz"/> <xsl:value-of select="/data/inline_params/@name"/>, <xsl:value-of select="/data/inline_params/@dover"/> </fo:block> <fo:block xsl:use-attribute-sets="text7" space-before="0.0cm"> с одной стороны, и от лица Заказчика, <xsl:value-of select="/data/bill/attributes/@dolz"/> <xsl:value-of select="/data/bill/attributes/@face"/> , <xsl:value-of select="/data/bill/attributes/@osn"/> </fo:block> <fo:block xsl:use-attribute-sets="text7" space-before="0.0cm">с другой стороны, составили настоящий акт о том, что услуги, выполненные Исполнителем по договору за период <<xsl:call-template name="month"><xsl:with-param name="month" select="@mm"/></xsl:call-template> <xsl:value-of select="@yy"/> г.>, удовлетворяют требованиям Заказчика и условиям договора.</fo:block> <fo:table space-before="0.2cm" table-layout="fixed"> <fo:table-column column-width="3cm" /> <fo:table-column column-width="1.1cm" /> <fo:table-column column-width="1cm" /> <fo:table-column column-width="1.4cm" /> <fo:table-column column-width="1.7cm" /> <fo:table-column column-width="1.3cm" /> <fo:table-column column-width="1.7cm" /> <fo:table-column column-width="1.9cm" /> <fo:table-header> <fo:table-row> <fo:table-cell xsl:use-attribute-sets="cell_border"> <fo:block xsl:use-attribute-sets="table_text7_center">Наименование товара (описание выполненных работ, оказываемых услуг)</fo:block> </fo:table-cell> <fo:table-cell xsl:use-attribute-sets="cell_border"> <fo:block end-indent="0.01cm" start-indent="0.01cm" xsl:use-attribute-sets="table_text7_center">Единица измере- ния</fo:block> </fo:table-cell> <fo:table-cell xsl:use-attribute-sets="cell_border"> <fo:block xsl:use-attribute-sets="table_text7_center">Коли- чество</fo:block> </fo:table-cell> <fo:table-cell xsl:use-attribute-sets="cell_border"> <fo:block xsl:use-attribute-sets="table_text7_center">Цена (тариф) за единицу измерения</fo:block> </fo:table-cell> <fo:table-cell xsl:use-attribute-sets="cell_border"> <fo:block xsl:use-attribute-sets="table_text7_center">Стоимость товаров (работ, услуг), всего без налога</fo:block> </fo:table-cell> <fo:table-cell xsl:use-attribute-sets="cell_border"> <fo:block xsl:use-attribute-sets="table_text7_center">Нало- говая ставка</fo:block> </fo:table-cell> <fo:table-cell xsl:use-attribute-sets="cell_border"> <fo:block xsl:use-attribute-sets="table_text7_center">Сумма налога</fo:block> </fo:table-cell> <fo:table-cell xsl:use-attribute-sets="cell_border"> <fo:block xsl:use-attribute-sets="table_text7_center">Стоимость товаров (работ, услуг) всего с учетом налога</fo:block> </fo:table-cell> </fo:table-row> <fo:table-row> <fo:table-cell xsl:use-attribute-sets="cell_border"> <fo:block xsl:use-attribute-sets="table_text7_center">1</fo:block> </fo:table-cell> <fo:table-cell xsl:use-attribute-sets="cell_border"> <fo:block xsl:use-attribute-sets="table_text7_center">2</fo:block> </fo:table-cell> <fo:table-cell xsl:use-attribute-sets="cell_border"> <fo:block xsl:use-attribute-sets="table_text7_center">3</fo:block> </fo:table-cell> <fo:table-cell xsl:use-attribute-sets="cell_border"> <fo:block xsl:use-attribute-sets="table_text7_center">4</fo:block> </fo:table-cell> <fo:table-cell xsl:use-attribute-sets="cell_border"> <fo:block xsl:use-attribute-sets="table_text7_center">5</fo:block> </fo:table-cell> <fo:table-cell xsl:use-attribute-sets="cell_border"> <fo:block xsl:use-attribute-sets="table_text7_center">7</fo:block> </fo:table-cell> <fo:table-cell xsl:use-attribute-sets="cell_border"> <fo:block xsl:use-attribute-sets="table_text7_center">8</fo:block> </fo:table-cell> <fo:table-cell xsl:use-attribute-sets="cell_border"> <fo:block xsl:use-attribute-sets="table_text7_center">9</fo:block> </fo:table-cell> </fo:table-row> </fo:table-header> <fo:table-body> <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_text7_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_text7_center"> <xsl:if test="@unit"> <xsl:value-of select="@unit"/> </xsl:if> <xsl:if test="not(@unit)"> месяц </xsl:if> </fo:block> </fo:table-cell> <fo:table-cell xsl:use-attribute-sets="cell_border"> <fo:block xsl:use-attribute-sets="table_text7_right"><xsl:value-of select="number round(@quantity, '0.00')"/> <xsl:if test="@quantity"> <xsl:value-of select="@quantity div 1024"/> </xsl:if> <xsl:if test="not(@quantity)"> 1 </xsl:if> </fo:block> </fo:table-cell> <fo:table-cell xsl:use-attribute-sets="cell_border"> <fo:block xsl:use-attribute-sets="table_text7_right"><xsl:value-of select="format-number(@summ - $nds, '0.00')"/></fo:block> </fo:table-cell> <fo:table-cell xsl:use-attribute-sets="cell_border"> <fo:block xsl:use-attribute-sets="table_text7_right"><xsl:value-of select="format-number(@summ - $nds, '0.00')"/></fo:block> </fo:table-cell> <fo:table-cell xsl:use-attribute-sets="cell_border"> <fo:block xsl:use-attribute-sets="table_text7_center"><xsl:value-of select="format-number($nds_rate, '0.00')"/></fo:block> </fo:table-cell> <fo:table-cell xsl:use-attribute-sets="cell_border"> <fo:block xsl:use-attribute-sets="table_text7_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_text7_right"><xsl:value-of select="format-number(@summ, '0.00')"/></fo:block> </fo:table-cell> </fo:table-row> </xsl:for-each> </fo:table-body> </fo:table> <xsl:if test="@with_stamp"> <fo:table start-indent="1cm" table-layout="fixed" width="100%"> <fo:table-column column-width="0.0cm"/> <fo:table-column column-width="4.0cm"/> <fo:table-column column-width="proportional-column-width(1)"/> <fo:table-body> <fo:table-row> <fo:table-cell> </fo:table-cell> <fo:table-cell number-columns-spanned="2"> <fo:external-graphic src="webroot/stamp.gif" width="4.1cm" height="3.85cm" content-height="3.85cm" content-width="4.1cm" space-before="1.2cm"/> </fo:table-cell> </fo:table-row> </fo:table-body> </fo:table> </xsl:if> <fo:table table-layout="fixed" space-before="-5.1cm"> <xsl:choose> <xsl:when test="@with_stamp"> <xsl:attribute name="space-before">-5.1cm</xsl:attribute> </xsl:when> <xsl:otherwise> <xsl:attribute name="space-before">0.5cm</xsl:attribute> </xsl:otherwise> </xsl:choose> <fo:table-column column-width="proportional-column-width(1)"/> <fo:table-body> <fo:table-row> <fo:table-cell> <fo:table table-layout="fixed" space-before="0.3cm"> <fo:table-column column-width="5cm" /> <fo:table-column column-width="10cm" /> <fo:table-body> <fo:table-row> <fo:table-cell><fo:block xsl:use-attribute-sets="table_text7_left">Общая стоимость услуг:</fo:block></fo:table-cell> <fo:table-cell><fo:block xsl:use-attribute-sets="table_text7_left"><xsl:value-of select="@total_sum"/> руб.</fo:block></fo:table-cell> </fo:table-row> <fo:table-row> <fo:table-cell><fo:block xsl:use-attribute-sets="table_text7_left">В том числе НДС:</fo:block></fo:table-cell> <fo:table-cell><fo:block xsl:use-attribute-sets="table_text7_left"><xsl:value-of select="format-number( counter:get( 'total_nds' ), '0.00')"/> руб.</fo:block></fo:table-cell> </fo:table-row> </fo:table-body> </fo:table> <fo:table table-layout="fixed" space-before="0.5cm" start-indent="0.0cm"> <fo:table-column column-width="7cm" /> <fo:table-column column-width="8cm" /> <fo:table-body> <fo:table-row> <fo:table-cell><fo:block xsl:use-attribute-sets="table_text7_left" font-weight="bold">Исполнитель: <xsl:value-of select="$title"/></fo:block></fo:table-cell> <fo:table-cell><fo:block xsl:use-attribute-sets="table_text7_left" font-weight="bold">Заказчик: <xsl:value-of select="/data/bill/attributes/@org_name" /></fo:block></fo:table-cell> </fo:table-row> <fo:table-row> <fo:table-cell><xsl:call-template name="line"><xsl:with-param name="width" select="'3.5cm'"/><xsl:with-param name="weight" select="'0.6pt'"/><xsl:with-param name="space-before" select="'1.0cm'"/></xsl:call-template></fo:table-cell> <fo:table-cell><xsl:call-template name="line"><xsl:with-param name="width" select="'3.5cm'"/><xsl:with-param name="weight" select="'0.6pt'"/><xsl:with-param name="space-before" select="'1.0cm'"/></xsl:call-template></fo:table-cell> </fo:table-row> <fo:table-row> <fo:table-cell><fo:block xsl:use-attribute-sets="table_text7_left"><xsl:value-of select="/data/inline_params/@name"/></fo:block></fo:table-cell> <fo:table-cell><fo:block xsl:use-attribute-sets="table_text7_left"><xsl:value-of select="/data/bill/attributes/@face"/></fo:block></fo:table-cell> </fo:table-row> </fo:table-body> </fo:table> <xsl:variable name="dateD" select="substring(@date,1,2)"/> <fo:block xsl:use-attribute-sets="text7" space-before="0.4cm">Подписан <xsl:value-of select="substring(@date,1,2)"/> <xsl:call-template name="month2"><xsl:with-param name="month" select="number(substring(@date,4,2))-1"/></xsl:call-template> <xsl:value-of select="substring(@date,7)"/> г. в двух экземплярах по одному для каждой из сторон</fo:block> <xsl:call-template name="line"><xsl:with-param name="width" select="'100%'"/><xsl:with-param name="weight" select="'0.7pt'"/><xsl:with-param name="space-before" select="'0.3cm'"/></xsl:call-template> <fo:block xsl:use-attribute-sets="text7">Платежные реквизиты</fo:block> <fo:block xsl:use-attribute-sets="text_bold"><xsl:value-of select="$postal_address"/></fo:block> <fo:block xsl:use-attribute-sets="text7">Заранее благодарим,</fo:block> <fo:block xsl:use-attribute-sets="text7">Администрация <xsl:value-of select="$title"/></fo:block> </fo:table-cell> </fo:table-row> </fo:table-body> </fo:table> <fo:block-container height="2cm" width="20cm" top="28cm" left="0mm" position="absolute"> <fo:block xsl:use-attribute-sets="text7">Уважаемые партнеры!</fo:block> <fo:block xsl:use-attribute-sets="text7">Просим Вас второй экземпляр акта, заверенный с Вашей стороны, отправить на почтовый адрес</fo:block> </fo:block-container> </fo:flow> </fo:page-sequence> </xsl:template> <xsl:template name="month"> <xsl:param name="month"/> <xsl:choose> <xsl:when test="$month = 0">Январь</xsl:when> <xsl:when test="$month = 1">Февраль</xsl:when> <xsl:when test="$month = 2">Март</xsl:when> <xsl:when test="$month = 3">Апрель</xsl:when> <xsl:when test="$month = 4">Май</xsl:when> <xsl:when test="$month = 5">Июнь</xsl:when> <xsl:when test="$month = 6">Июль</xsl:when> <xsl:when test="$month = 7">Август</xsl:when> <xsl:when test="$month = 8">Сентябрь</xsl:when> <xsl:when test="$month = 9">Октябрь</xsl:when> <xsl:when test="$month = 10">Ноябрь</xsl:when> <xsl:when test="$month = 11">Декабрь</xsl:when> </xsl:choose> </xsl:template> <xsl:template name="month2"> <xsl:param name="month"/> <xsl:choose> <xsl:when test="$month = 0">Января</xsl:when> <xsl:when test="$month = 1">Февраля</xsl:when> <xsl:when test="$month = 2">Марта</xsl:when> <xsl:when test="$month = 3">Апреля</xsl:when> <xsl:when test="$month = 4">Мая</xsl:when> <xsl:when test="$month = 5">Июня</xsl:when> <xsl:when test="$month = 6">Июля</xsl:when> <xsl:when test="$month = 7">Августа</xsl:when> <xsl:when test="$month = 8">Сентября</xsl:when> <xsl:when test="$month = 9">Октября</xsl:when> <xsl:when test="$month = 10">Ноября</xsl:when> <xsl:when test="$month = 11">Декабря</xsl:when> </xsl:choose> </xsl:template> <xsl:template name="line"> <xsl:param name="width"/> <xsl:param name="weight"/> <xsl:param name="space-before"/> <fo:table table-layout="fixed" width="100%"><xsl:attribute name="width"><xsl:value-of select="$width"/></xsl:attribute><xsl:attribute name="space-before"><xsl:value-of select="$space-before"/></xsl:attribute> <fo:table-column column-width="proportional-column-width(1)" /> <fo:table-body> <fo:table-row> <fo:table-cell border-bottom-style="solid"><xsl:attribute name="border-bottom-width"><xsl:value-of select="$weight"/></xsl:attribute> </fo:table-cell> </fo:table-row> </fo:table-body> </fo:table> </xsl:template> </xsl:stylesheet> |
Автор: | Администратор [ 06 фев 2008, 20:14 ] |
Заголовок сообщения: | |
Такая конструкция у меня сработала: Код: <xsl:value-of select="format-number(@quantity div 1024, '0.00')"/>
|
Автор: | snowman78 [ 06 фев 2008, 20:31 ] |
Заголовок сообщения: | |
Спасибо, я то же ее построил!!!!! ![]() |
Автор: | snowman78 [ 07 фев 2008, 14:40 ] |
Заголовок сообщения: | |
Но остается, еще один вопрос, данная строчка делит все ячейкм отвечающие за кол-во (трафик, абонентская плата). Возникает вопрос, а можно в конфигураторе модуля счетов, в нужной строчке, использовать функцию умножения на делитель.? |
Автор: | Администратор [ 08 фев 2008, 12:06 ] |
Заголовок сообщения: | |
Можно сделать так так. Вместо <id1>, <id2> подставьте коды позиций с трафиком (коды возьмите из конфигурации модуля). Код: <fo:table-cell xsl:use-attribute-sets="cell_border">
<fo:block xsl:use-attribute-sets="table_text7_right"> <xsl:if test="@quantity"> <xsl:choose> <xsl:when text="@position_id=<id1> OR @position_id=<id2>"> <xsl:value-of select="format-number(@quantity div 1024, '0.00')"/> </xsl:when> <xsl:otherwise> <xsl:value-of select="@quantity"/> </xsl:otherwise> </xsl:choose> </xsl:if> <xsl:if test="not(@quantity)"> 1 </xsl:if> </fo:block> </fo:table-cell> В новой документации по технологии XSLT более подробно описано: http://bgbilling.ru/v4.4/doc/ch04.html А вот здесь описано как просмотреть исходный XML документ с данными счета: http://bgbilling.ru/v4.4/doc/ch14s07.html |
Автор: | diserere [ 25 мар 2010, 16:00 ] |
Заголовок сообщения: | Re: Не выводит цифры после запяой в счет-факт в колонке "ко |
Добрый день! Я пытаюсь реализовать похожую конструкцию (надо отменить высчитывание цены услуги в некоторых позициях счета, где это бессмысленно делать, типа задолженности или наработки по телефонии), используя для основы код, приведенный здесь: Код: <fo:block xsl:use-attribute-sets="text right"> <xsl:choose> <xsl:when test="@position_id='4'"><!-- Для позиции "Задолженность на конец предыдущего месяца" --> -- </xsl:when> <xsl:when test="@position_id='7'"><!-- Для позиции "Исходящие МГ/МН звонки" --> -- </xsl:when> <xsl:otherwise> <xsl:if test="@quantity"> <xsl:value-of select="format-number((@summ div @quantity), '0.00')"/> </xsl:if> <xsl:if test="not(@quantity)"> <xsl:value-of select="format-number(@summ, '0.00')"/> </xsl:if> </xsl:otherwise> </xsl:choose> </fo:block> Так это работает. Но мне пришлось делать для каждого условия "test=..." отдельную ветку "<xsl:when ...". Если же я пытаюсь сделать все в одной ветке, как у вас, задавая несколько вариантов в одной ветке "<xsl:when ..." следующим образом: Код: <xsl:when test="@position_id='4' OR @position_id='7'"> -- </xsl:when> <xsl:otherwise> то в этом условии отрабатывается только первое условие, а то, что идет после OR, не отрабатывается. А пример из предыдущего ответа был из реального кода? По идее, все должно быть правильно. Все-таки хочется писать код покороче. Не знаете, почему это может не работать? |
Автор: | Администратор [ 26 мар 2010, 19:00 ] |
Заголовок сообщения: | Re: Не выводит цифры после запяой в счет-факт в колонке "ко |
Попробуйте or написать маленькими. |
Автор: | diserere [ 26 мар 2010, 21:10 ] |
Заголовок сообщения: | Re: Не выводит цифры после запяой в счет-факт в колонке "ко |
Тьфу ты )) С маленьким "or" работает, спасибо ) Я правильно понимаю, что выражение в <xsl:when test="expression"> - это выражение XPath, и смотреть надо именно спецификации XPath, чтобы больше не появлялось таких вопросов? |
Автор: | Администратор [ 25 фев 2011, 11:50 ] |
Заголовок сообщения: | Re: Не выводит цифры после запяой в счет-факт в колонке "ко |
Цитата: Я правильно понимаю, что выражение в <xsl:when test="expression"> - это выражение XPath, и смотреть надо именно спецификации XPath, чтобы больше не появлялось таких вопросов? Да. |
Страница 1 из 1 | Часовой пояс: UTC + 5 часов [ Летнее время ] |
Powered by phpBB® Forum Software © phpBB Group http://www.phpbb.com/ |