From: Ryan Higgins Date: Fri, 20 Jun 2008 21:36:01 +0000 (-0500) Subject: bug 2201 - autoBarcode code in acq is old. Modified to only work with 'increment... X-Git-Tag: v3.00.00-stableRC1~39 X-Git-Url: http://git.rot13.org/?a=commitdiff_plain;h=e483f065a36a49bbb1ff9d49e8dff5f2fcb3e999;p=koha.git bug 2201 - autoBarcode code in acq is old. Modified to only work with 'increment', and added FIXME Signed-off-by: Joshua Ferraro --- diff --git a/acqui/orderreceive.pl b/acqui/orderreceive.pl index 13a0e88472..eaab7ee2dc 100755 --- a/acqui/orderreceive.pl +++ b/acqui/orderreceive.pl @@ -147,12 +147,11 @@ if ( $count == 1 ) { push @branchloop, \%row; } - my $auto_barcode = C4::Context->boolean_preference("autoBarcode") || 0; - - # See whether barcodes should be automatically allocated. - # Defaults to 0, meaning "no". my $barcode; - if ( $auto_barcode ) { + # See whether barcodes should be automatically allocated. + # FIXME : only incremental is implemented here, and it creates a race condition. + # + if ( C4::Context->preference('autoBarcode') eq 'incremental' ) { my $sth = $dbh->prepare("Select max(barcode) from items"); $sth->execute; my $data = $sth->fetchrow_hashref;