Bug 22015: Move DataTables CSS to global include
[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 [% USE Price %]
6 [% SET footerjs = 1 %]
7 [% INCLUDE 'doc-head-open.inc' %]
8 <title>Koha &rsaquo; Acquisitions &rsaquo; Spent</title>
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 class="main container-fluid">
19     <div class="row">
20         <div class="col-sm-10 col-sm-push-2">
21             <main>
22
23 <h1>Fund: [% fund_code | html %]</h1>
24 <h2>Spent</h2>
25
26 <table id="spent">
27     <thead>
28         <tr>
29            <th class="anti-the">Title</th>
30            <th>Order</th>
31            <th>Vendor</th>
32            <th>Invoice</th>
33            <th>Item type</th>
34            <th>Received</th>
35            <th>Unit price</th>
36            <th class="title-string">Date ordered</th>
37            <th class="title-string">Date received</th>
38            <th>Subtotal</th>
39         </tr>
40     </thead>
41
42     [% FOREACH order IN spent %]
43         <tr>
44             <td class="cell">
45                 <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% order.biblionumber | uri %]">
46                     [% order.title | html %]
47                 </a>
48             </td>
49             <td class="cell">
50                 [% order.ordernumber | html %]
51             </td>
52             <td class="cell">
53                 <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% order.booksellerid | uri %]">[% order.vendorname | html %]</a>
54             </td>
55             <td class="cell">
56                 <a href="/cgi-bin/koha/acqui/invoice.pl?invoiceid=[% order.invoiceid | uri %]">[% order.invoicenumber | html %]</a>
57             </td>
58             <td class="cell">
59                 [% ItemTypes.GetDescription( order.itype ) | html %]
60             </td>
61             <td class="cell">
62                 [% order.quantityreceived | html %]
63             </td>
64             <td class="cell">
65                 [% order.unitprice_tax_included | $Price %]
66             </td>
67             <td class="cell">
68                 <span title="[% order.entrydate | html %]">[% order.entrydate | $KohaDates %]</span>
69             </td>
70             <td class="cell">
71                 <span title="[% order.datereceived | html %]">[% order.datereceived | $KohaDates %]</span>
72             </td>
73             <td class="data cell">
74                 [% order.rowtotal | $Price %]
75             </td>
76         </tr>
77     [% END %]
78
79     <tfoot>
80         [% IF shipmentcosts.size || ( adjustments && adjustments.count > 0 ) %]
81             <tr>
82                 <td colspan="9"> Sub total </td>
83                 <td class="data"> [% subtotal | $Price %] </td>
84             </tr>
85         [% END %]
86         [% IF shipmentcosts.size %]
87             [% FOREACH shipmentcost IN shipmentcosts %]
88                 <tr>
89                     <td></td>
90                     <td colspan="8">Shipping cost for invoice [% shipmentcost.invoicenumber | html %]</td>
91                     <td class="data total">[% shipmentcost.shipmentcost | $Price %]</td>
92                 </tr>
93             [% END %]
94         [% END %]
95         [% IF ( adjustments && adjustments.count > 0 ) %]
96             [% FOREACH adjustment IN adjustments %]
97                 <tr>
98                     <td></td>
99                     <td colspan="8">Adjustment cost for invoice [% adjustment.invoiceid | html %]</td>
100                     <td class="data total">[% adjustment.adjustment | $Price %]</td>
101                 </tr>
102             [% END %]
103         [% END %]
104         <tr>
105             <td colspan="9">TOTAL</td>
106             <td class="data total">[% total | $Price %]</td>
107         </tr>
108     </tfoot>
109 </table>
110
111 </main>
112 </div> <!-- /.col-sm-10.col-sm-push-2 -->
113
114 <div class="col-sm-2 col-sm-pull-10">
115     <aside>
116         [% INCLUDE 'acquisitions-menu.inc' %]
117     </aside>
118 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
119 </div> <!-- /.row -->
120
121 [% MACRO jsinclude BLOCK %]
122     [% Asset.js("js/acquisitions-menu.js") | $raw %]
123     [% INCLUDE 'datatables.inc' %]
124     <script>
125         $(document).ready(function() {
126             $("#spent").dataTable($.extend(true, {}, dataTablesDefaults, {
127                 "aoColumnDefs": [
128                     { "sType": "anti-the", "aTargets" : [ "anti-the" ] },
129                     { "sType": "title-string", "aTargets" : [ "title-string" ] }
130                 ],
131                 "sPaginationType": "four_button"
132             } ) );
133         });
134     </script>
135 [% END %]
136
137 [% INCLUDE 'intranet-bottom.inc' %]