Bug 9185

Summary: Duplicate barcode check broken on order receive
Product: Koha Reporter: Katrin Fischer <katrin.fischer>
Component: AcquisitionsAssignee: Bugs List <koha-bugs>
Status: RESOLVED DUPLICATE QA Contact:
Severity: major    
Priority: P5 - low    
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:

Description Katrin Fischer 2012-12-01 22:18:32 UTC
Settings:
AcqCreateItem = on receive
UniqueItemFields = barcode

1) Create a new order with one or more order lines
2) Close basket
3) Create a new invoice/shipment
4) Receive one item, use existing barcode

Problem:
- on saving, no warning appears
- item creation silently fails

Log:
...
[Sat Dec 01 23:11:05 2012] [error] [client 127.0.0.1] [Sat Dec  1 23:11:05 2012] finishreceive.pl: Indicator in 952 is empty at /home/katrin/kohaclone/C4/Biblio.pm line 2285., referer: http://localhost:8080/cgi-bin/koha/acqui/orderreceive.pl?ordernumber=25&invoiceid=3
[Sat Dec 01 23:11:05 2012] [error] [client 127.0.0.1] [Sat Dec  1 23:11:05 2012] finishreceive.pl: DBD::mysql::st execute failed: Duplicate entry '3' for key 'itembarcodeidx' at /home/katrin/kohaclone/C4/Items.pm line 2105., referer: http://localhost:8080/cgi-bin/koha/acqui/orderreceive.pl?ordernumber=25&invoiceid=3
[Sat Dec 01 23:11:05 2012] [error] [client 127.0.0.1] [Sat Dec  1 23:11:05 2012] finishreceive.pl: DBD::mysql::st execute failed: Column 'itemnumber' cannot be null at /home/katrin/kohaclone/C4/Acquisition.pm line 1094., referer: http://localhost:8080/cgi-bin/koha/acqui/orderreceive.pl?ordernumber=25&invoiceid=3
...
Comment 1 Katrin Fischer 2012-12-01 22:18:45 UTC
Tested in Chromium.
Comment 2 Katrin Fischer 2013-04-11 22:10:25 UTC

*** This bug has been marked as a duplicate of bug 8684 ***