Bug 10483: fix item uniqueness check on order form
authorFridolyn SOMERS <fridolyn.somers@biblibre.com>
Mon, 17 Jun 2013 15:01:33 +0000 (17:01 +0200)
committerTomas Cohen Arazi <tomascohen@gmail.com>
Tue, 10 Sep 2013 18:56:32 +0000 (15:56 -0300)
commitdf428a49e5c8b9106771d308bd1c1dea62d64429
tree3972bafdbaee11dc4db63d728520e2710ab2071f
parent2f4839c3ff22edab560b15e6bafa1a308a32c6a6
Bug 10483: fix item uniqueness check on order form

When syspref "UniqueItemFields" is defined, the item uniqueness is
tested in acquisition by an AJAX call to check_uniqueness.pl.  This
patch fixes an issue where check_uniqueness.pl wasn't looking
at the correct CGI parameters.

Test plan :
- Select an existing item with barcode
- Add "barcode" to "UniqueItemFields" syspref (use space as separator
  for multiple values)
- Set "AcqCreateItem" syspref to "Create an item when placing an order"
- Go to an acquisition basket
- Create a new order from empty
- Enter existing barcode in item form and save
=> You get an alert that barcode already exists and order is not saved
- Enter a non-existing barcode in item form and save
=> Order and item are created

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 1c9135262b9233f59fd05e34c90980e7dc8be338)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
acqui/check_uniqueness.pl