[Koha-cvs] CVS: koha/C4 Reserves2.pm,1.14,1.15

Finlay Thompson finlayt at users.sourceforge.net
Mon Aug 19 08:29:38 CEST 2002


Update of /cvsroot/koha/koha/C4
In directory usw-pr-cvs1:/tmp/cvs-serv30794/C4

Modified Files:
	Reserves2.pm 
Log Message:

fixed up the CheckReserves.pm routine so that it does not put Referece items into "waiting" status if there is a reserve. Also fixed a bug in detail.pl.


Index: Reserves2.pm
===================================================================
RCS file: /cvsroot/koha/koha/C4/Reserves2.pm,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -r1.14 -r1.15
*** Reserves2.pm	15 Aug 2002 03:31:02 -0000	1.14
--- Reserves2.pm	19 Aug 2002 06:29:36 -0000	1.15
***************
*** 103,111 ****
      my $qitem=$dbh->quote($item);
  # get the biblionumber...
!     my $sth=$dbh->prepare("select biblionumber, biblioitemnumber from items where itemnumber=$qitem");
      $sth->execute;
!     my ($biblio, $bibitem) = $sth->fetchrow_array;
      $sth->finish;
      $dbh->disconnect;
  # get the reserves...
      my ($count, @reserves) = Findgroupreserve($bibitem, $biblio);
--- 103,118 ----
      my $qitem=$dbh->quote($item);
  # get the biblionumber...
!     my $sth=$dbh->prepare("SELECT items.biblionumber, items.biblioitemnumber, itemtypes.notforloan
!                              FROM items, biblioitems, itemtypes 
!                             WHERE items.biblioitemnumber = biblioitems.biblioitemnumber
!                               AND biblioitems.itemtype = itemtypes.itemtype
!                               AND itemnumber=$qitem");
      $sth->execute;
!     my ($biblio, $bibitem, $notforloan) = $sth->fetchrow_array;
      $sth->finish;
      $dbh->disconnect;
+ # if item is not for loan it cannot be reserved either.....
+ warn "Not for loan: $notforloan";
+     return (0, 0) if ($notforloan);
  # get the reserves...
      my ($count, @reserves) = Findgroupreserve($bibitem, $biblio);





More information about the Koha-cvs mailing list