Difference between revisions of "Accounting export template CielRimport"

Jump to: navigation, search
m
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]] Rimport for Ciel software.
    <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"/>
+
* Encoding charset: ISO-8859-15
    <xsl:include href="xsl/accountingFormatFunction.xsl"/>
+
* Field character separator: Tab
 +
* Fields:
 +
{| class="wikitable"
 +
!Name!!Length (in character)!!Description
 +
|-
 +
|Flow number||6||Filled with prepended zeros to match length
 +
|-
 +
|Export code||||
 +
|-
 +
|Date||||Format is DD/MM/YYYY
 +
|-
 +
|Export account||13||Filled with appended spaces to match length
 +
|-
 +
|Description||35||Filled with appended spaces to match length
 +
|-
 +
|Amount||||Number with 2 digits after the decimal separator
 +
|-
 +
|Character C or D||||C for credit, D for debit
 +
|-
 +
|Character B||||
 +
|-
 +
|Comments||50||Filled with appended spaces to match length
 +
|}
  
    <!--      Main      -->
+
=Example of output file=
    <xsl:template match="/">
+
        <output-format>
+
            <content_type>text/plain</content_type>
+
            <charset>ISO-8859-15</charset>
+
            <file_prefix>Rimport_</file_prefix>
+
            <file_extension>txt</file_extension>
+
            <converter>ISO</converter>
+
        </output-format>
+
        <xsl:apply-templates select="account_entrys/account_entry">
+
            <xsl:sort select="@id" order="ascending" data-type="number"/>
+
        </xsl:apply-templates>
+
    </xsl:template>
+
  
    <!--show account line -->
+
<pre>000067 VT 01/01/2014 411000      Pilote CHRISTIAN CHRISTIAN        99.00 D B                                                  
    <xsl:template match="account_entry">
+
000067 VT 01/01/2014 706BVOI      Solo FBVOI                        99.00 C B                                                  
        <xsl:variable name="flow_id" select="flow_id"/>
+
000069 VT 01/01/2014 411000      Pilote Éléonore ÉLÉONORE          51.00 D B                                                  
        <xsl:variable name="accounts"
+
000069 VT 01/01/2014 706BVOI      Solo FBVOI                        51.00 C B                                                  
            select="/account_entrys/account_entry[flow_id=$flow_id]/account/export_account"/>
+
000071 VT 01/01/2014 411000      Pilote Nadine NADINE              51.00 D B                                                  
        <xsl:variable name="line">
+
000071 VT 01/01/2014 706BVOI      Solo FBVOI                        51.00 C B                                                  
            <!-- entry number -->
+
000073 VT 02/01/2014 411000      Pilote Éléonore ÉLÉONORE          408.00 D B                                                  
            <xsl:value-of select="format-number($flow_id, '000000')"/>
+
000073 VT 02/01/2014 706BVOI      Solo FBVOI                        408.00 C B                                                  
            <xsl:value-of select="$TAB"/>
+
000075 VT 03/01/2014 411000      Pilote Christophe LARATTE          99.00 D B                                                  
            <!-- paper on 2 strings -->
+
000075 VT 03/01/2014 706BVOI      Solo FBVOI                        99.00 C B                                                  
            <xsl:call-template name="choose-paper">
+
000077 VT 03/01/2014 411000      Pilote Marie-France MARIE-FRANCE  124.00 D B                                                  
                <xsl:with-param name="flowAccounts" select="$accounts"/>
+
000077 VT 03/01/2014 706BVOI      Solo FBVOI                        124.00 C B                                                  
            </xsl:call-template>
+
000079 VT 05/01/2014 411000      Pilote Erwan ERWAN                99.00 D B                                                  
            <xsl:value-of select="$TAB"/>
+
000079 VT 05/01/2014 706BVOI      Solo FBVOI                        99.00 C B                                                  
            <!-- date on 10 strings -->
+
000343 VT 01/01/2014 411000      Pilote Susie SUSIE                159.00 D B                                                  
            <xsl:call-template name="displayDate">
+
000343 VT 01/01/2014 706GNNB      Solo FGNNB                        159.00 C B                                                  
                <xsl:with-param name="date">
+
000459 VT 01/01/2014 411000      Pilote Thomas THOMAS              138.00 D B                                                  
                    <xsl:call-template name="dateTimeISO">
+
000459 VT 01/01/2014 706GIKI      Solo FGIKI                        138.00 C B                                                  
                        <xsl:with-param name="dateTime">
+
000461 VT 01/01/2014 411000      Pilote firstTest4 lastTest4        110.00 D B                                                  
                            <xsl:value-of select="converted_account_date"/>
+
000461 VT 01/01/2014 706GIKI      Solo FGIKI                        110.00 C B                                                  
                        </xsl:with-param>
+
000463 VT 01/01/2014 411000      Pilote Thomas THOMAS              69.00 D B                                                  
                    </xsl:call-template>
+
000463 VT 01/01/2014 706GIKI      Solo FGIKI                        69.00 C B                                                  
                </xsl:with-param>
+
000465 VT 01/01/2014 411000      Pilote Richard RICHARD            207.00 D B                                                  
            </xsl:call-template>
+
000465 VT 01/01/2014 706GIKI      Solo FGIKI                        207.00 C B                                                  
            <xsl:value-of select="$TAB"/>
+
000467 VT 02/01/2014 411000      Pilote Briac BRIAC                345.00 D B                                                  
            <!-- account number on 13 strings -->
+
000467 VT 02/01/2014 706GIKI      Solo FGIKI                        345.00 C B                                                  
            <xsl:call-template name="format-text">
+
000469 VT 03/01/2014 411000      Pilote firstTest5 lastTest5        138.00 D B                                                  
                <xsl:with-param name="text" select="account/export_account"/>
+
000469 VT 03/01/2014 706GIKI      Solo FGIKI                        138.00 C B                                                  
                <xsl:with-param name="size" select="13"/>
+
000471 VT 03/01/2014 411000      Pilote firstTest6 lastTest6        138.00 D B                                                  
            </xsl:call-template>
+
000471 VT 03/01/2014 706GIKI      Solo FGIKI                        138.00 C B                                                  
            <xsl:value-of select="$TAB"/>
+
000473 VT 05/01/2014 411000      Pilote tom TOM                    110.00 D B                                                  
            <!-- account name on 35 strings -->
+
000473 VT 05/01/2014 706GIKI      Solo FGIKI                        110.00 C B                                                  
            <xsl:call-template name="accountExportName">
+
</pre>
                <xsl:with-param name="entry" select="account_entry"/>
+
                <xsl:with-param name="size" select="35"/>
+
            </xsl:call-template>
+
            <xsl:value-of select="$TAB"/>
+
            <!-- amount + 1 string D or C -->
+
            <xsl:choose>
+
                <xsl:when test="debit!=0">
+
                    <xsl:value-of select="format-number(debit,'0.00')"/>
+
                    <xsl:value-of select="$TAB"/>
+
                    <xsl:text>D</xsl:text>
+
                </xsl:when>
+
                <xsl:otherwise>
+
                    <xsl:value-of select="format-number(credit,'0.00')"/>
+
                    <xsl:value-of select="$TAB"/>
+
                    <xsl:text>C</xsl:text>
+
                </xsl:otherwise>
+
            </xsl:choose>
+
            <xsl:value-of select="$TAB"/>
+
            <!-- code status 1 strings, B = brouillard -->
+
            <xsl:text>B</xsl:text>
+
            <xsl:value-of select="$TAB"/>
+
            <!-- label on 50 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="50"/>
+
            </xsl:call-template>
+
            <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:text>/</xsl:text>
+
        <xsl:value-of select="substring($date,6,2)"/>
+
        <xsl:text>/</xsl:text>
+
        <xsl:value-of select="substring($date,1,4)"/>
+
    </xsl:template>
+
 
+
</xsl:stylesheet></xml>
+

Latest revision as of 10:13, 18 July 2016

Introduction

This page described the accounting export template Rimport for Ciel software.

Output file description

  • Encoding charset: ISO-8859-15
  • Field character separator: Tab
  • Fields:
Name Length (in character) Description
Flow number 6 Filled with prepended zeros to match length
Export code
Date Format is DD/MM/YYYY
Export account 13 Filled with appended spaces to match length
Description 35 Filled with appended spaces to match length
Amount Number with 2 digits after the decimal separator
Character C or D C for credit, D for debit
Character B
Comments 50 Filled with appended spaces to match length

Example of output file

000067	VT	01/01/2014	411000       	Pilote CHRISTIAN CHRISTIAN         	99.00	D	B	                                                  
000067	VT	01/01/2014	706BVOI      	Solo FBVOI                         	99.00	C	B	                                                  
000069	VT	01/01/2014	411000       	Pilote Éléonore ÉLÉONORE           	51.00	D	B	                                                  
000069	VT	01/01/2014	706BVOI      	Solo FBVOI                         	51.00	C	B	                                                  
000071	VT	01/01/2014	411000       	Pilote Nadine NADINE               	51.00	D	B	                                                  
000071	VT	01/01/2014	706BVOI      	Solo FBVOI                         	51.00	C	B	                                                  
000073	VT	02/01/2014	411000       	Pilote Éléonore ÉLÉONORE           	408.00	D	B	                                                  
000073	VT	02/01/2014	706BVOI      	Solo FBVOI                         	408.00	C	B	                                                  
000075	VT	03/01/2014	411000       	Pilote Christophe LARATTE          	99.00	D	B	                                                  
000075	VT	03/01/2014	706BVOI      	Solo FBVOI                         	99.00	C	B	                                                  
000077	VT	03/01/2014	411000       	Pilote Marie-France MARIE-FRANCE   	124.00	D	B	                                                  
000077	VT	03/01/2014	706BVOI      	Solo FBVOI                         	124.00	C	B	                                                  
000079	VT	05/01/2014	411000       	Pilote Erwan ERWAN                 	99.00	D	B	                                                  
000079	VT	05/01/2014	706BVOI      	Solo FBVOI                         	99.00	C	B	                                                  
000343	VT	01/01/2014	411000       	Pilote Susie SUSIE                 	159.00	D	B	                                                  
000343	VT	01/01/2014	706GNNB      	Solo FGNNB                         	159.00	C	B	                                                  
000459	VT	01/01/2014	411000       	Pilote Thomas THOMAS               	138.00	D	B	                                                  
000459	VT	01/01/2014	706GIKI      	Solo FGIKI                         	138.00	C	B	                                                  
000461	VT	01/01/2014	411000       	Pilote firstTest4 lastTest4        	110.00	D	B	                                                  
000461	VT	01/01/2014	706GIKI      	Solo FGIKI                         	110.00	C	B	                                                  
000463	VT	01/01/2014	411000       	Pilote Thomas THOMAS               	69.00	D	B	                                                  
000463	VT	01/01/2014	706GIKI      	Solo FGIKI                         	69.00	C	B	                                                  
000465	VT	01/01/2014	411000       	Pilote Richard RICHARD             	207.00	D	B	                                                  
000465	VT	01/01/2014	706GIKI      	Solo FGIKI                         	207.00	C	B	                                                  
000467	VT	02/01/2014	411000       	Pilote Briac BRIAC                 	345.00	D	B	                                                  
000467	VT	02/01/2014	706GIKI      	Solo FGIKI                         	345.00	C	B	                                                  
000469	VT	03/01/2014	411000       	Pilote firstTest5 lastTest5        	138.00	D	B	                                                  
000469	VT	03/01/2014	706GIKI      	Solo FGIKI                         	138.00	C	B	                                                  
000471	VT	03/01/2014	411000       	Pilote firstTest6 lastTest6        	138.00	D	B	                                                  
000471	VT	03/01/2014	706GIKI      	Solo FGIKI                         	138.00	C	B	                                                  
000473	VT	05/01/2014	411000       	Pilote tom TOM                     	110.00	D	B	                                                  
000473	VT	05/01/2014	706GIKI      	Solo FGIKI                         	110.00	C	B