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