~jamesj/openobject-addons/c2c_budget_fixes

« back to all changes in this revision

Viewing changes to huissier/report/palais.xsl

  • Committer: nel
  • Date: 2007-08-14 06:11:20 UTC
  • Revision ID: nel-96391bdfa9467fc117b8314ff31cb2450b2283ae
HUISSIER: add huissier module from branch huissier

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?xml version="1.0" encoding="iso-8859-1"?>
 
2
 
 
3
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format">
 
4
 
 
5
        <xsl:decimal-format name="MyFormat" NaN="" zero-digit="0" decimal-separator="," grouping-separator="."/>
 
6
 
 
7
        <xsl:template match="/">
 
8
                <xsl:apply-templates select="listing"/>
 
9
        </xsl:template>
 
10
 
 
11
        <xsl:template match="listing">
 
12
                <document xmlns:fo="http://www.w3.org/1999/XSL/Format">
 
13
                        <template leftMargin="2.0cm" rightMargin="2.0cm" topMargin="2.0cm" bottomMargin="2.0cm" title="" author="Generated by Tiny ERP" pageSize="29.7cm,21cm">
 
14
                                <pageTemplate id="first_page">
 
15
                                        <pageGraphics>
 
16
                                                <setFont name="Helvetica" size="10"/>
 
17
                                                <drawString x="1.0cm" y="19.8cm">MAISON DES HUISSIERS DE JUSTICE DE BRUXELLES S.C.</drawString>
 
18
                                                <drawString x="1.0cm" y="19.3cm">Place Anneessens 21-22</drawString>
 
19
                                                <drawString x="1.0cm" y="18.8cm">1000 BRUXELLES</drawString>
 
20
 
 
21
                                                <setFont name="Helvetica" size="11"/>
 
22
                                                <drawRightString x="28.7cm" y="19.8cm">Bruxelles, le <xsl:value-of select="today"/></drawRightString>
 
23
                                                
 
24
                                                <setFont name="Helvetica-Bold" size="13"/>
 
25
                                                <drawCentredString x="14.85cm" y="17.8cm">STRICTEMENT CONFIDENTIEL</drawCentredString>
 
26
                                        </pageGraphics>
 
27
 
 
28
                                        <frame id="list" x1="1.0cm" y1="1.0cm" width="27.7cm" height="16cm"/>
 
29
                                </pageTemplate>
 
30
 
 
31
                                <pageTemplate id="other_pages">
 
32
                                        <pageGraphics>
 
33
                                        </pageGraphics>
 
34
                                        
 
35
                                        <frame id="list" x1="1.0cm" y1="1.0cm" width="27.7cm" height="19cm"/>
 
36
                                </pageTemplate>
 
37
                        </template>
 
38
 
 
39
                        <stylesheet>
 
40
                                <paraStyle name="small" fontName="Courier" fontSize="12" spaceBefore="0mm" spaceAfter="0mm"/>
 
41
                                <paraStyle name="verysmall" fontSize="10" fontName="Courier" spaceBefore="0mm" spaceAfter="0mm"/>
 
42
                                <paraStyle name="smallest" fontSize="8" fontName="Courier" spaceBefore="-1mm" spaceAfter="-1Mm"/>
 
43
 
 
44
                                <blockTableStyle id="palais">
 
45
                                        <blockValign value="TOP"/>
 
46
                                        <blockAlignment value="LEFT"/>
 
47
                                        <blockAlignment value="RIGHT" start="-1,0" stop="-1,-1"/>
 
48
                                        <blockAlignment value="RIGHT" start="3,0" stop="3,-1"/>
 
49
<!--                                    
 
50
                                        <blockFont name="Helvetica-Bold" size="10"/>
 
51
-->                                     
 
52
                                        <blockFont name="Helvetica-Bold" size="10" start="3,0" stop="3,-1"/>
 
53
                                        <blockTextColor colorName="black"/>
 
54
                                        <lineStyle kind="GRID" thickness="0.5" colorName="black" start="0,0" stop="-1,-1"/>
 
55
                                </blockTableStyle>
 
56
                        </stylesheet>
 
57
 
 
58
                        <story>
 
59
                                <para>Chers Confr�res,</para>
 
60
                                <para>
 
61
                                        <xsl:text>Voici le relev� des ventes sur saisies pour la p�riode du </xsl:text>  
 
62
                                        <xsl:call-template name="format-date"><xsl:with-param name="date" select="date1"/></xsl:call-template>
 
63
                                        <xsl:text> au </xsl:text>
 
64
                                        <xsl:call-template name="format-date"><xsl:with-param name="date" select="date2"/></xsl:call-template>
 
65
                                        <xsl:text>.</xsl:text>
 
66
                                </para>
 
67
                                
 
68
                                <spacer length="1cm"/>
 
69
 
 
70
                                <blockTable colWidths="8cm,8.2cm,2.8cm,2.0cm,4cm,2.3cm" style="palais">
 
71
                                        <xsl:apply-templates select="dossier">
 
72
                                                <xsl:sort select="date"/>
 
73
                                        </xsl:apply-templates>
 
74
                                </blockTable>
 
75
                        </story>
 
76
                </document>
 
77
        </xsl:template>
 
78
        
 
79
        <xsl:template match="dossier">
 
80
                <tr>
 
81
                        <td><para><xsl:value-of select="name"/></para></td>
 
82
                        <td><para>
 
83
                                <xsl:value-of select="street"/>
 
84
                                <xsl:if test="city!=''">
 
85
                                        <xsl:text> � </xsl:text>
 
86
                                        <xsl:value-of select="zip"/>
 
87
                                        <xsl:text> </xsl:text>
 
88
                                        <xsl:value-of select="city"/>
 
89
                                </xsl:if>
 
90
                        </para></td>
 
91
                        <td><para>
 
92
                                <xsl:choose>
 
93
                                        <xsl:when test="vat!=''">
 
94
                                                <xsl:value-of select="vat"/>
 
95
                                        </xsl:when>
 
96
                                        <xsl:otherwise>
 
97
<!--                                    
 
98
                                                <xsl:call-template name="format-date"><xsl:with-param name="date" select="birthdate"/></xsl:call-template>
 
99
-->                                             
 
100
                                                <xsl:value-of select="birthdate"/>
 
101
                                        </xsl:otherwise>
 
102
                                </xsl:choose>
 
103
                        </para></td>
 
104
                        <td><xsl:value-of select="format-number(adj, '#.##0,00', 'MyFormat')"/></td>
 
105
                        <td><para><xsl:value-of select="study"/></para></td>
 
106
                        <td><xsl:call-template name="format-date"><xsl:with-param name="date" select="date"/></xsl:call-template></td>
 
107
                </tr>
 
108
        </xsl:template>
 
109
 
 
110
        <xsl:template name="format-date">
 
111
                <xsl:param name="date"/>
 
112
                <xsl:variable name="year" select="substring-before($date, '-')"/>
 
113
                <xsl:variable name="month" select="substring-before(substring-after($date, '-'), '-')"/>
 
114
                <xsl:variable name="day" select="substring-after(substring-after($date, '-'), '-')"/>
 
115
                <xsl:value-of select="concat($day, '/', $month, '/', $year)"/>
 
116
        </xsl:template>
 
117
</xsl:stylesheet>
 
118
 
 
119