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