[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Koha-cvs] CVS: koha/C4 Reserves2.pm,1.16,1.17
From: |
Finlay Thompson |
Subject: |
[Koha-cvs] CVS: koha/C4 Reserves2.pm,1.16,1.17 |
Date: |
Mon, 26 Aug 2002 15:34:31 -0700 |
Update of /cvsroot/koha/koha/C4
In directory usw-pr-cvs1:/tmp/cvs-serv18350/C4
Modified Files:
Reserves2.pm
Log Message:
rewrote CheckReserves so that it can be called with a barcode as well as on
itemnumber.
Index: Reserves2.pm
===================================================================
RCS file: /cvsroot/koha/koha/C4/Reserves2.pm,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -r1.16 -r1.17
*** Reserves2.pm 21 Aug 2002 01:31:16 -0000 1.16
--- Reserves2.pm 26 Aug 2002 22:34:29 -0000 1.17
***************
*** 98,111 ****
sub CheckReserves {
! my ($item) = @_;
! warn "In CheckReserves: itemnumber = $item";
my $dbh=C4Connect;
! 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;
--- 98,122 ----
sub CheckReserves {
! my ($item, $barcode) = @_;
! # warn "In CheckReserves: itemnumber = $item";
my $dbh=C4Connect;
! my $sth;
! if ($item) {
! my $qitem=$dbh->quote($item);
# get the biblionumber...
! $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");
+ } else {
+ my $qbc=$dbh->quote($barcode);
+ # get the biblionumber...
+ $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 barcode=$qbc");
+ }
$sth->execute;
my ($biblio, $bibitem, $notforloan) = $sth->fetchrow_array;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Koha-cvs] CVS: koha/C4 Reserves2.pm,1.16,1.17,
Finlay Thompson <=