Bug 7720: add options for controlling display of an item's home and/or holdings location
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / acqui / histsearch.tt
1 [% USE KohaDates %]
2 [% INCLUDE 'doc-head-open.inc' %]
3 <title>Koha &rsaquo; Acquisitions &rsaquo; [% IF ( order_loop ) %]Orders search &rsaquo; Search results[% ELSE %]Order search[% END %]</title>
4 <link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" />
5 [% INCLUDE 'doc-head-close.inc' %]
6 [% INCLUDE 'calendar.inc' %]
7 [% INCLUDE 'datatables.inc' %]
8 <script type="text/javascript">
9 //<![CDATA[
10  $(document).ready(function() {
11     $("#histsearcht").dataTable($.extend(true, {}, dataTablesDefaults, {
12         "aoColumnDefs": [
13             { "sType": "anti-the", "aTargets" : [ "anti-the" ] },
14             { "sType": "title-string", "aTargets" : [ "title-string" ] }
15         ],
16         "sPaginationType": "four_button"
17     } ) );
18  });
19  //]]>
20 </script>
21 </head>
22 <body id="acq_histsearch" class="acq">
23 [% INCLUDE 'header.inc' %]
24 [% INCLUDE 'acquisitions-search.inc' %]
25
26 <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; [% IF ( order_loop ) %]<a href="/cgi-bin/koha/acqui/histsearch.pl">Orders search</a> &rsaquo; Search results[% ELSE %]Order search[% END %]</div>
27
28 <div id="doc3" class="yui-t2">
29    
30    <div id="bd">
31         <div id="yui-main">
32         <div class="yui-b">
33         
34 [% UNLESS ( order_loop ) %]<form action="/cgi-bin/koha/acqui/histsearch.pl" method="post">
35 <fieldset class="rows">
36     <legend>Search orders</legend>
37                 <ol>
38                 <li><label for="title">Title: </label> <input type="text" name="title" id="title" value="[% title %]" /></li>
39                 <li><label for="author">Author: </label> <input type="text" name="author" id="author" value="[% author %]" /></li>
40         <li><label for="isbn">ISBN: </label> <input type="text" name="isbn" id="isbn" value="[% isbn %]" /></li>
41                 [% IF (UNIMARC) %]
42         <li><label for="ean">EAN: </label> <input type="text" name="ean" id="ean" value="[% ean %]" /></li>
43                 [% END %]
44                 <li><label for="name">Vendor: </label> <input type="text" name="name" id="name" value="[% name %]" /></li>
45                 <li><label for="basket">Basket: </label> <input type="text" name="basket" id="basket" value="[% basket %]" /></li>
46         <li><label for="booksellerinvoicenumber ">Bookseller invoice no: </label> <input type="text" name="booksellerinvoicenumber" id="booksellerinvoicenumber" value="[% booksellerinvoicenumber %]" /></li>
47         <li>
48             <label for="basketgroupname">Basket group:</label>
49             <input type="text" name="basketgroupname" id="basketgroupname" value="[% basketgroupname %]" />
50         </li>
51         <li>
52           <label for="ordernumber">Order line:</label>
53           <input type="text" name="ordernumber" id="ordernumber" value="[% ordernumber %]" />
54           [% IF search_children_too %]
55             <input type="checkbox" name="search_children_too" id="search_children_too" value="1" checked="checked" />
56           [% ELSE %]
57             <input type="checkbox" name="search_children_too" id="search_children_too" value="1" />
58           [% END %]
59           <label class="yesno" for="search_children_too">Display children too.</label>
60         </li>
61
62         <li>
63             <label for="orderstatus">Order status: </label>
64             <select name="orderstatus" id="orderstatus">
65                 [% IF orderstatus == "" %]
66                   <option value="">Any status except cancelled</option>
67                 [% ELSE %]
68                   <option value="" selected="selected"></option>
69                 [% END %]
70                 [% IF orderstatus == "new" %]
71                   <option value="new" selected="selected">New</option>
72                 [% ELSE %]
73                   <option value="new">New</option>
74                 [% END %]
75                 [% IF orderstatus == "ordered" %]
76                   <option value="ordered" selected="selected">Pending</option>
77                 [% ELSE %]
78                   <option value="ordered">Pending</option>
79                 [% END %]
80                 [% IF orderstatus == "partial" %]
81                   <option value="partial" selected="selected">Partially received</option>
82                 [% ELSE %]
83                   <option value="partial">Partially received</option>
84                 [% END %]
85                 [% IF orderstatus == "complete" %]
86                   <option value="complete" selected="selected">Received</option>
87                 [% ELSE %]
88                   <option value="complete">Received</option>
89                 [% END %]
90                 [% IF orderstatus == "cancelled" %]
91                   <option value="cancelled" selected="selected">Cancelled</option>
92                 [% ELSE %]
93                   <option value="cancelled">Cancelled</option>
94                 [% END %]
95             </select>
96         </li>
97         <li>
98             <label for="fund">Fund: </label>
99             <select name="budget" id="fund">
100                 <option value="">All funds</option>
101                 [% FOREACH bp_loo IN bp_loop %]
102                     <optgroup label="[% bp_loo.budget_period_description %]">
103                     [% FOREACH h_loo IN bp_loo.hierarchy %]
104                       [% IF h_loo.budget_id == budget_id %]
105                         <option type="text" value="[% h_loo.budget_id %]" branchcode="[% h_loo.budget_branchcode %]" selected="selected">
106                       [% ELSE %]
107                         <option type="text" value="[% h_loo.budget_id %]" branchcode="[% h_loo.budget_branchcode %]">
108                       [% END %]
109                             [% h_loo.budget_display_name %]
110                         </option>
111                     [% END %]
112                     </optgroup>
113                 [% END %]
114             </select>
115         </li>
116
117                 <li><label for="from">From: </label> 
118         <input type="text" size="10" id="from" name="from" value="[% from_placed_on %]" class="datepickerfrom" />
119                                 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
120                 </li>
121                 <li><label for="to">To: </label> 
122         <input type="text" size="10" id="to" name="to" value="[% to_placed_on %]" class="datepickerto" />
123                                 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
124                 </li>
125                 </ol>
126         </fieldset>
127     <input type="hidden" name="do_search" value="1" />
128         <fieldset class="action"><input type="submit" value="Search" /></fieldset>
129         </form>[% END %]
130     [% IF ( order_loop ) %]<h1>Search results</h1>
131         <div id="acqui_histsearch">
132         <table id="histsearcht">
133             <thead>
134                         <tr>
135                 <th>Order line (parent)</th>
136                 <th>Status</th>
137                                 <th>Basket</th>
138                                 <th>Basket group</th>
139                 <th>Invoice number</th>
140                 <th class="anti-the">Summary</th>
141                                 <th>Vendor</th>
142                 <th class="title-string">Placed on</th>
143                 <th class="title-string">Received on</th>
144                 <th>Quantity received</th>
145                 <th>Pending order</th>
146                                 <th>Unit cost</th>
147                 <th>Fund</th>
148                         </tr>
149             </thead>
150             <tbody>
151             [% FOREACH order IN order_loop %]
152                 <tr>
153                     <td>
154                         [% order.ordernumber %]
155                         [% IF order.ordernumber != order.parent_ordernumber %]([% order.parent_ordernumber %])[% END %]
156                     </td>
157                     <td>
158                         [% SWITCH order.orderstatus %]
159                             [% CASE 'new' %]New
160                             [% CASE 'ordered' %]Pending
161                             [% CASE 'partial' %]Partially received
162                             [% CASE 'complete' %]Received
163                             [% CASE 'cancelled' %]Cancelled
164                         [% END %]
165                     </td>
166                     <td>[% order.basketname %] (<a href="basket.pl?basketno=[% order.basketno %]">[% order.basketno %]</a>)</td>
167                     <td>
168                         [% IF ( order.basketgroupid ) %]
169                             [% order.groupname %] (<a href="basketgroup.pl?booksellerid=[% order.id %]">[% order.basketgroupid %]</a>)
170                         [% ELSE %]
171                             &nbsp;
172                         [% END %]
173                     </td>
174                     <td>[% IF ( order.invoicenumber ) %]
175                             <a href="/cgi-bin/koha/acqui/parcel.pl?invoiceid=[% order.invoiceid %]">[% order.invoicenumber %]</a>
176                         [% ELSE %]
177                             &nbsp;
178                         [% END %]
179                     </td>
180                     <td>
181                         <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% order.biblionumber %]">[% order.title |html %]</a>
182                         <br />[% order.author %] <br /> [% order.isbn %]
183                     </td>
184                     <td><a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% order.id %]">[% order.name %]</a></td>
185                     <td><span title="[% order.creationdate %]">[% order.creationdate | $KohaDates %]</span></td>
186                     <td>
187                         [% IF order.datereceived %]
188                             <span title="[% order.datereceived %]">[% order.datereceived | $KohaDates %]</span>
189                         [% ELSE %]
190                             <span title="0000-00-00"></span>
191                         [% END %]
192                     </td>
193                     <td>[% order.quantityreceived %]</td>
194                     <td>[% order.quantity %]</td>
195                     <td>[% order.ecost %]</td>
196                     <td>[% order.budget_name %]</td>
197                 </tr>
198             [% END %]
199             </tbody>
200         </table>
201     </div>
202     [% ELSIF search_done %]
203       There is no order for this search.
204     [% END %]
205
206 </div>
207 </div>
208 <div class="yui-b">
209 [% INCLUDE 'acquisitions-menu.inc' %]
210 </div>
211 </div>
212 [% INCLUDE 'intranet-bottom.inc' %]