Fixing the problem that all items were getting biblioitem=1 set
authorrangi <rangi>
Sat, 1 Apr 2006 22:10:50 +0000 (22:10 +0000)
committerrangi <rangi>
Sat, 1 Apr 2006 22:10:50 +0000 (22:10 +0000)
C4/Biblio.pm
misc/migration_tools/bulkmarcimport.pl

index 81986a0..d3b70a3 100644 (file)
@@ -1033,7 +1033,7 @@ creates an item from a MARC::Record
 
 sub NEWnewitem {
     my ( $dbh,$record,$biblionumber,$biblioitemnumber ) = @_;
-
+    warn "here is the $biblioitemnumber";
     # add item in old-DB
        my $frameworkcode=MARCfind_frameworkcode($dbh,$biblionumber);
     my $item = &MARCmarc2koha( $dbh,$record,$frameworkcode );
@@ -1454,7 +1454,7 @@ sub REALnewitems {
     if ( $item->{'loan'} ) {
         $item->{'notforloan'} = $item->{'loan'};
     }
-       $item->{'biblioitemnumber'} = 1;
+#      $item->{'biblioitemnumber'} = 1;
     # if dateaccessioned is provided, use it. Otherwise, set to NOW()
     if ( $item->{'dateaccessioned'} ) {
         $sth = $dbh->prepare( "Insert into items set
@@ -3014,6 +3014,9 @@ Paul POULAIN paul.poulain@free.fr
 
 # $Id$
 # $Log$
+# Revision 1.166  2006/04/01 22:10:50  rangi
+# Fixing the problem that all items were getting biblioitem=1 set
+#
 # Revision 1.165  2006/04/01 21:22:05  rangi
 # Adding a little fake subroutine that a few scripts in the opac depend on, can be removed once the opac scripts are rewritten
 #
index bf81ce2..5527306 100644 (file)
@@ -160,10 +160,11 @@ warn "NUM:".$number;
        print "$i : $nbitems items found\n" if $verbose;
        # now, create biblio and items with NEWnewXX call.
        unless ($test_parameter) {
-               my ($bibid,$oldbibnum,$oldbibitemnum) = NEWnewbiblio($dbh,$newRecord,'');
+               my ($bibid,$oldbibitemnum) = NEWnewbiblio($dbh,$newRecord,'');
                warn "ADDED biblio NB $bibid in DB\n" if $verbose;
                for (my $i=0;$i<=$#items;$i++) {
-                       NEWnewitem($dbh,$items[$i],$bibid);
+                   warn "here is the biblioitemnumber $oldbibitemnum";
+                       NEWnewitem($dbh,$items[$i],$bibid,$oldbibitemnum);
                }
        }
 }