fixed up the CheckReserves.pm routine so that it does not put Referece items into "waiting" status if there is a reserve. Also fixed a bug in detail.pl.
This commit is contained in:
parent
b7a18e8035
commit
7eab6cbfda
2 changed files with 11 additions and 3 deletions
|
@ -102,11 +102,18 @@ sub CheckReserves {
|
|||
my $dbh=C4Connect;
|
||||
my $qitem=$dbh->quote($item);
|
||||
# get the biblionumber...
|
||||
my $sth=$dbh->prepare("select biblionumber, biblioitemnumber from items where itemnumber=$qitem");
|
||||
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) = $sth->fetchrow_array;
|
||||
my ($biblio, $bibitem, $notforloan) = $sth->fetchrow_array;
|
||||
$sth->finish;
|
||||
$dbh->disconnect;
|
||||
# if item is not for loan it cannot be reserved either.....
|
||||
warn "Not for loan: $notforloan";
|
||||
return (0, 0) if ($notforloan);
|
||||
# get the reserves...
|
||||
my ($count, @reserves) = Findgroupreserve($bibitem, $biblio);
|
||||
my $priority = 10000000;
|
||||
|
|
|
@ -59,6 +59,7 @@ foreach my $itm (@items) {
|
|||
$norequests = 0 unless $itm->{'notforloan'};
|
||||
}
|
||||
|
||||
|
||||
warn "Biblionumber: $biblionumber";
|
||||
warn "Norequests: $norequests";
|
||||
|
||||
|
@ -69,6 +70,7 @@ my ($webbiblioitemcount, @webbiblioitems) = &getwebbiblioitems($biblionumber);
|
|||
my ($websitecount, @websites) = &getwebsites($biblionumber);
|
||||
|
||||
$dat->{'count'}=@items;
|
||||
$dat->{'norequests'} = $norequests;
|
||||
|
||||
$dat->{'additional'}=$addauthor->[0]->{'author'};
|
||||
for (my $i = 1; $i < $authorcount; $i++) {
|
||||
|
@ -110,7 +112,6 @@ $template->param(prevstartfrom => $prevstartfrom);
|
|||
$template->param(includesdir => $includes);
|
||||
$template->param(BIBLIO_RESULTS => $resultsarray);
|
||||
$template->param(ITEM_RESULTS => $itemsarray);
|
||||
$template->param(norequests => $norequests);
|
||||
$template->param(WEB_RESULTS => $webarray);
|
||||
$template->param(SITE_RESULTS => $sitearray);
|
||||
print "Content-Type: text/html\n\n", $template->output;
|
||||
|
|
Loading…
Reference in a new issue