getting peroidical info displaying in current reserves
This commit is contained in:
parent
ab90106c38
commit
ea7bcf8891
2 changed files with 18 additions and 2 deletions
|
@ -15,7 +15,7 @@ use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
|
||||||
$VERSION = 0.01;
|
$VERSION = 0.01;
|
||||||
|
|
||||||
@ISA = qw(Exporter);
|
@ISA = qw(Exporter);
|
||||||
@EXPORT = qw(&FindReserves &CreateReserve &updatereserves);
|
@EXPORT = qw(&FindReserves &CreateReserve &updatereserves &getreservetitle);
|
||||||
%EXPORT_TAGS = ( ); # eg: TAG => [ qw!name1 name2! ],
|
%EXPORT_TAGS = ( ); # eg: TAG => [ qw!name1 name2! ],
|
||||||
|
|
||||||
# your exported package globals go here,
|
# your exported package globals go here,
|
||||||
|
@ -245,6 +245,21 @@ sub updatereserves{
|
||||||
$dbh->disconnect;
|
$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);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -151,7 +151,8 @@ my $type=$reserves->[$i]{'constrainttype'};
|
||||||
if ($type eq 'a'){
|
if ($type eq 'a'){
|
||||||
$type='Next Available';
|
$type='Next Available';
|
||||||
} elsif ($type eq 'o'){
|
} 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'});
|
# my @data=ItemInfo(\$blah,$reserves->[$i]{'borrowernumber'});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue