Bug 26703: modules and modules/acqui folders
[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>Spent &rsaquo; Acquisitions &rsaquo; Koha</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
18 <nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumb">
19     <ol>
20         <li>
21             <a href="/cgi-bin/koha/mainpage.pl">Home</a>
22         </li>
23         <li>
24             <a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a>
25         </li>
26         <li>
27             <a href="#" aria-current="page">
28                 Spent - [% fund_code | html %]
29             </a>
30         </li>
31     </ol>
32 </nav>
33
34 <div class="main container-fluid">
35     <div class="row">
36         <div class="col-sm-10 col-sm-push-2">
37             <main>
38
39 <h1>Fund: [% fund_code | html %]</h1>
40 <h2>Spent</h2>
41
42 <table id="spent">
43     <thead>
44         <tr>
45            <th class="anti-the">Title</th>
46            <th>[% tp('noun', 'Order') | html %]</th>
47            <th>Vendor</th>
48            <th>Invoice</th>
49            <th>Item types</th>
50            <th>Received</th>
51            <th>Unit price</th>
52            <th>Date ordered</th>
53            <th>Date received</th>
54            <th>Subtotal</th>
55         </tr>
56     </thead>
57
58     [% FOREACH order IN spent %]
59         <tr>
60             <td class="cell">
61                 <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% order.biblionumber | uri %]">
62                     [% order.title | html %]
63                 </a>
64             </td>
65             <td class="cell">
66                 [% order.ordernumber | html %]
67             </td>
68             <td class="cell">
69                 <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% order.booksellerid | uri %]">[% order.vendorname | html %]</a>
70             </td>
71             <td class="cell">
72                 <a href="/cgi-bin/koha/acqui/invoice.pl?invoiceid=[% order.invoiceid | uri %]">[% order.invoicenumber | html %]</a>
73             </td>
74             <td class="cell">
75                 [% FOREACH itemtype IN order.itemtypes %]
76                     [% ItemTypes.GetDescription( itemtype ) | html %]
77                     [% IF !loop.last() %] | [% END %]
78                 [% END %]
79             </td>
80             <td class="cell">
81                 [% order.quantityreceived | html %]
82             </td>
83             <td class="cell">
84                 [% order.unitprice_tax_included | $Price %]
85             </td>
86             <td class="cell" data-order="[% order.entrydate | html %]">
87                 [% order.entrydate | $KohaDates %]
88             </td>
89             <td class="cell" data-order="[% order.datereceived | html %]">
90                 [% order.datereceived | $KohaDates %]
91             </td>
92             <td class="data cell">
93                 [% order.rowtotal | $Price %]
94             </td>
95         </tr>
96     [% END %]
97
98     <tfoot>
99         [% IF shipmentcosts.size || ( adjustments && adjustments.count > 0 ) %]
100             <tr>
101                 <td colspan="9"> Sub total </td>
102                 <td class="data"> [% subtotal | $Price %] </td>
103             </tr>
104         [% END %]
105         [% IF shipmentcosts.size %]
106             [% FOREACH shipmentcost IN shipmentcosts %]
107                 <tr>
108                     <td></td>
109                     <td colspan="8">Shipping cost for invoice
110                         <a href="/cgi-bin/koha/acqui/invoice.pl?invoiceid=[% shipmentcost.invoiceid | uri %]">
111                              [% shipmentcost.invoicenumber | html %]
112                         </a>
113                     </td>
114                     <td class="data total">[% shipmentcost.shipmentcost | $Price %]</td>
115                 </tr>
116             [% END %]
117         [% END %]
118         [% IF ( adjustments && adjustments.count > 0 ) %]
119             [% FOREACH adjustment IN adjustments %]
120                 <tr>
121                     <td></td>
122                     <td colspan="8">Adjustment cost for invoice
123                         <a href="/cgi-bin/koha/acqui/invoice.pl?invoiceid=[% adjustment.invoiceid | uri %]">
124                             [% adjustment.invoice.invoicenumber | html %]
125                         </a>
126                     </td>
127                     <td class="data total">[% adjustment.adjustment | $Price %]</td>
128                 </tr>
129             [% END %]
130         [% END %]
131         <tr>
132             <td colspan="9">TOTAL</td>
133             <td class="data total">[% total | $Price %]</td>
134         </tr>
135     </tfoot>
136 </table>
137
138 </main>
139 </div> <!-- /.col-sm-10.col-sm-push-2 -->
140
141 <div class="col-sm-2 col-sm-pull-10">
142     <aside>
143         [% INCLUDE 'acquisitions-menu.inc' %]
144     </aside>
145 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
146 </div> <!-- /.row -->
147
148 [% MACRO jsinclude BLOCK %]
149     [% Asset.js("js/acquisitions-menu.js") | $raw %]
150     [% INCLUDE 'datatables.inc' %]
151     <script>
152         $(document).ready(function() {
153             $("#spent").dataTable($.extend(true, {}, dataTablesDefaults, {
154                 "aoColumnDefs": [
155                     { "sType": "anti-the", "aTargets" : [ "anti-the" ] }
156                 ],
157                 "sPaginationType": "full"
158             } ) );
159         });
160     </script>
161 [% END %]
162
163 [% INCLUDE 'intranet-bottom.inc' %]