Koha/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/uncertainprice.tt
Owen Leonard 91a88e6f00 Bug 9106 - Filtering list of uncertain price list by owner empties order information
The form which filters the list of orders with uncertain prices
includes a parameter which tells the script to modify the orders,
resulting in order information being lost. This patch removes
the unnecessary form field.

To test you must have orders with uncertain prices, preferably from
more than one user. Go to the uncertain prices page. Before applying
this patch, submitting the "orders from" form would cause the page
to refresh with no results. This is because the script cleared the
orders of price, quantity, etc. information.

After applying this patch the uncertain prices list should refresh
and show the correct results, either your orders ("me") or all
("Everyone").

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
2012-11-22 09:40:36 -05:00

132 lines
5.4 KiB
Text

[% INCLUDE 'doc-head-open.inc' %]
<title>Koha &rsaquo; Orders with uncertain prices for Vendor [% booksellername %]</title>
<link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" />
[% INCLUDE 'doc-head-close.inc' %]
<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.dataTables.min.js"></script>
[% INCLUDE 'datatables-strings.inc' %]
<script type="text/javascript" src="[% themelang %]/js/datatables.js"></script>
<script type="text/javascript">
//<![CDATA[
$(document).ready(function() {
var uncertainpricet = $("#uncertainpricet").dataTable($.extend(true, {}, dataTablesDefaults, {
"aoColumnDefs": [
{ "aTargets": [ -1, -2, -3 ], "bSortable": false, "bSearchable": false },
],
"sPaginationType": "four_button"
} ) );
});
//]]>
</script>
<script type="text/javascript" src="[% themelang %]/js/acq.js"></script>
<script type="text/javascript">
//<![CDATA[
function check(form) {
form.submit();
}
//]]>
</script>
</head>
<body id="acq_uncertainprice" class="acq">
[% INCLUDE 'header.inc' %]
[% INCLUDE 'acquisitions-search.inc' %]
<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;<a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid %]">[% booksellername %]</a> &rsaquo; Uncertain prices for vendor: [% booksellername %]</div>
<div id="doc" class="yui-t7">
<div id="bd">
<div id="yui-main">
[% IF ( validate ) %]
<META HTTP-EQUIV=Refresh CONTENT="0; url=[% scriptname %]?booksellerid=[% booksellerid %]">
[% ELSE %]
<h1>Orders with uncertain prices for vendor <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid %]">[% booksellername %]</a> <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid %]&amp;op=enter">(edit)</a></h1>
<h2>Contact information</h2>
<p><strong>Address: </strong>
[% booksellerpostal %]
[% bookselleraddress1 %]
[% bookselleraddress2 %]
[% bookselleraddress3 %]
[% bookselleraddress4 %]
<a href="[% booksellerurl %]">[% booksellerurl %]</a>
</p>
<p><strong>Phone: </strong>
[% booksellerphone %] / Fax:
[% booksellerfax %]</p>
<dl>
<dt><strong>Contact: </strong></dt>
<dd>[% booksellercontact %]
[% booksellercontpos %]
[% booksellercontphone %]
[% booksellercontaltphone %]
[% booksellercontemail %]
[% booksellercontnotes %]
</dd>
</dl>
[% IF ( booksellernotes ) %]
<p><strong>Notes: </strong>
[% booksellernotes %]</p>
[% END %]
<h2>Orders with uncertain prices</h2>
<form action="[% scriptname %]" method="post" name="uncertainprices">
<input type="hidden" name="booksellerid" value="[% booksellerid %]" />
Orders from:
<select name="owner">
[% IF ( owner ) %]
<option value="0">Everyone</option>
<option value="1" selected="selected">me</option>
[% ELSE %]
<option value="0" selected="selected">Everyone</option>
<option value="1">me</option>
[% END %]
</select>
<input type="submit" value="Filter" />
</form>
<form action="[% scriptname %]" method="post" name="uncertainprices">
<input type="hidden" name="booksellerid" value="[% booksellerid %]" />
<input type="hidden" name="op" value="validate" />
<table id="uncertainpricet">
<thead>
<tr>
<th>basket</th>
<th>order</th>
<th>by</th>
<th>uncertain</th>
<th>price</th>
<th>quantity</th>
</tr>
</thead>
<tbody>
[% FOREACH uncertainpriceorder IN uncertainpriceorders %]
<tr>
<td>
[% uncertainpriceorder.basketname %]
</td>
<td>
[% uncertainpriceorder.bibtitle %] / [% uncertainpriceorder.bibauthor %] <br /> [% uncertainpriceorder.bibpublishercode %], [% uncertainpriceorder.bibpublicationyear %]<br />[% uncertainpriceorder.bibisbn %]<br />
<a href="neworderempty.pl?ordernumber=[% uncertainpriceorder.ordernumber %]&amp;booksellerid=[% booksellerid %]&amp;basketno=[% uncertainpriceorder.basketno %]">
edit
</a>
</td>
<td>
[% uncertainpriceorder.firstname %] [% uncertainpriceorder.surname %]
</td>
<td>
<input type="checkbox" name="uncertainprice[% uncertainpriceorder.ordernumber %]" value="1" checked="checked" />
</td>
<td>
<input type="text" size="10" name="price[% uncertainpriceorder.ordernumber %]" value="[% uncertainpriceorder.listprice %]"
onchange="uncheckbox(this.form, [% uncertainpriceorder.ordernumber %]);" />
</td>
<td>
<input type="text" size="10" name="qty[% uncertainpriceorder.ordernumber %]" value="[% uncertainpriceorder.quantity %]"
onchange="uncheckbox(this.form, [% uncertainpriceorder.ordernumber %]);" />
</td>
</tr>
[% END %]
</tbody>
</table>
<fieldset class="action"><input type="button" value="Save" onclick="check(this.form)" /></fieldset>
</form>
[% END %]
</div>
</div>[% INCLUDE 'intranet-bottom.inc' %]