getting peroidical info displaying in current reserves

This commit is contained in:
chris 2000-01-20 01:46:48 +00:00
parent ab90106c38
commit ea7bcf8891
2 changed files with 18 additions and 2 deletions

View file

@ -15,7 +15,7 @@ use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
$VERSION = 0.01;
@ISA = qw(Exporter);
@EXPORT = qw(&FindReserves &CreateReserve &updatereserves);
@EXPORT = qw(&FindReserves &CreateReserve &updatereserves &getreservetitle);
%EXPORT_TAGS = ( ); # eg: TAG => [ qw!name1 name2! ],
# your exported package globals go here,
@ -245,6 +245,21 @@ sub updatereserves{
$dbh->disconnect;
}
sub getreservetitle {
my ($biblio,$bor,$date)=@_;
my $dbh=C4Connect;
my $query="Select * from reserveconstraints,biblioitems where
reserveconstraints.biblioitemnumber=biblioitems.biblioitemnumber
and reserveconstraints.biblionumber=$biblio and reserveconstraints.borrowernumber
= $bor and reserveconstraints.reservedate='$date'";
my $sth=$dbh->prepare($query);
$sth->execute;
my $data=$sth->fetchrow_hashref;
$sth->finish;
$dbh->disconnect;
# print $query;
return($data);
}

View file

@ -151,7 +151,8 @@ my $type=$reserves->[$i]{'constrainttype'};
if ($type eq 'a'){
$type='Next Available';
} elsif ($type eq 'o'){
$type="This type only $reserves->[$i]{'biblioitemnumber'}";
my $res=getreservetitle($reserves->[$i]{'biblionumber'},$reserves->[$i]{'borrowernumber'},$reserves->[$i]{'reservedate'});
$type="This type only $res->{'volumeddesc'} $res->{'itemtype'}";
# my @data=ItemInfo(\$blah,$reserves->[$i]{'borrowernumber'});
}