If items are created on ordering, the quantity for uncertain prices
should not be editable.
Test plan:
0/ Set AcqCreateItem to "on ordering"
1/ Create a basket and add an order with 1+ items
2/ Mark it as uncertain prices
3/ Go on the uncertain prices page for this vendor
(acqui/uncertainprice.pl?booksellerid=X)
4/ Confirm you are not allowed to update the quantity
5/ Change the price and save
6/ Confirm the quantity is still correct
Set the pref to another value and confirm the behavior has not changed.
NOTE: Tested with 'on placing order' and 'on receiving order'.
Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
+[% USE Koha %]
[% INCLUDE 'doc-head-open.inc' %]
<title>Koha › Acquisitions › [% IF ( booksellername ) %]Orders with uncertain prices for vendor [% booksellername %][% ELSE %]Orders with uncertain prices[% END %]</title>
<link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" />
</td>
<td>
- <input type="text" size="10" name="qty[% uncertainpriceorder.ordernumber %]" value="[% uncertainpriceorder.quantity %]"
- onchange="uncheckbox(this.form, [% uncertainpriceorder.ordernumber %]);" />
+ [% IF Koha.Preference('AcqCreateItem') == 'ordering' %]
+ [% uncertainpriceorder.quantity %]
+ <input type="hidden" name="qty[% uncertainpriceorder.ordernumber %]" value="[% uncertainpriceorder.quantity %]" />
+ [% ELSE %]
+ <input type="text" size="10" name="qty[% uncertainpriceorder.ordernumber %]" value="[% uncertainpriceorder.quantity %]"
+ onchange="uncheckbox(this.form, [% uncertainpriceorder.ordernumber %]);" />
+ [% END %]
</td>
</tr>
[% END %]