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">
4
<xsl:variable name="initial_bottom_pos">20.5</xsl:variable>
5
<xsl:variable name="initial_left_pos">0.5</xsl:variable>
6
<xsl:variable name="height_increment">5.5</xsl:variable>
7
<xsl:variable name="width_increment">8.5</xsl:variable>
8
<xsl:variable name="frame_height">5.5cm</xsl:variable>
9
<xsl:variable name="frame_width">8.5cm</xsl:variable>
10
<xsl:variable name="number_columns">3</xsl:variable>
11
<xsl:variable name="max_cards">8</xsl:variable>
13
<xsl:template match="/">
14
<xsl:apply-templates select="addresses"/>
17
<xsl:template match="addresses">
19
<template leftMargin="2.0cm" rightMargin="2.0cm" topMargin="2.0cm" bottomMargin="2.0cm" title="Address list" author="Generated by Tiny ERP, Fabien Pinckaers">
20
<pageTemplate id="all">
22
<xsl:apply-templates select="address" mode="frames"/>
26
<paraStyle name="nospace" fontName="Courier" fontSize="12" spaceBefore="0" spaceAfter="0"/>
29
<xsl:apply-templates select="address" mode="story"/>
34
<xsl:template match="address" mode="frames">
35
<xsl:if test="position() < $max_frames + 1">
37
<xsl:attribute name="width">
38
<xsl:value-of select="$frame_width"/>
40
<xsl:attribute name="height">
41
<xsl:value-of select="$frame_height"/>
43
<xsl:attribute name="x1">
44
<xsl:value-of select="$initial_left_pos + ((position()-1) mod $number_columns) * $width_increment"/>
45
<xsl:text>cm</xsl:text>
47
<xsl:attribute name="y1">
48
<xsl:value-of select="$initial_bottom_pos - floor((position()-1) div $number_columns) * $height_increment"/>
49
<xsl:text>cm</xsl:text>
55
<xsl:template match="address" mode="story">
57
<drawCentredString x="105mm" y="28cm" t="1">PICKINGLIST</drawCentredString>
58
<image x="5mm" y="5m" file="addons/base/report/logo-tiny.png"/>
59
<blockTable colWidths="3cm,3cm" style="infos">
64
<td><para><xsl:value-of select="client-id"/></para></td>
65
<td><para><xsl:value-of select="shipping-id"/></para></td>
66
<td><para><xsl:value-of select="picking-date"/></para></td>
67
<td><para><xsl:value-of select="expedition-date"/></para></td>
68
<td><para><xsl:value-of select="command-number"/></para></td>
72
<para style="nospace"><xsl:value-of select="company"/></para>
73
<para style="nospace"><xsl:value-of select="partner_name"/></para>
74
<para style="nospace"><xsl:value-of select="street"/></para>
75
<para style="nospace"><xsl:value-of select="zip"/><xsl:text> </xsl:text><xsl:value-of select="city"/></para>
76
<para style="nospace"><xsl:value-of select="country"/></para>