Bug 26503: Add limit for standing orders to acq advanced search
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / acqui / histsearch.tt
blob67daf85bdddddeb1b28784e3219d5f6a92813859
1 [% USE raw %]
2 [% USE Asset %]
3 [% USE KohaDates %]
4 [% USE TablesSettings %]
5 [% USE Branches %]
6 [% SET footerjs = 1 %]
7 [% INCLUDE 'doc-head-open.inc' %]
8 <title>Koha &rsaquo; Acquisitions &rsaquo; [% IF ( order_loop ) %]Orders search &rsaquo; Search results[% ELSE %]Order search[% END %]</title>
9 [% INCLUDE 'doc-head-close.inc' %]
10 </head>
12 <body id="acq_histsearch" class="acq">
13 [% INCLUDE 'header.inc' %]
14 [% INCLUDE 'acquisitions-search.inc' %]
16 <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>
18 <div class="main container-fluid">
19     <div class="row">
20         <div class="col-sm-10 col-sm-push-2">
21             <main>
22                 [% IF !order_loop && search_done %]
23                     <div class="dialog message">
24                         Your search returned no results.
25                     </div>
26                 [% END %]
28                 [% UNLESS ( order_loop ) %]
29                     [% PROCESS filter_form context => "main" %]
30                 [% END %]
33     [% IF ( order_loop ) %]<h1>Search results</h1>
34         <div id="acqui_histsearch">
35         <table id="histsearcht">
36             <thead>
37                         <tr>
38                 <th>Order line (parent)</th>
39                 <th>Status</th>
40                                 <th>Basket</th>
41                 <th>Basket creator</th>
42                 <th>Basket group</th>
43                 <th>Managing library</th>
44                 <th>Invoice number</th>
45                 <th class="anti-the">Summary</th>
46                                 <th>Vendor</th>
47                 <th class="title-string">Placed on</th>
48                 <th class="title-string">Received on</th>
49                 <th>Quantity received</th>
50                 <th>Quantity ordered</th>
51                                 <th>Unit cost</th>
52                 <th>Fund</th>
53                         </tr>
54             </thead>
55             <tbody>
56             [% FOREACH order IN order_loop %]
57                 <tr>
58                     <td>
59                         [% order.ordernumber | html %]
60                         [% IF order.ordernumber != order.parent_ordernumber %]([% order.parent_ordernumber | html %])[% END %]
61                     </td>
62                     <td>
63                         [% SWITCH order.orderstatus %]
64                             [% CASE 'new' %]New
65                             [% CASE 'ordered' %]Ordered
66                             [% CASE 'partial' %]Partially received
67                             [% CASE 'complete' %]Received
68                             [% CASE 'cancelled' %]Cancelled
69                         [% END %]
70                         [% IF order.is_standing %](standing order)[% END %]
71                     </td>
72                     <td><a href="basket.pl?basketno=[% order.basketno | uri %]">[% order.basketname | html %] ([% order.basketno | html %])</a></td>
73                     <td>[% order.authorisedbyname | html %]</td>
74                     <td>
75                         [% IF ( order.basketgroupid ) %]
76                         <a href="basketgroup.pl?op=add&booksellerid=[% order.id | uri %]&basketgroupid=[% order.basketgroupid | uri %]">[% order.groupname | html %] ([% order.basketgroupid | html %])</a>
77                         [% ELSE %]
78                             &nbsp;
79                         [% END %]
80                     </td>
81                     <td>[% Branches.GetName(order.managing_library) | html %]</td>
82                     <td>[% IF ( order.invoicenumber ) %]
83                             <a href="/cgi-bin/koha/acqui/parcel.pl?invoiceid=[% order.invoiceid | uri %]">[% order.invoicenumber | html %]</a>
84                         [% ELSE %]
85                             &nbsp;
86                         [% END %]
87                     </td>
88                     <td>
89                         <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% order.biblionumber | uri %]">[% order.title | html %]</a>
90                         <br />[% order.author | html %] <br /> [% order.isbn | html %]
91                     </td>
92                     <td><a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% order.id | uri %]">[% order.name | html %]</a></td>
93                     <td><span title="[% order.creationdate | html %]">[% order.creationdate | $KohaDates %]</span></td>
94                     <td>
95                         [% IF order.datereceived %]
96                             <span title="[% order.datereceived | html %]">[% order.datereceived | $KohaDates %]</span>
97                         [% ELSE %]
98                             <span title="0000-00-00"></span>
99                         [% END %]
100                     </td>
101                     <td>[% order.quantityreceived | html %]</td>
102                     <td>[% order.quantity | html %]</td>
103                     <td>[% order.ecost | html %]</td>
104                     <td>[% order.budget_name | html %]</td>
105                 </tr>
106             [% END %]
107             </tbody>
108         </table>
109     </div>
110     [% END %]
112 </main>
113 </div> <!-- /.col-sm-10.col-sm-push-2 -->
115 <div class="col-sm-2 col-sm-pull-10">
116     <aside>
117         [% IF ( order_loop ) %]
118             [% PROCESS filter_form context => "sidebar" %]
119         [% END %]
120         [% INCLUDE 'acquisitions-menu.inc' %]
121     </aside>
122 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
123 </div>
125 [% MACRO jsinclude BLOCK %]
126     [% Asset.js("js/acquisitions-menu.js") | $raw %]
127 [% INCLUDE 'calendar.inc' %]
128     [% INCLUDE 'datatables.inc' %]
129     [% INCLUDE 'columns_settings.inc' %]
130     [% Asset.js("js/autocomplete/patrons.js") | $raw %]
131     <script>
132         var MSG_REMOVE_PATRON = _("Remove");
133         $(document).ready(function() {
134             var columns_settings = [% TablesSettings.GetColumns( 'acqui', 'histsearch', 'histsearcht', 'json' ) | $raw %];
135             KohaTable("histsearcht", {
136                 "sPaginationType": "full"
137             }, columns_settings );
139             patron_autocomplete({
140                 patron_container: $("#basket_creators"),
141                 input_autocomplete: $("#find_patron"),
142                 patron_input_name: 'created_by',
143                 field_to_retrieve: 'borrowernumber'
144             });
145         });
146     </script>
147 [% END %]
149 [% BLOCK filter_form %]
150     <form action="/cgi-bin/koha/acqui/histsearch.pl" method="post">
151         [% IF ( context == "sidebar" ) %]
152             <fieldset class="brief">
153                 <h4>Search orders</h4>
154         [% ELSE %]
155             <fieldset class="rows">
156                 <legend>Search orders</legend>
157         [% END %]
158             [% INCLUDE 'filter-orders.inc' %]
159         </fieldset>
160         <input type="hidden" name="do_search" value="1" />
161         <fieldset class="action"><input type="submit" value="Search" /></fieldset>
162     </form>
163 [% END %]
165 [% INCLUDE 'intranet-bottom.inc' %]