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