Fixing the subject search i broke ;)
This commit is contained in:
parent
132835283a
commit
b3375469e3
1 changed files with 22 additions and 5 deletions
27
C4/Search.pm
27
C4/Search.pm
|
@ -670,7 +670,7 @@ while (my $data=$sth->fetchrow_hashref){
|
||||||
my $dewey;
|
my $dewey;
|
||||||
my $subclass;
|
my $subclass;
|
||||||
my $true=0;
|
my $true=0;
|
||||||
if (($dewey, $subclass) = $sti->fetchrow){
|
if (($dewey, $subclass) = $sti->fetchrow || $type eq 'subject'){
|
||||||
$true=1;
|
$true=1;
|
||||||
}
|
}
|
||||||
$dewey=~s/\.*0*$//;
|
$dewey=~s/\.*0*$//;
|
||||||
|
@ -792,7 +792,20 @@ sub ItemInfo {
|
||||||
# print "$results[$i] <br>";
|
# print "$results[$i] <br>";
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
$sth->finish;
|
$sth->finish;
|
||||||
|
my $query2="Select * from aqorders where biblionumber=$biblionumber";
|
||||||
|
my $sth2=$dbh->prepare($query2);
|
||||||
|
$sth2->execute;
|
||||||
|
my $data;
|
||||||
|
my $ocount;
|
||||||
|
if ($data=$sth2->fetchrow_hashref){
|
||||||
|
$ocount=$data->{'quantity'} - $data->{'quantityreceived'};
|
||||||
|
if ($ocount > 0){
|
||||||
|
$results[$i]="$data->{'title'}\t$data->{'barcode'}\t$ocount\tOn Order\t\t$data->{'itemnumber'}\t$data->{'itemtype'}\t\t$data->{'biblioitemnumber'}\t$data->{'volumeddesc'}";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$sth2->finish;
|
||||||
|
|
||||||
$dbh->disconnect;
|
$dbh->disconnect;
|
||||||
return(@results);
|
return(@results);
|
||||||
}
|
}
|
||||||
|
@ -854,9 +867,13 @@ sub itemdata {
|
||||||
sub bibdata {
|
sub bibdata {
|
||||||
my ($bibnum,$type)=@_;
|
my ($bibnum,$type)=@_;
|
||||||
my $dbh=C4Connect;
|
my $dbh=C4Connect;
|
||||||
my $query="Select *,biblio.notes from biblio,biblioitems,bibliosubtitle where biblio.biblionumber=$bibnum
|
my $query="Select *,biblio.notes
|
||||||
and biblioitems.biblionumber=$bibnum and
|
from biblio,biblioitems
|
||||||
(bibliosubtitle.biblionumber=$bibnum)";
|
left join bibliosubtitle on
|
||||||
|
biblio.biblionumber=bibliosubtitle.biblionumber
|
||||||
|
|
||||||
|
where biblio.biblionumber=$bibnum
|
||||||
|
and biblioitems.biblionumber=$bibnum";
|
||||||
# print $query;
|
# print $query;
|
||||||
my $sth=$dbh->prepare($query);
|
my $sth=$dbh->prepare($query);
|
||||||
$sth->execute;
|
$sth->execute;
|
||||||
|
|
Loading…
Reference in a new issue