[Koha-cvs] CVS: koha/C4 Reserves2.pm,1.16,1.17
Finlay Thompson
finlayt at users.sourceforge.net
Tue Aug 27 00:34:31 CEST 2002
- Previous message: [Koha-cvs] CVS: koha admin-home.pl,1.1.2.1,1.1.2.2 catalogue-home.pl,1.1.2.1,1.1.2.2 groups.pl,1.1,1.1.2.1 members-home.pl,1.1.2.2,1.1.2.3 reports-home.pl,1.1.2.1,1.1.2.2
- Next message: [Koha-cvs] CVS: koha/admin branches.pl,1.1.2.5,1.1.2.6
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
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;
- Previous message: [Koha-cvs] CVS: koha admin-home.pl,1.1.2.1,1.1.2.2 catalogue-home.pl,1.1.2.1,1.1.2.2 groups.pl,1.1,1.1.2.1 members-home.pl,1.1.2.2,1.1.2.3 reports-home.pl,1.1.2.1,1.1.2.2
- Next message: [Koha-cvs] CVS: koha/admin branches.pl,1.1.2.5,1.1.2.6
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Koha-cvs
mailing list