Bug 10305 - _increment_barcode is called twice
authorKyle M Hall <kyle@bywatersolutions.com>
Tue, 21 May 2013 19:58:44 +0000 (15:58 -0400)
committerGalen Charlton <gmc@esilibrary.com>
Mon, 23 Sep 2013 16:05:51 +0000 (16:05 +0000)
For some reason, _increment_barcode is called twice in succession in
cataloguing/additem.pl

Test Plan:
1) Enable autobarcode = incremental
2) Catalog an item, not the barcode
3) Apply this patch
4) Catalog another item, the barcode should be the next in line
   as previously. No change should be noted.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

cataloguing/additem.pl

index 0893f23..a819019 100755 (executable)
@@ -402,11 +402,6 @@ if ($op eq "additem") {
         $record = _increment_barcode($record, $frameworkcode);
     }
 
-
-    if (C4::Context->preference('autoBarcode') eq 'incremental') {
-        $record = _increment_barcode($record, $frameworkcode);
-    }
-
     my $addedolditem = TransformMarcToKoha( $dbh, $record );
 
     # If we have to add or add & duplicate, we add the item