Bug 13618: Add html filters to all the variables
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / acqui / spent.tt
1 [% USE raw %]
2 [% USE Asset %]
3 [% USE KohaDates %]
4 [% USE ItemTypes %]
5 [% SET footerjs = 1 %]
6 [% INCLUDE 'doc-head-open.inc' %]
7 <title>Koha &rsaquo; Acquisitions &rsaquo; Spent</title>
8 [% Asset.css("css/datatables.css") | $raw %]
9 [% INCLUDE 'doc-head-close.inc' %]
10 </head>
11
12 <body id="acq_spent" class="acq">
13 [% INCLUDE 'header.inc' %]
14 [% INCLUDE 'acquisitions-search.inc' %]
15
16 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a> &rsaquo; Spent - [% fund_code | html %]</div>
17
18 <div id="doc3" class="yui-t2">
19
20 <div id="bd">
21     <div id="yui-main">
22         <div class="yui-b">
23
24 <h1>Fund: [% fund_code | html %]</h1>
25 <h2>Spent</h2>
26
27 <table id="spent">
28     <thead>
29         <tr>
30            <th class="anti-the">Title</th>
31            <th>Order</th>
32            <th>Vendor</th>
33            <th>Invoice</th>
34            <th>Item type</th>
35            <th>Received</th>
36            <th>Unit price</th>
37            <th class="title-string">Date ordered</th>
38            <th class="title-string">Date received</th>
39            <th>Subtotal</th>
40         </tr>
41     </thead>
42
43     [% FOREACH order IN spent %]
44         <tr>
45             <td class="cell">
46                 <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% order.biblionumber | html %]">
47                     [% order.title | html %]
48                 </a>
49             </td>
50             <td class="cell">
51                 [% order.ordernumber | html %]
52             </td>
53             <td class="cell">
54                 <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% order.booksellerid | html %]">[% order.booksellerid | html %]</a>
55             </td>
56             <td class="cell">
57                 <a href="/cgi-bin/koha/acqui/invoice.pl?invoiceid=[% order.invoiceid | html %]">[% order.invoicenumber | html %]</a>
58             </td>
59             <td class="cell">
60                 [% ItemTypes.GetDescription( order.itype ) | html %]
61             </td>
62             <td class="cell">
63                 [% order.quantityreceived | html %]
64             </td>
65             <td class="cell">
66                 [% order.unitprice | html %]
67             </td>
68             <td class="cell">
69                 <span title="[% order.entrydate | html %]">[% order.entrydate | $KohaDates %]</span>
70             </td>
71             <td class="cell">
72                 <span title="[% order.datereceived | html %]">[% order.datereceived | $KohaDates %]</span>
73             </td>
74             <td class="data cell">
75                 [% order.rowtotal | html %]
76             </td>
77         </tr>
78     [% END %]
79
80     <tfoot>
81         [% IF shipmentcosts.size || ( adjustments && adjustments.count > 0 ) %]
82             <tr valign="top">
83                 <td colspan="9"> Sub total </td>
84                 <td class="data"> [% subtotal | html %] </td>
85             </tr>
86         [% END %]
87         [% IF shipmentcosts.size %]
88             [% FOREACH shipmentcost IN shipmentcosts %]
89                 <tr>
90                     <td></td>
91                     <td colspan="8">Shipping cost for invoice [% shipmentcost.invoicenumber | html %]</td>
92                     <td class="data total">[% shipmentcost.shipmentcost | html %]</td>
93                 </tr>
94             [% END %]
95         [% END %]
96         [% IF ( adjustments && adjustments.count > 0 ) %]
97             [% FOREACH adjustment IN adjustments %]
98                 <tr>
99                     <td></td>
100                     <td colspan="8">Adjustment cost for invoice [% adjustment.invoiceid | html %]</td>
101                     <td class="data total">[% adjustment.adjustment | html %]</td>
102                 </tr>
103             [% END %]
104         [% END %]
105         <tr>
106             <td colspan="9">TOTAL</td>
107             <td class="data total">[% total | html %]</td>
108         </tr>
109     </tfoot>
110 </table>
111
112 </div>
113 </div>
114 <div class="yui-b">
115 [% INCLUDE 'acquisitions-menu.inc' %]
116 </div>
117 </div>
118
119 [% MACRO jsinclude BLOCK %]
120     [% Asset.js("js/acquisitions-menu.js") | $raw %]
121     [% INCLUDE 'datatables.inc' %]
122     <script type="text/javascript">
123         $(document).ready(function() {
124             $("#spent").dataTable($.extend(true, {}, dataTablesDefaults, {
125                 "aoColumnDefs": [
126                     { "sType": "anti-the", "aTargets" : [ "anti-the" ] },
127                     { "sType": "title-string", "aTargets" : [ "title-string" ] }
128                 ],
129                 "sPaginationType": "four_button"
130             } ) );
131         });
132     </script>
133 [% END %]
134
135 [% INCLUDE 'intranet-bottom.inc' %]