@@ -, +, @@ ( for simplicity, have those items be the only one on each record, respectively ) --- C4/Search.pm | 9 +++++++-- 1 files changed, 7 insertions(+), 2 deletions(-) --- a/C4/Search.pm +++ a/C4/Search.pm @@ -1476,8 +1476,13 @@ sub buildQuery { ## 'available' is defined as (items.onloan is NULL) and (items.itemlost = 0) ## In English: ## all records not indexed in the onloan register (zebra) and all records with a value of lost equal to 0 - $availability_limit .= -"( ( allrecords,AlwaysMatches='' not onloan,AlwaysMatches='') and (lost,st-numeric=0) )"; #or ( allrecords,AlwaysMatches='' not lost,AlwaysMatches='')) )"; + $availability_limit .= " + ( + ( allrecords,AlwaysMatches='' not onloan,AlwaysMatches='') + and (lost,st-numeric=0) + and (damaged,st-numeric=0) + and (withdrawn,st-numeric=0) + )"; $limit_cgi .= "&limit=available"; $limit_desc .= ""; } --