~technofluid-team/openobject-addons/technofluid_multiple_installations

« back to all changes in this revision

Viewing changes to stock/report/lot_overview_all.xsl

  • Committer: pinky
  • Date: 2006-12-07 13:41:40 UTC
  • Revision ID: pinky-dedd7f8a42bd4557112a0513082691b8590ad6cc
New trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?xml version="1.0" encoding="utf-8"?>
 
2
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format">
 
3
 
 
4
        <xsl:import href="../../custom/corporate_defaults.xsl"/>
 
5
        <xsl:import href="../../base/report/rml_template.xsl"/>
 
6
        
 
7
        <xsl:template name="first_page_frames">
 
8
                <frame id="main" x1="1cm" y1="2.5cm" width="19.0cm" height="23cm"/>
 
9
        </xsl:template>
 
10
        
 
11
        <xsl:template match="/">
 
12
                <xsl:call-template name="rml"/>
 
13
        </xsl:template>
 
14
 
 
15
        <!-- stylesheet -->
 
16
 
 
17
        <xsl:template name="stylesheet">
 
18
                <blockTableStyle id="products">
 
19
                         <blockFont name="Helvetica-Bold" size="10" start="0,0" stop="-1,0"/>
 
20
                         <blockBackground colorName="grey" start="0,0" stop="-1,0"/>
 
21
                         <blockTextColor colorName="white" start="0,0" stop="-1,0"/>
 
22
                         <blockValign value="TOP"/>
 
23
                         <blockAlignment value="CENTER" start="0,0" stop="-1,0"/>
 
24
                         <blockAlignment value="RIGHT" start="1,1" stop="-1,-1"/>
 
25
                         <lineStyle kind="GRID" colorName="black"/>
 
26
                </blockTableStyle>
 
27
        </xsl:template>
 
28
        
 
29
        <xsl:template name="story">
 
30
                <xsl:apply-templates select="lotlist"/>
 
31
        </xsl:template>
 
32
        
 
33
        <xsl:template name="lotlist">
 
34
                <nextFrame/>
 
35
                <setNextTemplate name="other_pages"/>
 
36
                <xsl:apply-templates select="lot"/>
 
37
        </xsl:template>
 
38
        
 
39
        <xsl:template match="lot">
 
40
                
 
41
                <spacer length="1cm"/>
 
42
 
 
43
                <blockTable colWidths="2cm,6cm,2.5cm,2cm,2cm,2cm,2.5cm" style="products" repeatRows="1">
 
44
                        <tr>
 
45
                                <td t="1">Code</td><td t="1">Product</td><td t="1">Variants</td><td t="1">Amount</td><td t="1">UoM</td><td t="1">Unit Price</td><td t="1">Value</td>
 
46
                        </tr>
 
47
                        <xsl:apply-templates select="product"/>
 
48
                </blockTable>
 
49
                
 
50
                <setNextTemplate name="other_pages"/>
 
51
                <pageBreak/>
 
52
<!--
 
53
                <setNextTemplate name="first_page"/>
 
54
                <nextFrame/>
 
55
-->
 
56
        </xsl:template>
 
57
        
 
58
        <xsl:template match="product">
 
59
                <tr>
 
60
                        <td><para><xsl:value-of select="code"/></para></td>
 
61
                        <td><para><xsl:value-of select="name"/></para></td>
 
62
                        <td><para><xsl:value-of select="variants"/></para></td>
 
63
                        <td><xsl:value-of select="amount"/></td>
 
64
                        <td><xsl:value-of select="uom"/></td>
 
65
                        <td><xsl:value-of select="price"/></td>
 
66
                        <td><xsl:value-of select="amount * price"/></td>
 
67
<!--            <td><xsl:value-of select="//product_amount[id=$product_id]/amount"/></td>
 
68
                        <td><xsl:value-of select="//product_amount[id=$product_id]/amount * price"/></td> -->
 
69
                </tr>
 
70
        </xsl:template>
 
71
 
 
72
</xsl:stylesheet>