forked from smu-libraries/alma_letters
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathOrderListLetter.xsl
175 lines (170 loc) · 6.19 KB
/
OrderListLetter.xsl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
<?xml version="1.0" encoding="utf-8"?>
<!--
Modified on 20160707 by Wee Hiong
1. Add do-not-reply message to the footer.
Modified on 20151222 by Wee Hiong
1. Remove sender's address as contact information is now inside the header.
Modified on 20151008 by Wee Hiong
1. Ask vendor to include both PO and PO Line Numbers on the invoice.
2. Ask vendor to send correspondence to libacq.
Modified on 20151002 by Wee Hiong
1. Fix formatting.
Modified on 20151001 by Wee Hiong
1. Display PO Number / PO Line Number.
Modified on 20150826 by Wee Hiong
1. Remove footer.
2. Reformat shipping/billing addresses.
3. Include fund code in each PO line.
-->
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:include href="header.xsl" />
<xsl:include href="footer.xsl" />
<xsl:include href="mailReason.xsl" />
<xsl:include href="style.xsl" />
<xsl:template match="/">
<html>
<head>
<xsl:call-template name="generalStyle" />
</head>
<body>
<xsl:attribute name="style">
<!-- style.xsl -->
<xsl:call-template name="bodyStyleCss" />
</xsl:attribute>
<!-- header.xsl -->
<xsl:call-template name="head" />
<br />
<!-- mailReason.xsl -->
<xsl:call-template name="toWhomIsConcerned" />
<xsl:for-each select="notification_data/letter_texts">
<table cellspacing="0" cellpadding="5" border="0">
<tr>
<td>@@place_order_introduction@@:</td>
</tr>
</table>
<br />
</xsl:for-each>
<xsl:for-each select="notification_data">
<table width="100%">
<tr>
<td width="50%">
<b>@@order_date@@:</b>
<xsl:text> </xsl:text>
<xsl:value-of select="/notification_data/po/create_date" />
</td>
<td width="50%">
<b>@@vendor_account@@:</b>
<xsl:text> </xsl:text>
<xsl:value-of select="/notification_data/po/vendor_account/description" />
</td>
</tr>
<tr />
<tr>
<td width="50%">
<b>@@shipping_address@@:</b>
<br />
<xsl:value-of select="/notification_data/po/ship_to_address/line1" />
<br />
<xsl:value-of select="/notification_data/po/ship_to_address/line2" />
<br />
<xsl:value-of select="/notification_data/po/ship_to_address/line3" />
<br />
<xsl:value-of select="/notification_data/po/ship_to_address/city" />
<xsl:text> </xsl:text>
<xsl:value-of select="/notification_data/po/ship_to_address/postal_code" />
</td>
<td width="50%">
<b>@@billing_address@@:</b>
<br />
<xsl:value-of select="/notification_data/po/bill_to_address/line1" />
<br />
<xsl:value-of select="/notification_data/po/bill_to_address/line2" />
<br />
<xsl:value-of select="/notification_data/po/bill_to_address/line3" />
<br />
<xsl:value-of select="/notification_data/po/bill_to_address/city" />
<xsl:text> </xsl:text>
<xsl:value-of select="/notification_data/po/ship_to_address/postal_code" />
</td>
</tr>
<xsl:if test="/notification_data/po/shipping_method != ''">
<tr />
<tr>
<td>
<b>@@shipping_method@@:</b>
<xsl:text> </xsl:text>
<xsl:value-of select="/notification_data/po/shipping_method" />
</td>
<td />
</tr>
</xsl:if>
</table>
</xsl:for-each>
<br />
<table cellpadding="5" class="listing">
<xsl:attribute name="style">
<!-- style.xsl -->
<xsl:call-template name="mainTableStyleCss" />
</xsl:attribute>
<tr>
<th />
<th>PO Number / @@po_line_number@@</th>
<th>@@issn_isbn@@</th>
<th>@@title@@</th>
<th>Fund</th>
<th>@@quantity@@</th>
<th align="right">@@price@@</th>
<th>@@note@@</th>
</tr>
<xsl:for-each select="notification_data/po/po_line_list/po_line">
<tr>
<td>
<xsl:value-of select="position()" />
</td>
<td>
<xsl:value-of select="ancestor::po/number" />
<xsl:text> </xsl:text>
<xsl:value-of select="line_reference" />
</td>
<td>
<xsl:value-of select="identifier_type" />
<xsl:text> </xsl:text>
<xsl:value-of select="identifier" />
</td>
<td>
<xsl:value-of select="meta_data_values/title" />
</td>
<td>
<xsl:value-of select="funds_transaction_items/funds_transaction_item/fund/code" />
</td>
<td>
<xsl:value-of select="total_quantity" />
</td>
<td align="right">
<xsl:value-of select="total_price_compose/currency" />
<xsl:text> </xsl:text>
<xsl:value-of select="total_price_compose/sum" />
</td>
<td>
<xsl:value-of select="vendor_note" />
</td>
</tr>
</xsl:for-each>
</table>
<br />
<table cellspacing="0" cellpadding="5" border="0">
<tr>
<td>
Please include both the PO Number and the PO Line Number on your invoice.
Kindly direct any questions regarding this order to <a href="mailto:[email protected]">[email protected]</a>.
Thank you.
</td>
</tr>
</table>
<br />
<!-- footer.xsl -->
<xsl:call-template name="doNotReply" />
</body>
</html>
</xsl:template>
</xsl:stylesheet>