<div class="yui-b">
<h1>Invoices</h1>
[% IF ( do_search ) %]
- [% IF ( results_loop ) %]
+ [% IF invoices %]
<table id="resultst">
<thead>
<tr>
</tr>
</thead>
<tbody>
- [% FOREACH result IN results_loop %]
+ [% FOREACH invoice IN invoices %]
<tr>
- <td><a href="/cgi-bin/koha/acqui/invoice.pl?invoiceid=[% result.invoiceid %]">[% result.invoicenumber %]</a></td>
- <td><a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% result.booksellerid %]">[% result.suppliername %]</a></td>
+ <td><a href="/cgi-bin/koha/acqui/invoice.pl?invoiceid=[% invoice.invoiceid %]">[% invoice.invoicenumber %]</a></td>
+ <td><a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% invoice.booksellerid %]">[% invoice.suppliername %]</a></td>
<td>
- [% IF (result.billingdate) %]
- [% result.billingdate | $KohaDates %]
+ [% IF invoice.billingdate %]
+ [% invoice.billingdate | $KohaDates %]
[% END %]
</td>
- <td>[% result.receivedbiblios %]</td>
- <td>[% result.receiveditems %]</td>
+ <td>[% invoice.receivedbiblios %]</td>
+ <td>[% invoice.receiveditems %]</td>
<td>
- [% IF ( result.closedate ) %]
- Closed on [% result.closedate | $KohaDates %]
+ [% IF invoice.closedate %]
+ Closed on [% invoice.closedate | $KohaDates %]
[% ELSE %]
Open
[% END %]
</td>
<td>
- <a href="/cgi-bin/koha/acqui/invoice.pl?invoiceid=[% result.invoiceid %]">Details</a> /
- [% IF ( result.closedate ) %]
- <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>
+ <a href="/cgi-bin/koha/acqui/invoice.pl?invoiceid=[% invoice.invoiceid %]">Details</a> /
+ [% IF invoice.closedate %]
+ <a href="invoice.pl?op=reopen&invoiceid=[% invoice.invoiceid %]&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>
[% ELSE %]
- <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>
+ <a href="invoice.pl?op=close&invoiceid=[% invoice.invoiceid %]&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>
[% END %]
</td>
</tr>
[% IF ( invoicenumber ) %]
<li>Invoice no.: [% invoicenumber %]</li>
[% END %]
- [% IF ( supplier ) %]
+ [% IF booksellerid %]
<li>Vendor: [% suppliername %]</li>
[% END %]
[% IF ( billingdatefrom ) %]
<li>Publication year: [% publicationyear %]</li>
[% END %]
[% IF ( branch ) %]
- <li>Branch: [% branchname %]</li>
+ <li>Library: [% branchname %]</li>
[% END %]
</ul>
</p>
- [% END %]<!-- results_loop -->
+ [% END %]<!-- invoices -->
[% ELSE %]
<p>Use the search form on the left to find invoices.</p>
[% END %]<!-- do_search -->
<input type="text" id="invoicenumber" name="invoicenumber" value="[% invoicenumber %]" />
</li>
<li>
- <label for="supplier">Supplier:</label>
+ <label for="supplier">Vendor:</label>
<select id="supplier" name="supplierid">
<option value="">All</option>
[% FOREACH supplier IN suppliers_loop %]