|
<?xml version="1.0" encoding="UTF-8"?>
|
|
<xsl:stylesheet xmlns:fo="http://www.w3.org/1999/XSL/Format"
|
|
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
|
version="2.0">
|
|
<xsl:output indent="yes"/>
|
|
<xsl:param name="showBankInformation" select="'true'"/>
|
|
<xsl:template match="/">
|
|
<xsl:variable name="totalCost">
|
|
<xsl:call-template name="sum">
|
|
<xsl:with-param name="index" select="1"/>
|
|
<xsl:with-param name="n" select="count(/invoice/products/product)"/>
|
|
</xsl:call-template>
|
|
</xsl:variable>
|
|
<xsl:variable name="totalVAT" select="($totalCost*0.24)">
|
|
</xsl:variable>
|
|
|
|
<fo:root font-family="Helvetica">
|
|
<fo:layout-master-set>
|
|
<!-- A4 size -->
|
|
<fo:simple-page-master master-name="invoice" page-height="29.7cm" page-width="21cm" margin-left="0.5in" margin-right="0.25in">
|
|
<fo:region-body display-align="before" margin-top="80px" margin-bottom="1in"/>
|
|
<fo:region-before extent="1in" display-align="before"/>
|
|
<fo:region-after extent="1in" display-align="before"/>
|
|
</fo:simple-page-master>
|
|
</fo:layout-master-set>
|
|
|
|
<fo:page-sequence master-reference="invoice">
|
|
<fo:static-content flow-name="xsl-region-before">
|
|
|
|
</fo:static-content>
|
|
<!--
|
|
Footer
|
|
-->
|
|
<fo:static-content flow-name="xsl-region-after" font-size="60%">
|
|
|
|
</fo:static-content>
|
|
<!--
|
|
Content
|
|
-->
|
|
<fo:flow flow-name="xsl-region-body" font-size="11pt">
|
|
|
|
<fo:block border-bottom="thin ck solid" margin-top="1em"/>
|
|
|
|
<!-- Supplier and customer -->
|
|
|
|
|
|
<xsl:if test="(/invoice/@showExempt = true())">
|
|
<!--<fo:block margin-top="1em">-->
|
|
<fo:block font-size="0.65em">
|
|
enim minim quis exercitation laboris ut aliquip ea consequat aute dolor reprehenderit voluptate esse eu nulla Excepteur occaecat non sunt culpa officia mollit id ipsum sit consectetur elit do tempor ut
|
|
</fo:block>
|
|
</xsl:if>
|
|
<xsl:if test="(/invoice/@type = 'SyncroSoftLTD')">
|
|
<fo:block font-size="0.65em">
|
|
enim minim quis exercitation laboris ut aliquip ea consequat aute dolor reprehenderit voluptate esse
|
|
</fo:block>
|
|
|
|
</xsl:if>
|
|
<xsl:if test="(/invoice/@type = 'Bla2')">
|
|
<fo:block margin-top="1em" font-size='0.8em'>
|
|
enim <xsl:value-of select="/invoice/products/product/start-period"/> ipsum <xsl:value-of select="/invoice/products/product/end-period"/> ipsum sit consectetur elit do
|
|
<fo:inline font-weight="bold"><xsl:value-of select="/invoice/products/product/fees"/> ipsum</fo:inline>Lorem dolor amet adipisicing sed
|
|
ut <fo:inline font-weight="bold"><xsl:value-of select="/invoice/@Bla2InvoiceNumber"/></fo:inline>Lorem
|
|
</fo:block>
|
|
<fo:block margin-top="1em" font-size='0.8em'>
|
|
enim minim quis exercitation laboris <fo:inline font-weight="bold"><xsl:value-of select="/invoice/products/product/totalToBePaid"/> ipsum</fo:inline>Lorem
|
|
</fo:block>
|
|
</xsl:if>
|
|
|
|
<!--Payment options-->
|
|
<fo:block font-family="Helvetica" font-size="18pt" font-weight="bold" margin-top="0.1in">
|
|
dolore aliqua
|
|
</fo:block>
|
|
<fo:block font-family="Helvetica" font-size="10pt" font-weight="normal">
|
|
<xsl:if test="$showBankInformation='true'">
|
|
<fo:block font-family="Helvetica" font-size="14pt" font-weight="normal" margin-top="1em">
|
|
quis exercitation
|
|
</fo:block>
|
|
<fo:block font-family="Helvetica" font-weight="normal" margin-left="2em">
|
|
<xsl:if test="/invoice/@type='invoice'">
|
|
laboris ut aliquip ea <xsl:value-of select="/invoice/@number"/> ipsum sit consectetur elit do tempor ut
|
|
</xsl:if>
|
|
quis exercitation laboris ut aliquip ea consequat aute dolor reprehenderit voluptate esse
|
|
</fo:block>
|
|
<fo:block margin="0.5em 1em 0.5em 1em" background-color="#eee" text-align="left" font-size="0.9em" padding="1em">
|
|
<xsl:if test="/invoice/@type='Bla3' or /invoice/@type='Bla2'">
|
|
<fo:block>Lorem dolor amet adipisicing sed eiusmod incididunt </fo:block>
|
|
<fo:block>Lorem dolor amet adipisicing sed eiusmod incididunt </fo:block>
|
|
<fo:block>Lorem dolor</fo:block>
|
|
<fo:block>Lorem dolor amet adipisicing sed eiusmod incididunt </fo:block>
|
|
</xsl:if>
|
|
<xsl:if test="/invoice/@type='prefix-ING'">
|
|
<fo:block>Lorem dolor amet adipisicing sed eiusmod incididunt</fo:block>
|
|
<fo:block>Lorem dolor amet adipisicing sed eiusmod incididunt </fo:block>
|
|
<fo:block>Lorem dolor</fo:block>
|
|
<fo:block>Lorem dolor amet adipisicing sed eiusmod incididunt </fo:block>
|
|
</xsl:if>
|
|
<xsl:if test="/invoice/@type='prefix-GARANTI'">
|
|
<fo:block>Lorem dolor amet adipisicing sed eiusmod incididunt</fo:block>
|
|
<fo:block>Lorem dolor amet adipisicing sed eiusmod incididunt </fo:block>
|
|
<fo:block>Lorem dolor</fo:block>
|
|
<fo:block>Lorem dolor amet adipisicing sed eiusmod incididunt </fo:block>
|
|
</xsl:if>
|
|
|
|
<xsl:if test="/invoice/@type='prefix2-BRD' or /invoice/@type='ComponentSource' ">
|
|
<fo:block>Lorem dolor amet adipisicing sed eiusmod incididunt </fo:block>
|
|
<fo:block>Lorem dolor amet adipisicing sed eiusmod incididunt </fo:block>
|
|
<fo:block>Lorem dolor</fo:block>
|
|
<fo:block>Lorem dolor amet adipisicing sed eiusmod incididunt </fo:block>
|
|
</xsl:if>
|
|
<xsl:if test="/invoice/@type='prefix2-CEC'">
|
|
<fo:block>Lorem dolor amet adipisicing sed</fo:block>
|
|
<fo:block>Lorem dolor amet adipisicing sed eiusmod incididunt </fo:block>
|
|
<fo:block>Lorem dolor</fo:block>
|
|
<fo:block>Lorem dolor amet adipisicing sed eiusmod incididunt </fo:block>
|
|
</xsl:if>
|
|
<!--Contul de GBP-->
|
|
<xsl:if test="/invoice/@type='SyncroSoftLTD'">
|
|
<fo:block>Lorem dolor amet adipisicing sed eiusmod incididunt </fo:block>
|
|
<fo:block>Lorem dolor amet adipisicing sed eiusmod incididunt </fo:block>
|
|
<fo:block>Lorem dolor</fo:block>
|
|
<fo:block>Lorem dolor amet adipisicing sed eiusmod incididunt </fo:block>
|
|
</xsl:if>
|
|
<xsl:if test="/invoice/@type='prefix2-BCR' ">
|
|
<fo:block>Lorem dolor amet adipisicing sed eiusmod incididunt </fo:block>
|
|
<fo:block>Lorem dolor amet adipisicing sed eiusmod incididunt</fo:block>
|
|
<fo:block>Lorem dolor</fo:block>
|
|
<fo:block>Lorem dolor amet adipisicing sed eiusmod incididunt</fo:block>
|
|
</xsl:if>
|
|
<xsl:if test="/invoice/@type='prefix2-Unicredit'">
|
|
<fo:block>Lorem dolor amet adipisicing sed eiusmod incididunt</fo:block>
|
|
<fo:block>Lorem dolor amet adipisicing sed eiusmod incididunt </fo:block>
|
|
<fo:block>Lorem dolor</fo:block>
|
|
<fo:block>Lorem dolor amet adipisicing sed eiusmod incididunt</fo:block>
|
|
</xsl:if>
|
|
<xsl:if test="/invoice/@type='prefix2-Alpha'">
|
|
<fo:block>Lorem dolor amet adipisicing sed eiusmod incididunt </fo:block>
|
|
<fo:block>Lorem dolor amet adipisicing sed eiusmod incididunt </fo:block>
|
|
<fo:block>Lorem dolor</fo:block>
|
|
<fo:block>Lorem dolor amet adipisicing sed eiusmod incididunt</fo:block>
|
|
</xsl:if>
|
|
<xsl:if test="/invoice/@type='prefix2-Raiff'">
|
|
<fo:block>Lorem dolor amet adipisicing sed eiusmod incididunt </fo:block>
|
|
<fo:block>Lorem dolor amet adipisicing sed eiusmod incididunt </fo:block>
|
|
<fo:block>Lorem dolor</fo:block>
|
|
<fo:block>Lorem dolor amet adipisicing sed eiusmod incididunt</fo:block>
|
|
</xsl:if>
|
|
</fo:block>
|
|
</xsl:if>
|
|
</fo:block>
|
|
<fo:block margin-top="0.8em" padding-top="0.5em" font-size="0.8em"> <!--break-before="page" -->
|
|
magna Ut ad veniam, nostrud ullamco nisi
|
|
<fo:block margin-left="4em" >
|
|
<fo:block>Lorem dolor amet</fo:block>
|
|
<fo:block>Lorem dolor amet adipisicing sed</fo:block>
|
|
</fo:block>
|
|
</fo:block>
|
|
</fo:flow>
|
|
</fo:page-sequence>
|
|
</fo:root>
|
|
</xsl:template>
|
|
|
|
<xsl:template name="sum">
|
|
<xsl:param name="index" select="1"/>
|
|
<xsl:param name="n" select="0"/>
|
|
<xsl:choose>
|
|
<xsl:when test="$index > $n">
|
|
<xsl:value-of select="0"/>
|
|
</xsl:when>
|
|
<xsl:otherwise>
|
|
<xsl:variable name="sum2">
|
|
<xsl:call-template name="sum">
|
|
<xsl:with-param name="index" select="$index+1"/>
|
|
<xsl:with-param name="n" select="$n"/>
|
|
</xsl:call-template>
|
|
</xsl:variable>
|
|
<xsl:value-of
|
|
select="$sum2 + /invoice/products/product[position()=$index]/quantity * /invoice/products/product[position()=$index]/unit-cost"
|
|
/>
|
|
</xsl:otherwise>
|
|
</xsl:choose>
|
|
</xsl:template>
|
|
<xsl:template match="*"/>
|
|
</xsl:stylesheet>
|