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