fix for #1114 : Marking item lost doesn't hide it in OPAC when hidelostitems is set

This commit is contained in:
tipaul 2006-08-03 10:24:09 +00:00
parent 3438412bfc
commit 973cd339e0
2 changed files with 5 additions and 7 deletions

View File

@ -1306,12 +1306,10 @@ sub ItemInfo {
WHERE items.biblionumber = ?
AND biblioitems.biblioitemnumber = items.biblioitemnumber
AND biblio.biblionumber = items.biblionumber";
# buggy : opac & librarian interface can show the same info level & itemstatus should not be hardcoded
# if ($type ne 'intra'){
# $query .= " and ((items.itemlost<>1 and items.itemlost <> 2)
# or items.itemlost is NULL)
# and (wthdrawn <> 1 or wthdrawn is NULL)";
# }
if ($type ne 'intra' && C4::Context->preference('hidelostitems')) {
$query .= " and (items.itemlost<1 or items.itemlost is NULL)
and (wthdrawn <> 1 or wthdrawn is NULL)";
}
$query .= " order by items.homebranch, items.dateaccessioned desc";
my $sth=$dbh->prepare($query);
$sth->execute($biblionumber);

View File

@ -396,7 +396,7 @@ if (C4::Context->preference("sortbynonfiling")) {
$sth_itemCN = $dbh->prepare("
SELECT items.holdingbranch, items.location, items.itemcallnumber, count(*) AS cnt, items.itemnumber, items.notforloan
FROM items
WHERE biblionumber=? AND (itemlost = 0 OR itemlost IS NULL) AND (notforloan < 1 OR notforloan IS NULL)
WHERE biblionumber=? AND (itemlost = 0 OR itemlost IS NULL)
GROUP BY items.holdingbranch, items.location, items.itemcallnumber
ORDER BY homebranch");
} else {