koha-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Koha-cvs] CVS: koha/C4 Biblio.pm,1.115.2.17,1.115.2.18


From: Paul POULAIN
Subject: [Koha-cvs] CVS: koha/C4 Biblio.pm,1.115.2.17,1.115.2.18
Date: Tue, 02 Aug 2005 00:45:48 -0700

Update of /cvsroot/koha/koha/C4
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3289/C4

Modified Files:
      Tag: rel_2_2
        Biblio.pm 
Log Message:
fix for bug http://bugs.koha.org/cgi-bin/bugzilla/show_bug.cgi?id=1009
(Not all items fields mapped to MARC)

Index: Biblio.pm
===================================================================
RCS file: /cvsroot/koha/koha/C4/Biblio.pm,v
retrieving revision 1.115.2.17
retrieving revision 1.115.2.18
diff -C2 -r1.115.2.17 -r1.115.2.18
*** Biblio.pm   1 Aug 2005 15:15:43 -0000       1.115.2.17
--- Biblio.pm   2 Aug 2005 07:45:44 -0000       1.115.2.18
***************
*** 1787,1796 ****
      if ( $item->{'dateaccessioned'} ) {
          $sth = $dbh->prepare( "Insert into items set
!                                                       itemnumber           = 
?,                               biblionumber         = ?,
!                                                       biblioitemnumber     = 
?,                               barcode              = ?,
!                                                       booksellerid         = 
?,                                       dateaccessioned      = ?,
!                                                       homebranch           = 
?,                               holdingbranch        = ?,
!                                                       price                = 
?,                                               replacementprice     = ?,
!                                                       replacementpricedate = 
NOW(),   itemnotes            = ?,
                                                        itemcallnumber  =?,     
                                                notforloan = ?,
                                                        location = ?
--- 1787,1800 ----
      if ( $item->{'dateaccessioned'} ) {
          $sth = $dbh->prepare( "Insert into items set
!                                                       itemnumber           = 
?,                       biblionumber         = ?,
!                                                       multivolumepart      = 
?,
!                                                       biblioitemnumber     = 
?,                       barcode              = ?,
!                                                       booksellerid         = 
?,                       dateaccessioned      = ?,
!                                                       homebranch           = 
?,                       holdingbranch        = ?,
!                                                       price                = 
?,                       replacementprice     = ?,
!                                                       replacementpricedate = 
NOW(),           datelastseen            = NOW(),
!                                                       multivolume             
        = ?,                    stack                           = ?,
!                                                       itemlost                
        = ?,                    wthdrawn                        = ?,
!                                                       paidfor                 
        = ?,                    itemnotes            = ?,
                                                        itemcallnumber  =?,     
                                                notforloan = ?,
                                                        location = ?
***************
*** 1798,1829 ****
          );
          $sth->execute(
!             $itemnumber,                 $item->{'biblionumber'},
!             $item->{'biblioitemnumber'}, $barcode,
!             $item->{'booksellerid'},     $item->{'dateaccessioned'},
!             $item->{'homebranch'},       $item->{'holdingbranch'},
!             $item->{'price'},            $item->{'replacementprice'},
!             $item->{'itemnotes'},        $item->{'itemcallnumber'},
!             $item->{'notforloan'},            $item->{'location'}
          );
      }
      else {
          $sth = $dbh->prepare( "Insert into items set
!                                                       itemnumber           = 
?,                               biblionumber         = ?,
!                                                       biblioitemnumber     = 
?,                               barcode              = ?,
!                                                       booksellerid         = 
?,                                       dateaccessioned      = NOW(),
!                                                       homebranch           = 
?,                               holdingbranch        = ?,
!                                                       price                = 
?,                                               replacementprice     = ?,
!                                                       replacementpricedate = 
NOW(),   itemnotes            = ?,
!                                                       itemcallnumber = ? , 
notforloan = ?,
                                                        location = ?
                                                        "
          );
          $sth->execute(
!             $itemnumber,                 $item->{'biblionumber'},
!             $item->{'biblioitemnumber'}, $barcode,
!             $item->{'booksellerid'},     $item->{'homebranch'},
!             $item->{'holdingbranch'},    $item->{'price'},
!             $item->{'replacementprice'}, $item->{'itemnotes'},
!             $item->{'itemcallnumber'},   $item->{'notforloan'},
                        $item->{'location'}
          );
--- 1802,1845 ----
          );
          $sth->execute(
!                       $itemnumber,                            
$item->{'biblionumber'},
!                       $item->{'multivolumepart'},
!                       $item->{'biblioitemnumber'},$barcode,
!                       $item->{'booksellerid'},        
$item->{'dateaccessioned'},
!                       $item->{'homebranch'},          
$item->{'holdingbranch'},
!                       $item->{'price'},                       
$item->{'replacementprice'},
!                       $item->{multivolume},           $item->{stack},
!                       $item->{itemlost},                      
$item->{wthdrawn},
!                       $item->{paidfor},                       
$item->{'itemnotes'},
!                       $item->{'itemcallnumber'},      $item->{'notforloan'},
!                       $item->{'location'}
          );
      }
      else {
          $sth = $dbh->prepare( "Insert into items set
!                                                       itemnumber           = 
?,                       biblionumber         = ?,
!                                                       multivolumepart      = 
?,
!                                                       biblioitemnumber     = 
?,                       barcode              = ?,
!                                                       booksellerid         = 
?,                       dateaccessioned      = NOW(),
!                                                       homebranch           = 
?,                       holdingbranch        = ?,
!                                                       price                = 
?,                       replacementprice     = ?,
!                                                       replacementpricedate = 
NOW(),           datelastseen            = NOW(),
!                                                       multivolume             
        = ?,                    stack                           = ?,
!                                                       itemlost                
        = ?,                    wthdrawn                        = ?,
!                                                       paidfor                 
        = ?,                    itemnotes            = ?,
!                                                       itemcallnumber  =?,     
                                                notforloan = ?,
                                                        location = ?
                                                        "
          );
          $sth->execute(
!                       $itemnumber,                            
$item->{'biblionumber'},
!                       $item->{'multivolumepart'},
!                       $item->{'biblioitemnumber'},$barcode,
!                       $item->{'booksellerid'},
!                       $item->{'homebranch'},          
$item->{'holdingbranch'},
!                       $item->{'price'},                       
$item->{'replacementprice'},
!                       $item->{multivolume},           $item->{stack},
!                       $item->{itemlost},                      
$item->{wthdrawn},
!                       $item->{paidfor},                       
$item->{'itemnotes'},
!                       $item->{'itemcallnumber'},      $item->{'notforloan'},
                        $item->{'location'}
          );
***************
*** 1838,1861 ****
  sub OLDmoditem {
      my ( $dbh, $item ) = @_;
- 
- #  my 
($dbh,$loan,$itemnum,$bibitemnum,$barcode,$notes,$homebranch,$lost,$wthdrawn,$replacement)address@hidden;
-     #  my $dbh=C4Connect;
      $item->{'itemnum'} = $item->{'itemnumber'} unless $item->{'itemnum'};
!     my $query = "update items set  
barcode=?,itemnotes=?,itemcallnumber=?,notforloan=?,location=? where 
itemnumber=?";
      my @bind = (
!         $item->{'barcode'},        $item->{'notes'},
!         $item->{'itemcallnumber'}, $item->{'notforloan'},
!         $item->{'location'},     $item->{'itemnum'}
      );
      if ( $item->{'lost'} ne '' ) {
!         $query = "update items set biblioitemnumber=?,
!                              barcode=?,
!                              itemnotes=?,
!                              homebranch=?,
!                              itemlost=?,
!                              wthdrawn=?,
!                            itemcallnumber=?,
!                            notforloan=?,
!                                location=?";
          @bind = (
              $item->{'bibitemnum'},     $item->{'barcode'},
--- 1854,1870 ----
  sub OLDmoditem {
      my ( $dbh, $item ) = @_;
      $item->{'itemnum'} = $item->{'itemnumber'} unless $item->{'itemnum'};
!     my $query = "update items set  
barcode=?,itemnotes=?,itemcallnumber=?,notforloan=?,location=?,multivolumepart=?,multivolume=?,stack=?,wthdrawn=?";
      my @bind = (
!         $item->{'barcode'},                   $item->{'notes'},
!         $item->{'itemcallnumber'},    $item->{'notforloan'},
!         $item->{'location'},          $item->{multivolumepart},
!               $item->{multivolume},           $item->{stack},
!               $item->{wthdrawn},
      );
      if ( $item->{'lost'} ne '' ) {
!         $query = "update items set 
biblioitemnumber=?,barcode=?,itemnotes=?,homebranch=?,
!                                                       
itemlost=?,wthdrawn=?,itemcallnumber=?,notforloan=?,
!                                                       
location=?,multivolumepart=?,multivolume=?,stack=?,wthdrawn=?";
          @bind = (
              $item->{'bibitemnum'},     $item->{'barcode'},
***************
*** 1863,1867 ****
              $item->{'lost'},           $item->{'wthdrawn'},
              $item->{'itemcallnumber'}, $item->{'notforloan'},
!             $item->{'location'},              $item->{'itemnum'}
          );
                if ($item->{homebranch}) {
--- 1872,1878 ----
              $item->{'lost'},           $item->{'wthdrawn'},
              $item->{'itemcallnumber'}, $item->{'notforloan'},
!             $item->{'location'},              $item->{multivolumepart},
!                       $item->{multivolume},           $item->{stack},
!                       $item->{wthdrawn},
          );
                if ($item->{homebranch}) {
***************
*** 1873,1879 ****
                        push @bind, $item->{holdingbranch};
                }
-               $query.=" where itemnumber=?";
      }
!     if ( $item->{'replacement'} ne '' ) {
          $query =~ s/ where/,replacementprice='$item->{'replacement'}' where/;
      }
--- 1884,1891 ----
                        push @bind, $item->{holdingbranch};
                }
      }
!       $query.=" where itemnumber=?";
!       push @bind,$item->{'itemnum'};
!    if ( $item->{'replacement'} ne '' ) {
          $query =~ s/ where/,replacementprice='$item->{'replacement'}' where/;
      }
***************
*** 2726,2729 ****
--- 2738,2745 ----
  # $Id$
  # $Log$
+ # Revision 1.115.2.18  2005/08/02 07:45:44  tipaul
+ # fix for bug http://bugs.koha.org/cgi-bin/bugzilla/show_bug.cgi?id=1009
+ # (Not all items fields mapped to MARC)
+ #
  # Revision 1.115.2.17  2005/08/01 15:15:43  tipaul
  # adding decoder for Ä string




reply via email to

[Prev in Thread] Current Thread [Next in Thread]