Bug 22541: Invoice adjustments should show invoice number and include link on ordered...
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / acqui / ordered.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; Ordered</title>
9 [% Asset.css("css/datatables.css") | $raw %]
10 [% INCLUDE 'doc-head-close.inc' %]
11 </head>
12
13 <body id="acq_ordered" 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; Ordered - [% 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>Ordered</h2>
26
27 <table id="spent">
28     <thead>
29     <tr>
30     <th class="anti-the"> Title </th>
31     <th> Order </th>
32     <th> Vendor </th>
33     <th> Item type </th>
34     <th> Left on order </th>
35     <th> Estimated cost per unit </th>
36     <th class="title-string"> Date ordered </th>
37     <th> Subtotal </th>
38     </tr>
39     </thead>
40     <tbody>
41 [% FOREACH order IN ordered %]
42     <tr>
43     <td class="cell">
44             <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% order.biblionumber | uri %]">
45         [% order.title | html %]
46             </a>
47     </td>
48     <td class="cell">
49         [% IF ( CAN_user_acquisition_order_manage ) %]
50             <a href="/cgi-bin/koha/acqui/neworderempty.pl?ordernumber=[% order.ordernumber | uri %]&amp;booksellerid=[% order.booksellerid | uri %]&amp;basketno=[% order.basketno | uri %]">[% order.ordernumber | html %]</a>
51         [% ELSE %]
52             [% order.ordernumber | html %]
53         [% END %]
54     </td>
55     <td class="cell">
56         <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% order.booksellerid | uri %]">[% order.vendorname | html %]</a>
57     </td>
58     <td class="cell">
59         [% ItemTypes.GetDescription( order.itype ) | html %]
60     </td>
61     <td class="cell">
62         [% order.left | html %]
63     </td>
64     <td class="data cell">
65         [% order.ecost_tax_included | $Price %]
66     </td>
67     <td class="cell">
68         <span title="[% order.entrydate | html %]">[% order.entrydate | $KohaDates %]</span>
69     </td>
70     <td class="data cell">
71         [% order.subtotal | $Price %]
72     </td>
73     </tr>
74 [% END %]
75     </tbody>
76     <tfoot>
77     [% IF ( adjustments && adjustments.count > 0 ) %]
78             [% FOREACH adjustment IN adjustments %]
79                 <tr>
80                     <td></td>
81                     <td colspan="6">Adjustment cost for invoice
82                         <a href="/cgi-bin/koha/acqui/invoice.pl?invoiceid=[% adjustment.invoiceid | uri %]">
83                             [% adjustment.invoice.invoicenumber | html %]
84                         </a>
85                     </td>
86                     <td class="data total">[% adjustment.adjustment | $Price %]</td>
87                 </tr>
88             [% END %]
89
90     [% END %]
91     <tr>
92         <td> Total </td>
93         <td> </td>
94         <td> </td>
95         <td> </td>
96         <td> </td>
97         <td> </td>
98         <td> </td>
99         <td class="data">
100             [% total | $Price %]
101         </td>
102     </tr>
103     </tfoot>
104
105 </table>
106
107 </main>
108 </div> <!-- /.col-sm-10.col-sm-push-2 -->
109
110 <div class="col-sm-2 col-sm-pull-10">
111     <aside>
112         [% INCLUDE 'acquisitions-menu.inc' %]
113     </aside>
114 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
115 </div> <!-- /.row -->
116
117 [% MACRO jsinclude BLOCK %]
118     [% Asset.js("js/acquisitions-menu.js") | $raw %]
119     [% INCLUDE 'datatables.inc' %]
120     <script>
121         $(document).ready(function() {
122             $("#spent").dataTable($.extend(true, {}, dataTablesDefaults, {
123                 "aoColumnDefs": [
124                     { "sType": "anti-the", "aTargets" : [ "anti-the" ] },
125                     { "sType": "title-string", "aTargets" : [ "title-string" ] }
126                 ],
127                 "sPaginationType": "four_button"
128             }));
129         });
130     </script>
131 [% END %]
132
133 [% INCLUDE 'intranet-bottom.inc' %]