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)
committerGalen Charlton <gmc@esilibrary.com>
Wed, 14 Aug 2013 21:17:11 +0000 (21:17 +0000)
commit1c9135262b9233f59fd05e34c90980e7dc8be338
treeee11ba1ba02762b123ae1108f598c45b05147656
parent129c974fdde0dc62e568f7aa01c4a0796ae150ae
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>
acqui/check_uniqueness.pl