Merge branch 'bug_9850' into 3.14-master
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / acqui / invoices.tt
1 [% USE KohaDates %]
2
3 [% INCLUDE 'doc-head-open.inc' %]
4 <title>Koha &rsaquo; Acquisitions &rsaquo; Invoices</title>
5 <link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" />
6 [% INCLUDE 'doc-head-close.inc' %]
7 <script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.dataTables.min.js"></script>
8 [% INCLUDE 'datatables-strings.inc' %]
9 <script type="text/javascript" src="[% themelang %]/js/datatables.js"></script>
10 [% INCLUDE 'calendar.inc' %]
11 <script type="text/javascript">
12 //<![CDATA[
13 $(document).ready(function() {
14     [% IF (dateformat == 'metric') %]
15         dt_add_type_uk_date();
16     [% END %]
17     $("#resultst").dataTable($.extend(true, {}, dataTablesDefaults, {
18         bInfo: false,
19         bPaginate: false,
20         bFilter: false,
21         sDom: "t",
22         aoColumnDefs: [
23             { "bSortable": false, "aTargets": [6] }
24         ]
25     }));
26 });
27 //]]>
28 </script>
29 </head>
30
31 <body>
32 [% INCLUDE 'header.inc' %]
33 [% INCLUDE 'acquisitions-search.inc' %]
34
35 <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; Invoices</div>
36
37 <div id="doc3" class="yui-t2">
38
39 <div id="bd">
40   <div id="yui-main">
41     <div class="yui-b">
42       <h1>Invoices</h1>
43       [% IF ( do_search ) %]
44         [% IF ( results_loop ) %]
45           <table id="resultst">
46             <thead>
47               <tr>
48                 <th>Invoice no.</th>
49                 <th>Vendor</th>
50                 <th>Billing date</th>
51                 <th>Received biblios</th>
52                 <th>Received items</th>
53                 <th>Status</th>
54                 <th>&nbsp;</th>
55               </tr>
56             </thead>
57             <tbody>
58               [% FOREACH result IN results_loop %]
59                 <tr>
60                   <td><a href="/cgi-bin/koha/acqui/invoice.pl?invoiceid=[% result.invoiceid %]">[% result.invoicenumber %]</a></td>
61                   <td><a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% result.booksellerid %]">[% result.suppliername %]</a></td>
62                   <td>
63                     [% IF (result.billingdate) %]
64                       [% result.billingdate | $KohaDates %]
65                     [% END %]
66                   </td>
67                   <td>[% result.receivedbiblios %]</td>
68                   <td>[% result.receiveditems %]</td>
69                   <td>
70                     [% IF ( result.closedate ) %]
71                       Closed on [% result.closedate | $KohaDates %]
72                     [% ELSE %]
73                       Open
74                     [% END %]
75                   </td>
76                   <td>
77                     <a href="/cgi-bin/koha/acqui/invoice.pl?invoiceid=[% result.invoiceid %]">Details</a> /
78                     [% IF ( result.closedate ) %]
79                       <a href="invoice.pl?op=reopen&amp;invoiceid=[% result.invoiceid %]&amp;referer=/cgi-bin/koha/acqui/invoices.pl%3Fop=do_search%26invoicenumber=[% invoicenumber %]%26supplier=[% supplier %]%26billingdatefrom=[% billingdatefrom %]%26billingdateto=[% billingdateto %]%26isbneanissn=[% isbneanissn %]%26title=[% title %]%26author=[% author %]%26publisher=[% publisher %]%26publicationyear=[% publicationyear %]%26branch=[% branch %]">Reopen</a>
80                     [% ELSE %]
81                       <a href="invoice.pl?op=close&amp;invoiceid=[% result.invoiceid %]&amp;referer=/cgi-bin/koha/acqui/invoices.pl%3Fop=do_search%26invoicenumber=[% invoicenumber %]%26supplier=[% supplier %]%26billingdatefrom=[% billingdatefrom %]%26billingdateto=[% billingdateto %]%26isbneanissn=[% isbneanissn %]%26title=[% title %]%26author=[% author %]%26publisher=[% publisher %]%26publicationyear=[% publicationyear %]%26branch=[% branch %]">Close</a>
82                     [% END %]
83                   </td>
84                 </tr>
85               [% END %]
86             </tbody>
87           </table>
88         [% ELSE %]
89           <p>Sorry, but there is no results for your search.</p>
90           <p>Search was:
91             <ul>
92               [% IF ( invoicenumber ) %]
93                 <li>Invoice no.: [% invoicenumber %]</li>
94               [% END %]
95               [% IF ( supplier ) %]
96                 <li>Vendor: [% suppliername %]</li>
97               [% END %]
98               [% IF ( billingdatefrom ) %]
99                 <li>Billing date:
100                 [% IF ( billingdateto ) %]
101                   From [% billingdatefrom %]
102                   To [% billingdateto %]
103                 [% ELSE %]
104                   All since [% billingdatefrom %]
105                 [% END %]
106                 </li>
107               [% ELSE %]
108                 [% IF ( billingdateto ) %]
109                   <li>Billing date:
110                     All until [% billingdateto %]
111                   </li>
112                 [% END %]
113               [% END %]
114               [% IF ( isbneanissn ) %]
115                 <li>ISBN/EAN/ISSN: [% isbneanissn %]</li>
116               [% END %]
117               [% IF ( title ) %]
118                 <li>Title: [% title %]</li>
119               [% END %]
120               [% IF ( author ) %]
121                 <li>Author: [% author %]</li>
122               [% END %]
123               [% IF ( publisher ) %]
124                 <li>Publisher: [% publisher %]</li>
125               [% END %]
126               [% IF ( publicationyear ) %]
127                 <li>Publication year: [% publicationyear %]</li>
128               [% END %]
129               [% IF ( branch ) %]
130                 <li>Library: [% branchname %]</li>
131               [% END %]
132             </ul>
133           </p>
134         [% END %]<!-- results_loop -->
135       [% ELSE %]
136         <p>Use the search form on the left to find invoices.</p>
137       [% END %]<!-- do_search -->
138     </div>
139   </div>
140   <div class="yui-b">
141     <form action="" method="get">
142       <fieldset class="brief">
143         <h3>Search filters</h3>
144         <ol>
145           <li>
146             <label for="invoicenumber">Invoice no:</label>
147             <input type="text" id="invoicenumber" name="invoicenumber" value="[% invoicenumber %]" />
148           </li>
149           <li>
150             <label for="supplier">Vendor:</label>
151             <select id="supplier" name="supplierid">
152               <option value="">All</option>
153               [% FOREACH supplier IN suppliers_loop %]
154                 [% IF ( supplier.selected ) %]
155                   <option selected="selected" value="[% supplier.booksellerid %]">[% supplier.suppliername %]</option>
156                 [% ELSE %]
157                   <option value="[% supplier.booksellerid %]">[% supplier.suppliername %]</option>
158                 [% END %]
159               [% END %]
160             </select>
161           </li>
162           <li>
163             <fieldset class="brief">
164               <legend>Shipment date</legend>
165               <ol>
166                 <li>
167                   <label for="shipmentdatefrom">From:</label>
168                   <input type="text" id="shipmentdatefrom" name="shipmentdatefrom" size="10" value="[% shipmentdatefrom %]" class="datepicker" />
169                 </li>
170                 <li>
171                   <label for="shipmentdateto">To:</label>
172                   <input type="text" id="shipmentdateto" name="shipmentdateto" size="10" value="[% shipmentdateto %]" class="datepicker" />
173                 </li>
174               </ol>
175             </fieldset>
176           </li>
177           <li>
178             <fieldset class="brief">
179               <legend>Billing date</legend>
180               <ol>
181                 <li>
182                   <label for="billingdatefrom">From:</label>
183                   <input type="text" id="billingdatefrom" name="billingdatefrom" size="10" value="[% billingdatefrom %]" class="datepicker" />
184                 </li>
185                 <li>
186                   <label for="billingdateto">To:</label>
187                   <input type="text" id="billingdateto" name="billingdateto" size="10" value="[% billingdateto %]" class="datepicker" />
188                 </li>
189               </ol>
190             </fieldset>
191           </li>
192           <li>
193             <label for="isbneanissn">ISBN / EAN / ISSN:</label>
194             <input type="text" id="isbneanissn" name="isbneanissn" value="[% isbneanissn %]" />
195           </li>
196           <li>
197             <label for="title">Title:</label>
198             <input type="text" id="title" name="title" value="[% title %]" />
199           </li>
200           <li>
201             <label for="author">Author:</label>
202             <input type="text" id="author" name="author" value="[% author %]" />
203           </li>
204           <li>
205             <label for="publisher">Publisher:</label>
206             <input type="text" id="publisher" name="publisher" value="[% publisher %]" />
207           </li>
208           <li>
209             <label for="publicationyear">Publication year:</label>
210             <input type="text" id="publicationyear" name="publicationyear" value="[% publicationyear %]" />
211           </li>
212           <li>
213             <label for="branch">Library:</label>
214             <select id="branch" name="branch">
215               <option value="">All</option>
216               [% FOREACH branch IN branches_loop %]
217                 [% IF ( branch.selected ) %]
218                   <option selected="selected" value="[% branch.branchcode %]">[% branch.branchname %]</option>
219                 [% ELSE %]
220                   <option value="[% branch.branchcode %]">[% branch.branchname %]</option>
221                 [% END %]
222               [% END %]
223             </select>
224           </li>
225         </ol>
226         <fieldset class="action">
227           <input type="submit" value="Search" />
228         </fieldset>
229       </fieldset>
230       <input type="hidden" name="op" id="op" value="do_search" />
231     </form>
232     [% INCLUDE 'acquisitions-menu.inc' %]
233   </div>
234 </div>
235 [% INCLUDE 'intranet-bottom.inc' %]