Bug 21282: Sync ordered and spent values with acqui home
[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 | html %]
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 [% adjustment.invoiceid | html %]</td>
82                     <td class="data total">[% adjustment.adjustment | html %]</td>
83                 </tr>
84             [% END %]
85
86     [% END %]
87     <tr>
88         <td> Total </td>
89         <td> </td>
90         <td> </td>
91         <td> </td>
92         <td> </td>
93         <td> </td>
94         <td> </td>
95         <td class="data">
96             [% total | html %]
97         </td>
98     </tr>
99     </tfoot>
100
101 </table>
102
103 </main>
104 </div> <!-- /.col-sm-10.col-sm-push-2 -->
105
106 <div class="col-sm-2 col-sm-pull-10">
107     <aside>
108         [% INCLUDE 'acquisitions-menu.inc' %]
109     </aside>
110 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
111 </div> <!-- /.row -->
112
113 [% MACRO jsinclude BLOCK %]
114     [% Asset.js("js/acquisitions-menu.js") | $raw %]
115     [% INCLUDE 'datatables.inc' %]
116     <script>
117         $(document).ready(function() {
118             $("#spent").dataTable($.extend(true, {}, dataTablesDefaults, {
119                 "aoColumnDefs": [
120                     { "sType": "anti-the", "aTargets" : [ "anti-the" ] },
121                     { "sType": "title-string", "aTargets" : [ "title-string" ] }
122                 ],
123                 "sPaginationType": "four_button"
124             }));
125         });
126     </script>
127 [% END %]
128
129 [% INCLUDE 'intranet-bottom.inc' %]