Bug 10572: Add phone to message_transport_types table for new installs
[koha.git] / cataloguing / additem.pl
index 2c9b1c7..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
@@ -609,7 +604,10 @@ if ($op eq "additem") {
     }
   my $item = GetItem( $itemnumber );
     my $olditemlost =  $item->{'itemlost'};
-    my $newitemlost = $itemtosave->subfield('952','1');
+
+   my ($lost_tag,$lost_subfield) = GetMarcFromKohaField("items.itemlost",'');
+
+   my $newitemlost = $itemtosave->subfield( $lost_tag, $lost_subfield );
     if (($olditemlost eq '0' or $olditemlost eq '' ) and $newitemlost ge '1'){
   LostItem($itemnumber,'MARK RETURNED');
     }