Bug 36620: Broken order management for suggestions with quantity
Test plan
=========
Scenario A (the bug)
--------------------
1. In OPAC, create a purchase suggestion with defined quantity
("Copies" in staff interface).
2. Accept the suggestion.
2. Have a budget, fund, vendor etc. to use the Acquisitions module.
Ensure that AcqCreateItem syspref is set to 'placing an order'.
3. Create a new basket and add to basket an order line from accepted
suggestion. Note the initial Quantity set to the quantity entered
in suggestion. Note increasing this number while you add items
to the order with the 'Add item' button. Save the order, close the
basket.
4. Start receiving shipments for this order (create invoice etc.).
Receive items you created by 'Add item' until there is nothing more
to receive. Note the number of unreecived items in the order (eqal
to the initial quantity from the suggestion) that cannot be regulary
received (with the items table on the left). This is the *bug*.
[This is due to the ambiguity of $data->{quantity} in the neworderempty.pl
-- it normally comes from the order: GetOrder, but in the case of a yet
empty order created from a suggestion, it comes from the suggestions table:
GetSuggestion].
5. Apply the patch, restart plack etc.
6. Repeat step 2 and 3. While adding items in order note that you start
from quantity 0, and that the suggested quantity is shown in brackets.
7. Continue with p. 4. You should be able to receive the order in the
regular way (with the items created).
Scenario B (bonus)
------------------
Repeat the above with AcqCreateItem syspref is set to 'receiving the order',
or 'cataloging the record'. These cases do not create a bug as it does
the case with 'placing an order'. Note however, after applying the patch,
the initial quantity in the order is set to 0 and there is the bonus infomation
about the suggested number of items (from the suggestion).
Sponsored-by: Ignatianum University in Cracow Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>