Difference between revisions of "Accounting export template Quadratus"

Jump to: navigation, search
m (Created page with "<xml><?xml version="1.0" encoding="ISO-8859-1"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="text" media-type="text/pl...")
 
m (Text replacement - "[[Accounting_export_template_list|" to "[[Accounting-export-template-list|")
 
(10 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<xml><?xml version="1.0" encoding="ISO-8859-1"?>
+
=Introduction=
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
This page described the [[Accounting-export-template-list|accounting export template]] Quadratus.
    <xsl:output method="text" media-type="text/plain" indent="no" standalone="yes"
+
        omit-xml-declaration="yes" encoding="ISO-8859-1"/>
+
    <xsl:strip-space elements="*"/>
+
  
    <xsl:include href="xsl/str.template.xsl"/>
+
=Output file description=
    <xsl:include href="xsl/formatFunctions.xsl"/>
+
    <xsl:include href="xsl/accountingFormatFunction.xsl"/>
+
  
    <!--     Main      -->
+
* Encoding charset: ISO-8859-15
    <xsl:template match="/">
+
* Field character separator: Tab
        <output-format>
+
* Fields:
            <content_type>text/csv</content_type>
+
{| class="wikitable"
            <charset>ISO-8859-15</charset>
+
!Name!!Length (in character)!!Description
            <file_prefix>exportQuatratus_</file_prefix>
+
|-
            <file_extension>txt</file_extension>
+
|Character M||||
            <converter>ISO</converter>
+
|-
        </output-format>
+
|Export account||8||Filled with appended spaces to match length
        <xsl:apply-templates select="account_entrys/account_entry">
+
|-
            <xsl:sort select="@id" order="ascending" data-type="number"/>
+
|Export code||||
        </xsl:apply-templates>
+
|-
    </xsl:template>
+
|Text 000||||
 +
|-
 +
|Date||||Format is DDMMYY
 +
|-
 +
|Export account||13||Filled with appended spaces to match length
 +
|-
 +
|||||1 space
 +
|-
 +
|||||20 spaces
 +
|-
 +
|Description||35||Filled with appended spaces to match length
 +
|-
 +
|Text C+ or D+||||C+ for credit, D+ for debit
 +
|-
 +
|Amount||12||Number multiplied by 100 and filled with prepended zeros to match length
 +
|-
 +
|||||8 spaces
 +
|-
 +
|||||6 spaces
 +
|-
 +
|||||2 spaces
 +
|-
 +
|||||3 spaces
 +
|-
 +
|||||5 spaces
 +
|-
 +
|Customer bill id||10||Filled with appended spaces to match length
 +
|-
 +
|||||10 spaces
 +
|-
 +
|Flow id||8||Filled with prepended zeros to match length
 +
|-
 +
|EUR
 +
|-
 +
|Export code||||
 +
|-
 +
|||||1 space
 +
|-
 +
|||||'''O1D''' if it's a VAT account entry otherwise 3 spaces
 +
|-
 +
|Comment||30||Filled with appended spaces to match length
 +
|-
 +
|||||'''AF''' if it's a VAT account entry otherwise 2 spaces
 +
|-
 +
|Description||10||Filled with appended spaces to match length
 +
|-
 +
|||||10 spaces
 +
|-
 +
|Character +||||
 +
|-
 +
|Amount||12||Number multiplied by 100 and filled with prepended zeros to match length
 +
|-
 +
|||||12 spaces
 +
|-
 +
|||||10 spaces
 +
|-
 +
|||||28 spaces
 +
|-
 +
|}
  
    <!--show account line -->
+
=Example of output file=
    <xsl:template match="account_entry">
+
        <xsl:variable name="flow_id" select="flow_id"/>
+
        <xsl:variable name="accounts"
+
            select="/account_entrys/account_entry[flow_id=$flow_id]/account/export_account"/>
+
        <xsl:variable name="line">
+
            <!-- mouvment type on 1 string -->
+
            <xsl:text>M</xsl:text>
+
           
+
            <!-- account number on 8 strings -->
+
            <xsl:call-template name="format-text">
+
                <xsl:with-param name="text" select="account/export_account"/>
+
                <xsl:with-param name="size" select="8"/>
+
            </xsl:call-template>
+
  
            <!-- paper on 2 strings -->
+
<pre>M411000  VT000010114                     D+000000009900                        34                  00000067EURVT                                    Pilote CHR          +000000009900                                                 
            <xsl:call-template name="choose-paper">
+
M706BVOI VT000010114                     C+000000009900                        34                  00000067EURVT                                    Solo FBVOI          +000000009900                                                 
                <xsl:with-param name="flowAccounts" select="$accounts"/>
+
M411000 VT000010114                     D+000000005100                        35                  00000069EURVT                                    Pilote Élé          +000000005100                                                 
            </xsl:call-template>
+
M706BVOI VT000010114                     C+000000005100                        35                  00000069EURVT                                    Solo FBVOI          +000000005100                                                 
           
+
M411000  VT000010114                     D+000000005100                        36                  00000071EURVT                                    Pilote Nad          +000000005100                                                 
            <!-- folio on 3 string default 000 -->
+
M706BVOI VT000010114                     C+000000005100                        36                  00000071EURVT                                    Solo FBVOI          +000000005100                                                 
            <xsl:text>000</xsl:text>
+
M411000  VT000020114                     D+000000040800                        37                  00000073EURVT                                    Pilote Élé          +000000040800                                                 
 
+
M706BVOI VT000020114                     C+000000040800                        37                  00000073EURVT                                    Solo FBVOI          +000000040800                                                 
            <!-- date on 6 strings -->
+
M411000 VT000030114                    D+000000009900                        38                  00000075EURVT                                    Pilote Chr         +000000009900                                                 
            <xsl:call-template name="displayDate">
+
M706BVOI VT000030114                    C+000000009900                        38                  00000075EURVT                                    Solo FBVOI         +000000009900                                                 
                <xsl:with-param name="date">
+
M411000 VT000030114                     D+000000012400                        39                  00000077EURVT                                    Pilote Mar          +000000012400                                                 
                     <xsl:call-template name="dateTimeISO">
+
M706BVOI VT000030114                     C+000000012400                        39                  00000077EURVT                                    Solo FBVOI          +000000012400                                                 
                        <xsl:with-param name="dateTime">
+
M411000  VT000050114                     D+000000009900                        40                  00000079EURVT                                    Pilote Erw          +000000009900                                                 
                            <xsl:value-of select="converted_account_date"/>
+
M706BVOI VT000050114                     C+000000009900                        40                  00000079EURVT                                    Solo FBVOI          +000000009900                                                 
                        </xsl:with-param>
+
M411000 VT000010114                     D+000000015900                        172                00000343EURVT                                    Pilote Sus          +000000015900                                                 
                     </xsl:call-template>
+
M706GNNB VT000010114                     C+000000015900                        172                00000343EURVT                                    Solo FGNNB          +000000015900                                                 
                </xsl:with-param>
+
M411000  VT000010114                     D+000000013800                        230                 00000459EURVT                                    Pilote Tho          +000000013800                                                 
            </xsl:call-template>
+
M706GIKI VT000010114                    C+000000013800                        230                 00000459EURVT                                    Solo FGIKI          +000000013800                                                 
 
+
M411000  VT000010114                     D+000000011000                        231                 00000461EURVT                                    Pilote fir          +000000011000                                                 
            <!-- Code libellé 1 string -->
+
M706GIKI VT000010114                    C+000000011000                        231                 00000461EURVT                                    Solo FGIKI          +000000011000                                                 
            <xsl:text> </xsl:text>
+
M411000  VT000010114                     D+000000006900                        232                00000463EURVT                                    Pilote Tho          +000000006900                                                 
 
+
M706GIKI VT000010114                     C+000000006900                        232                 00000463EURVT                                    Solo FGIKI          +000000006900                                                 
            <!-- label on 20 strings -->
+
M411000 VT000010114                    D+000000020700                        233                 00000465EURVT                                    Pilote Ric          +000000020700                                                 
            <xsl:text>                    </xsl:text>
+
M706GIKI VT000010114                     C+000000020700                        233                 00000465EURVT                                    Solo FGIKI          +000000020700                                                 
 
+
M411000  VT000020114                    D+000000034500                        234                 00000467EURVT                                    Pilote Bri          +000000034500                                                 
            <!-- amount on 13 strings firt = sign, value in cent -->
+
M706GIKI VT000020114                     C+000000034500                        234                 00000467EURVT                                    Solo FGIKI          +000000034500                                                 
            <xsl:choose>
+
M411000  VT000030114                    D+000000013800                        235                 00000469EURVT                                    Pilote fir          +000000013800                                                 
                <xsl:when test="debit!=0">
+
M706GIKI VT000030114                    C+000000013800                        235                 00000469EURVT                                    Solo FGIKI         +000000013800                                                 
                     <xsl:text>D</xsl:text>   
+
M411000 VT000030114                    D+000000013800                        236                 00000471EURVT                                    Pilote fir          +000000013800                                                 
                     <xsl:text>+</xsl:text>
+
M706GIKI VT000030114                     C+000000013800                        236                00000471EURVT                                    Solo FGIKI          +000000013800                                                 
                     <xsl:value-of select="format-number(debit*100,'000000000000')"/>
+
M411000  VT000050114                     D+000000011000                        237                 00000473EURVT                                    Pilote tom          +000000011000                                                 
                </xsl:when>
+
M706GIKI VT000050114                     C+000000011000                        237                 00000473EURVT                                    Solo FGIKI         +000000011000                                                 
                <xsl:otherwise>
+
</pre>
                     <xsl:text>C</xsl:text>
+
                     <xsl:text>+</xsl:text>
+
                     <xsl:value-of select="format-number(credit*100,'000000000000')"/> 
+
                </xsl:otherwise>
+
            </xsl:choose>
+
 
+
            <!-- account linked 8 strings -->
+
            <xsl:text>        </xsl:text>
+
            <!-- Deadline date 6 strings -->
+
            <xsl:text>      </xsl:text>
+
           
+
            <!-- Lettring 2 strings -->
+
            <xsl:text> </xsl:text>
+
           
+
            <!-- Statistic code 3 strings -->
+
            <xsl:text>  </xsl:text>
+
 
+
            <!-- Document number 5 strings -->
+
            <xsl:text>    </xsl:text>
+
+
            <!-- entry number 10 strings-->
+
            <xsl:call-template name="format-text">
+
                <xsl:with-param name="text" select="customer_bill_account_entry/customer_bill_id"/>
+
                <xsl:with-param name="size" select="10"/>
+
            </xsl:call-template>
+
          
+
            <!-- Quantity 10 strings -->
+
            <xsl:text>         </xsl:text>
+
           
+
            <!-- accouting document 8 strings -->
+
            <xsl:value-of select="format-number($flow_id, '00000000')"/>
+
 
+
            <!-- currency  3 strings -->
+
            <xsl:text>EUR</xsl:text>
+
 
+
            <!-- paper 3 strings  -->
+
            <xsl:call-template name="format-text">
+
                <xsl:with-param name="text">
+
                     <xsl:call-template name="choose-paper">
+
                        <xsl:with-param name="flowAccounts" select="$accounts"/>
+
                     </xsl:call-template>
+
                </xsl:with-param>
+
                <xsl:with-param name="size" select="3"/>
+
            </xsl:call-template>
+
           
+
            <!-- if TVA 3 next fieds-->
+
            <xsl:choose>
+
                <xsl:when test="account/category=6">
+
                     <!-- flag TVA 1 string -->
+
                     <xsl:text>O</xsl:text>
+
                    <!-- code TVA 1 string -->
+
                     <xsl:text>1</xsl:text>
+
                     <!-- TVA method 1 string -->                   
+
                     <xsl:text>D</xsl:text>
+
                 </xsl:when>
+
                 <xsl:otherwise>
+
                     <xsl:text>  </xsl:text>
+
                 </xsl:otherwise>
+
            </xsl:choose>
+
           
+
            <!-- label on 30 strings -->
+
            <xsl:call-template name="format-text">
+
                 <xsl:with-param name="text">
+
                     <xsl:call-template name="str.characterRemover">
+
                        <xsl:with-param name="string2Clean">
+
                            <xsl:value-of select="comments"/>
+
                            <xsl:text>&#160;</xsl:text>
+
                            <xsl:value-of select="flight/comments"/>
+
                        </xsl:with-param>
+
                        <xsl:with-param name="character2Remove">
+
                            <xsl:text></xsl:text>
+
                        </xsl:with-param>
+
                     </xsl:call-template>
+
                 </xsl:with-param>
+
                <xsl:with-param name="size" select="30"/>
+
            </xsl:call-template>
+
 
+
            <!-- code TVA 2 strings -->
+
            <xsl:choose>
+
                 <xsl:when test="account/category=6">
+
                     <xsl:text>AF</xsl:text>
+
                 </xsl:when>
+
                 <xsl:otherwise>
+
                     <xsl:text>  </xsl:text>
+
                 </xsl:otherwise>
+
            </xsl:choose>
+
           
+
            <!-- account name on 10 strings -->
+
            <xsl:call-template name="accountExportName">
+
                 <xsl:with-param name="entry" select="account_entry"/>
+
                 <xsl:with-param name="size" select="10"/>
+
            </xsl:call-template>           
+
            <!-- not used on 10 strings -->
+
            <xsl:text>         </xsl:text>
+
           
+
            <!-- amount currency on 13 strings with sign-->
+
            <xsl:choose>
+
                 <xsl:when test="debit!=0">
+
                     <xsl:text>+</xsl:text>
+
                     <xsl:value-of select="format-number(debit*100,'000000000000')"/>
+
                 </xsl:when>
+
                <xsl:otherwise>
+
                     <xsl:text>+</xsl:text>
+
                    <xsl:value-of select="format-number(credit*100,'000000000000')"/> 
+
                 </xsl:otherwise>
+
            </xsl:choose> 
+
 
+
            <!-- file associated on 12 strings -->
+
            <xsl:text>            </xsl:text>
+
 
+
            <!-- quantiy 2 on 10 strings -->
+
            <xsl:text>         </xsl:text>
+
           
+
            <!-- export only on 28 strings -->
+
            <xsl:text>                            </xsl:text>
+
           
+
            <xsl:value-of select="$CR"/><xsl:value-of select="$LF"/>
+
        </xsl:variable>
+
        <xsl:value-of select="$line" disable-output-escaping="yes"/>
+
    </xsl:template>
+
 
+
    <xsl:template name="displayDate">
+
        <xsl:param name="date"/>
+
        <xsl:value-of select="substring($date,9,2)"/>
+
        <xsl:value-of select="substring($date,6,2)"/>
+
        <xsl:value-of select="substring($date,3,2)"/>
+
    </xsl:template>
+
 
+
</xsl:stylesheet></xml>
+

Latest revision as of 11:13, 18 July 2016

Introduction

This page described the accounting export template Quadratus.

Output file description

  • Encoding charset: ISO-8859-15
  • Field character separator: Tab
  • Fields:
Name Length (in character) Description
Character M
Export account 8 Filled with appended spaces to match length
Export code
Text 000
Date Format is DDMMYY
Export account 13 Filled with appended spaces to match length
1 space
20 spaces
Description 35 Filled with appended spaces to match length
Text C+ or D+ C+ for credit, D+ for debit
Amount 12 Number multiplied by 100 and filled with prepended zeros to match length
8 spaces
6 spaces
2 spaces
3 spaces
5 spaces
Customer bill id 10 Filled with appended spaces to match length
10 spaces
Flow id 8 Filled with prepended zeros to match length
EUR
Export code
1 space
O1D if it's a VAT account entry otherwise 3 spaces
Comment 30 Filled with appended spaces to match length
AF if it's a VAT account entry otherwise 2 spaces
Description 10 Filled with appended spaces to match length
10 spaces
Character +
Amount 12 Number multiplied by 100 and filled with prepended zeros to match length
12 spaces
10 spaces
28 spaces

Example of output file

M411000  VT000010114                     D+000000009900                        34                  00000067EURVT                                    Pilote CHR          +000000009900                                                  
M706BVOI VT000010114                     C+000000009900                        34                  00000067EURVT                                    Solo FBVOI          +000000009900                                                  
M411000  VT000010114                     D+000000005100                        35                  00000069EURVT                                    Pilote Élé          +000000005100                                                  
M706BVOI VT000010114                     C+000000005100                        35                  00000069EURVT                                    Solo FBVOI          +000000005100                                                  
M411000  VT000010114                     D+000000005100                        36                  00000071EURVT                                    Pilote Nad          +000000005100                                                  
M706BVOI VT000010114                     C+000000005100                        36                  00000071EURVT                                    Solo FBVOI          +000000005100                                                  
M411000  VT000020114                     D+000000040800                        37                  00000073EURVT                                    Pilote Élé          +000000040800                                                  
M706BVOI VT000020114                     C+000000040800                        37                  00000073EURVT                                    Solo FBVOI          +000000040800                                                  
M411000  VT000030114                     D+000000009900                        38                  00000075EURVT                                    Pilote Chr          +000000009900                                                  
M706BVOI VT000030114                     C+000000009900                        38                  00000075EURVT                                    Solo FBVOI          +000000009900                                                  
M411000  VT000030114                     D+000000012400                        39                  00000077EURVT                                    Pilote Mar          +000000012400                                                  
M706BVOI VT000030114                     C+000000012400                        39                  00000077EURVT                                    Solo FBVOI          +000000012400                                                  
M411000  VT000050114                     D+000000009900                        40                  00000079EURVT                                    Pilote Erw          +000000009900                                                  
M706BVOI VT000050114                     C+000000009900                        40                  00000079EURVT                                    Solo FBVOI          +000000009900                                                  
M411000  VT000010114                     D+000000015900                        172                 00000343EURVT                                    Pilote Sus          +000000015900                                                  
M706GNNB VT000010114                     C+000000015900                        172                 00000343EURVT                                    Solo FGNNB          +000000015900                                                  
M411000  VT000010114                     D+000000013800                        230                 00000459EURVT                                    Pilote Tho          +000000013800                                                  
M706GIKI VT000010114                     C+000000013800                        230                 00000459EURVT                                    Solo FGIKI          +000000013800                                                  
M411000  VT000010114                     D+000000011000                        231                 00000461EURVT                                    Pilote fir          +000000011000                                                  
M706GIKI VT000010114                     C+000000011000                        231                 00000461EURVT                                    Solo FGIKI          +000000011000                                                  
M411000  VT000010114                     D+000000006900                        232                 00000463EURVT                                    Pilote Tho          +000000006900                                                  
M706GIKI VT000010114                     C+000000006900                        232                 00000463EURVT                                    Solo FGIKI          +000000006900                                                  
M411000  VT000010114                     D+000000020700                        233                 00000465EURVT                                    Pilote Ric          +000000020700                                                  
M706GIKI VT000010114                     C+000000020700                        233                 00000465EURVT                                    Solo FGIKI          +000000020700                                                  
M411000  VT000020114                     D+000000034500                        234                 00000467EURVT                                    Pilote Bri          +000000034500                                                  
M706GIKI VT000020114                     C+000000034500                        234                 00000467EURVT                                    Solo FGIKI          +000000034500                                                  
M411000  VT000030114                     D+000000013800                        235                 00000469EURVT                                    Pilote fir          +000000013800                                                  
M706GIKI VT000030114                     C+000000013800                        235                 00000469EURVT                                    Solo FGIKI          +000000013800                                                  
M411000  VT000030114                     D+000000013800                        236                 00000471EURVT                                    Pilote fir          +000000013800                                                  
M706GIKI VT000030114                     C+000000013800                        236                 00000471EURVT                                    Solo FGIKI          +000000013800                                                  
M411000  VT000050114                     D+000000011000                        237                 00000473EURVT                                    Pilote tom          +000000011000                                                  
M706GIKI VT000050114                     C+000000011000                        237                 00000473EURVT                                    Solo FGIKI          +000000011000