[Koha-cvs] CVS: koha/C4 Biblio.pm,1.60,1.61

Paul POULAIN tipaul at users.sourceforge.net
Wed Sep 17 12:24:41 CEST 2003


Update of /cvsroot/koha/koha/C4
In directory sc8-pr-cvs1:/tmp/cvs-serv14524/C4

Modified Files:
	Biblio.pm 
Log Message:
notforloan value in itemtype was overwritting notforloan value in a given item.
I changed this behaviour :
if notforloan is set for a given item, and NOT for all items from this itemtype, the notforloan is kept.
If notforloan is set for itemtype, it's used (and impossible to loan a specific item from this itemtype)

Index: Biblio.pm
===================================================================
RCS file: /cvsroot/koha/koha/C4/Biblio.pm,v
retrieving revision 1.60
retrieving revision 1.61
diff -C2 -r1.60 -r1.61
*** Biblio.pm	4 Sep 2003 14:11:23 -0000	1.60
--- Biblio.pm	17 Sep 2003 10:24:39 -0000	1.61
***************
*** 2,5 ****
--- 2,11 ----
  # $Id$
  # $Log$
+ # Revision 1.61  2003/09/17 10:24:39  tipaul
+ # notforloan value in itemtype was overwritting notforloan value in a given item.
+ # I changed this behaviour :
+ # if notforloan is set for a given item, and NOT for all items from this itemtype, the notforloan is kept.
+ # If notforloan is set for itemtype, it's used (and impossible to loan a specific item from this itemtype)
+ #
  # Revision 1.60  2003/09/04 14:11:23  tipaul
  # fix for 593 (data duplication in MARC-DB)
***************
*** 558,562 ****
  	my ($dbh,$record,$biblionumber,$bibid) = @_;
  	my @fields=$record->fields();
! 	warn "IN MARCaddbiblio $bibid => ".$record->as_formatted;
  # my $bibid;
  # adding main table, and retrieving bibid
--- 564,568 ----
  	my ($dbh,$record,$biblionumber,$bibid) = @_;
  	my @fields=$record->fields();
! # 	warn "IN MARCaddbiblio $bibid => ".$record->as_formatted;
  # my $bibid;
  # adding main table, and retrieving bibid
***************
*** 1711,1715 ****
                            where itemnumber=$item->{'itemnum'}";
    if ($item->{'barcode'} eq ''){
!     $query="update items set notforloan=$item->{'loan'} where itemnumber=$item->{'itemnum'}";
    }
    if ($item->{'lost'} ne ''){
--- 1717,1722 ----
                            where itemnumber=$item->{'itemnum'}";
    if ($item->{'barcode'} eq ''){
!   	$item->{'notforloan'}=0 unless $item->{'notforloan'};
!     $query="update items set notforloan=$item->{'notforloan'} where itemnumber=$item->{'itemnum'}";
    }
    if ($item->{'lost'} ne ''){
***************
*** 1726,1729 ****
--- 1733,1737 ----
    }
    my $sth=$dbh->prepare($query);
+   warn "$query";
    $sth->execute;
    $sth->finish;





More information about the Koha-cvs mailing list