Bug 11500: Use dateformat syspref and datepicker on additems.pl (and other item catal...
[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 [% PROCESS 'i18n.inc' %]
7 [% SET footerjs = 1 %]
8 [% INCLUDE 'doc-head-open.inc' %]
9 <title>Koha &rsaquo; Acquisitions &rsaquo; Spent</title>
10 [% INCLUDE 'doc-head-close.inc' %]
11 </head>
12
13 <body id="acq_spent" class="acq">
14 [% INCLUDE 'header.inc' %]
15 [% INCLUDE 'acquisitions-search.inc' %]
16
17 <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>
18
19 <div class="main container-fluid">
20     <div class="row">
21         <div class="col-sm-10 col-sm-push-2">
22             <main>
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>[% tp('noun', 'Order') | html %]</th>
32            <th>Vendor</th>
33            <th>Invoice</th>
34            <th>Item types</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 | uri %]">
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 | uri %]">[% order.vendorname | html %]</a>
55             </td>
56             <td class="cell">
57                 <a href="/cgi-bin/koha/acqui/invoice.pl?invoiceid=[% order.invoiceid | uri %]">[% order.invoicenumber | html %]</a>
58             </td>
59             <td class="cell">
60                 [% FOREACH itemtype IN order.itemtypes %]
61                     [% ItemTypes.GetDescription( itemtype ) | html %]
62                     [% IF !loop.last() %] | [% END %]
63                 [% END %]
64             </td>
65             <td class="cell">
66                 [% order.quantityreceived | html %]
67             </td>
68             <td class="cell">
69                 [% order.unitprice_tax_included | $Price %]
70             </td>
71             <td class="cell">
72                 <span title="[% order.entrydate | html %]">[% order.entrydate | $KohaDates %]</span>
73             </td>
74             <td class="cell">
75                 <span title="[% order.datereceived | html %]">[% order.datereceived | $KohaDates %]</span>
76             </td>
77             <td class="data cell">
78                 [% order.rowtotal | $Price %]
79             </td>
80         </tr>
81     [% END %]
82
83     <tfoot>
84         [% IF shipmentcosts.size || ( adjustments && adjustments.count > 0 ) %]
85             <tr>
86                 <td colspan="9"> Sub total </td>
87                 <td class="data"> [% subtotal | $Price %] </td>
88             </tr>
89         [% END %]
90         [% IF shipmentcosts.size %]
91             [% FOREACH shipmentcost IN shipmentcosts %]
92                 <tr>
93                     <td></td>
94                     <td colspan="8">Shipping cost for invoice
95                         <a href="/cgi-bin/koha/acqui/invoice.pl?invoiceid=[% shipmentcost.invoiceid | uri %]">
96                              [% shipmentcost.invoicenumber | html %]
97                         </a>
98                     </td>
99                     <td class="data total">[% shipmentcost.shipmentcost | $Price %]</td>
100                 </tr>
101             [% END %]
102         [% END %]
103         [% IF ( adjustments && adjustments.count > 0 ) %]
104             [% FOREACH adjustment IN adjustments %]
105                 <tr>
106                     <td></td>
107                     <td colspan="8">Adjustment cost for invoice
108                         <a href="/cgi-bin/koha/acqui/invoice.pl?invoiceid=[% adjustment.invoiceid | uri %]">
109                             [% adjustment.invoice.invoicenumber | html %]
110                         </a>
111                     </td>
112                     <td class="data total">[% adjustment.adjustment | $Price %]</td>
113                 </tr>
114             [% END %]
115         [% END %]
116         <tr>
117             <td colspan="9">TOTAL</td>
118             <td class="data total">[% total | $Price %]</td>
119         </tr>
120     </tfoot>
121 </table>
122
123 </main>
124 </div> <!-- /.col-sm-10.col-sm-push-2 -->
125
126 <div class="col-sm-2 col-sm-pull-10">
127     <aside>
128         [% INCLUDE 'acquisitions-menu.inc' %]
129     </aside>
130 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
131 </div> <!-- /.row -->
132
133 [% MACRO jsinclude BLOCK %]
134     [% Asset.js("js/acquisitions-menu.js") | $raw %]
135     [% INCLUDE 'datatables.inc' %]
136     <script>
137         $(document).ready(function() {
138             $("#spent").dataTable($.extend(true, {}, dataTablesDefaults, {
139                 "aoColumnDefs": [
140                     { "sType": "anti-the", "aTargets" : [ "anti-the" ] },
141                     { "sType": "title-string", "aTargets" : [ "title-string" ] }
142                 ],
143                 "sPaginationType": "full"
144             } ) );
145         });
146     </script>
147 [% END %]
148
149 [% INCLUDE 'intranet-bottom.inc' %]