489d480042
- add a message if the search returns no result - keep selected values if the search returns no result (for fund and order status) - remove plurals in order status - move the order status column in the search results table Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Passes all tests and QA script. New tests also pass: t/db_dependent/Acquisition/close_reopen_basket.t 1) Database update - I end up with too many partials. My test cases: - New orders, basket still open OK Expected: new, Result: partial - Ordered orders, basket and basketgroup closed OK Expected: ordered, Result: partial - Partially received orders OK Expected: partial/complete, Result: partial/complete - Received orders OK: Expected: complete, Result: complete - Cancelled orders * cancelled from open basket before order OK: Expected: cancelled, Result: cancelled * cancelled from closed basket before receive OK: Expected: cancelled, Result: cancelled All aqorders where updated with the correct status. I have saved my 'pre-updatedatabase' and can repeat the test anytime you have a follow up. 2) Testing search functionality a) Order search - result list Order search shows a new column, I think it would be a bit better if the status there was singular instead of plural - new order, partially received order etc. - maybe we could even leave out the 'order'? (minor) The column seems a bit lost in the middle, not sure where it would make more sense (just saying) b) Order search - advanced search form The advanced search form now shows a new filter: Order status All new status can be searched. - an "empty" search will find all but cancelled orders - searching for cancelled orders works correctly and shows results Search works correctly, no regressions found. If no result is found a message is shown. All search input is kept, so you can modify your search terms easily. 3) Testing setting of status after applying the patch a) Create a new order with 2 items - status is new. OK b) Close the basket - status is ordered. OK c) Receive both items - status is completed. OK d) Undo receipt - status is ordered. OK e) Receive only 1 item - order is split up into 2 orders: - status is partial OK - status is completed OK f) Undo receipt of received item - order is combined into 1 again - status is ordered OK! g) Receive only 1 item again - status ordered/partial. h) Delete order. - status is completed - status is cancelled OK! i) Undo receipt of 1 item again. Refresh page. This results in the following behaviour, that has been reported as bug 10984. After refreshing the page follow message is shown: Cannot cancel receipt. Possible reasons : - The order line you trying to cancel was created from a partial receipt of another order line which is already received. Try to cancel this one first and retry. - The order line you trying to cancel was created from a partial receipt of another order line which has been deleted. Cancellation is not possible. BUT: The receipt is undone, but you are left with a line with 2 items, a cancellation date and the status ordered. Because of the cancellation date the order is not visible in pending orders. The status is correct - so I feel this should not stop this patch. Signed-off-by: Galen Charlton <gmc@esilibrary.com>
199 lines
8.7 KiB
Text
199 lines
8.7 KiB
Text
[% USE KohaDates %]
|
|
[% INCLUDE 'doc-head-open.inc' %]
|
|
<title>Koha › Acquisitions › [% IF ( order_loop ) %]Orders search › Search results[% ELSE %]Order search[% END %]</title>
|
|
<link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" />
|
|
[% INCLUDE 'doc-head-close.inc' %]
|
|
[% INCLUDE 'calendar.inc' %]
|
|
[% INCLUDE 'datatables.inc' %]
|
|
<script type="text/javascript">
|
|
//<![CDATA[
|
|
[% IF (dateformat == 'metric') %]
|
|
dt_add_type_uk_date();
|
|
[% END %]
|
|
$(document).ready(function() {
|
|
var histsearcht = $("#histsearcht").dataTable($.extend(true, {}, dataTablesDefaults, {
|
|
"sPaginationType": "four_button"
|
|
} ) );
|
|
});
|
|
//]]>
|
|
</script>
|
|
</head>
|
|
<body id="acq_histsearch" class="acq">
|
|
[% INCLUDE 'header.inc' %]
|
|
[% INCLUDE 'acquisitions-search.inc' %]
|
|
|
|
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a> › [% IF ( order_loop ) %]<a href="/cgi-bin/koha/acqui/histsearch.pl">Orders search</a> › Search results[% ELSE %]Order search[% END %]</div>
|
|
|
|
<div id="doc3" class="yui-t2">
|
|
|
|
<div id="bd">
|
|
<div id="yui-main">
|
|
<div class="yui-b">
|
|
|
|
[% UNLESS ( order_loop ) %]<form action="/cgi-bin/koha/acqui/histsearch.pl" method="post">
|
|
<fieldset class="rows">
|
|
<legend>Search orders</legend>
|
|
<ol>
|
|
<li><label for="title">Title: </label> <input type="text" name="title" id="title" value="[% title %]" /></li>
|
|
<li><label for="author">Author: </label> <input type="text" name="author" id="author" value="[% author %]" /></li>
|
|
<li><label for="isbn">ISBN: </label> <input type="text" name="isbn" id="isbn" value="[% isbn %]" /></li>
|
|
[% IF (UNIMARC) %]
|
|
<li><label for="ean">EAN: </label> <input type="text" name="ean" id="ean" value="[% ean %]" /></li>
|
|
[% END %]
|
|
<li><label for="name">Vendor: </label> <input type="text" name="name" id="name" value="[% name %]" /></li>
|
|
<li><label for="basket">Basket: </label> <input type="text" name="basket" id="basket" value="[% basket %]" /></li>
|
|
<li><label for="booksellerinvoicenumber ">Bookseller invoice no: </label> <input type="text" name="booksellerinvoicenumber" id="booksellerinvoicenumber" value="[% booksellerinvoicenumber %]" /></li>
|
|
<li>
|
|
<label for="basketgroupname">Basket group:</label>
|
|
<input type="text" name="basketgroupname" id="basketgroupname" value="[% basketgroupname %]" />
|
|
</li>
|
|
|
|
<li>
|
|
<label for="orderstatus">Order status: </label>
|
|
<select name="orderstatus" id="orderstatus">
|
|
[% IF orderstatus == "" %]
|
|
<option value=""></option>
|
|
[% ELSE %]
|
|
<option value="" selected="selected"></option>
|
|
[% END %]
|
|
[% IF orderstatus == "new" %]
|
|
<option value="new" selected="selected">New</option>
|
|
[% ELSE %]
|
|
<option value="new">New</option>
|
|
[% END %]
|
|
[% IF orderstatus == "ordered" %]
|
|
<option value="ordered" selected="selected">Pending</option>
|
|
[% ELSE %]
|
|
<option value="ordered">Pending</option>
|
|
[% END %]
|
|
[% IF orderstatus == "partial" %]
|
|
<option value="partial" selected="selected">Partially received</option>
|
|
[% ELSE %]
|
|
<option value="partial">Partially received</option>
|
|
[% END %]
|
|
[% IF orderstatus == "complete" %]
|
|
<option value="complete" selected="selected">Received</option>
|
|
[% ELSE %]
|
|
<option value="complete">Received</option>
|
|
[% END %]
|
|
[% IF orderstatus == "cancelled" %]
|
|
<option value="cancelled" selected="selected">Cancelled</option>
|
|
[% ELSE %]
|
|
<option value="cancelled">Cancelled</option>
|
|
[% END %]
|
|
</select>
|
|
</li>
|
|
<li>
|
|
<label for="fund">Fund: </label>
|
|
<select name="budget" id="fund">
|
|
<option value="">All funds</option>
|
|
[% FOREACH bp_loo IN bp_loop %]
|
|
<optgroup label="[% bp_loo.budget_period_description %]">
|
|
[% FOREACH h_loo IN bp_loo.hierarchy %]
|
|
[% IF h_loo.budget_id == budget_id %]
|
|
<option type="text" value="[% h_loo.budget_id %]" branchcode="[% h_loo.budget_branchcode %]" selected="selected">
|
|
[% ELSE %]
|
|
<option type="text" value="[% h_loo.budget_id %]" branchcode="[% h_loo.budget_branchcode %]">
|
|
[% END %]
|
|
[% h_loo.budget_display_name %]
|
|
</option>
|
|
[% END %]
|
|
</optgroup>
|
|
[% END %]
|
|
</select>
|
|
</li>
|
|
|
|
<li><label for="from">From: </label>
|
|
<input type="text" size="10" id="from" name="from" value="[% from_placed_on %]" class="datepickerfrom" />
|
|
<div class="hint">[% INCLUDE 'date-format.inc' %]</div>
|
|
</li>
|
|
<li><label for="to">To: </label>
|
|
<input type="text" size="10" id="to" name="to" value="[% to_placed_on %]" class="datepickerto" />
|
|
<div class="hint">[% INCLUDE 'date-format.inc' %]</div>
|
|
</li>
|
|
</ol>
|
|
</fieldset>
|
|
<input type="hidden" name="do_search" value="1" />
|
|
<fieldset class="action"><input type="submit" value="Search" /></fieldset>
|
|
</form>[% END %]
|
|
[% IF ( order_loop ) %]<h1>Search results</h1>
|
|
<div id="acqui_histsearch">
|
|
<table id="histsearcht">
|
|
<thead>
|
|
<tr>
|
|
<th>Order line (parent)</th>
|
|
<th>Status</th>
|
|
<th>Basket</th>
|
|
<th>Basket group</th>
|
|
<th>Invoice number</th>
|
|
<th>Summary</th>
|
|
<th>Vendor</th>
|
|
<th>Placed on</th>
|
|
<th>Received on</th>
|
|
<th>Quantity received</th>
|
|
<th>Pending order</th>
|
|
<th>Unit cost</th>
|
|
<th>Fund</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
[% FOREACH order IN order_loop %]
|
|
<tr>
|
|
<td>
|
|
[% order.ordernumber %]
|
|
[% IF order.ordernumber != order.parent_ordernumber %]([% order.parent_ordernumber %])[% END %]
|
|
</td>
|
|
<td>
|
|
[% SWITCH order.orderstatus %]
|
|
[% CASE 'new' %]New
|
|
[% CASE 'ordered' %]Pending
|
|
[% CASE 'partial' %]Partially received
|
|
[% CASE 'complete' %]Received
|
|
[% CASE 'cancelled' %]Cancelled
|
|
[% END %]
|
|
</td>
|
|
<td>[% order.basketname %] (<a href="basket.pl?basketno=[% order.basketno %]">[% order.basketno %]</a>)</td>
|
|
<td>
|
|
[% IF ( order.basketgroupid ) %]
|
|
[% order.groupname %] (<a href="basketgroup.pl?booksellerid=[% order.id %]">[% order.basketgroupid %]</a>)
|
|
[% ELSE %]
|
|
|
|
[% END %]
|
|
</td>
|
|
<td>[% IF ( order.invoicenumber ) %]
|
|
<a href="/cgi-bin/koha/acqui/parcel.pl?invoiceid=[% order.invoiceid %]">[% order.invoicenumber %]</a>
|
|
[% ELSE %]
|
|
|
|
[% END %]
|
|
</td>
|
|
<td>
|
|
<a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% order.biblionumber %]">[% order.title |html %]</a>
|
|
<br />[% order.author %] <br /> [% order.isbn %]
|
|
</td>
|
|
<td><a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% order.id %]">[% order.name %]</a></td>
|
|
<td>[% order.creationdate | $KohaDates %]</td>
|
|
<td>
|
|
[% IF order.datereceived %]
|
|
[% order.datereceived | $KohaDates %]
|
|
[% END %]
|
|
</td>
|
|
<td>[% order.quantityreceived %]</td>
|
|
<td>[% order.quantity %]</td>
|
|
<td>[% order.ecost %]</td>
|
|
<td>[% order.budget_name %]</td>
|
|
</tr>
|
|
[% END %]
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
[% ELSIF search_done %]
|
|
There is no order for this search.
|
|
[% END %]
|
|
|
|
</div>
|
|
</div>
|
|
<div class="yui-b">
|
|
[% INCLUDE 'acquisitions-menu.inc' %]
|
|
</div>
|
|
</div>
|
|
[% INCLUDE 'intranet-bottom.inc' %]
|