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