$visible
AND cn.deleted IS FALSE
AND cp.deleted IS FALSE
- AND cp.status = 0)
+ AND cp.status IN (0,7))
) AS available,
sum(
(SELECT count(cp.id)
JOIN $cs_table cs ON (cs.id = cp.status)
JOIN $cl_table cl ON (cl.id = cp.location)
WHERE cn.record = ?
- AND cp.status = 0
+ AND cp.status IN (0,7)
$copies_visible
GROUP BY 1
UNION
JOIN $cl_table cl ON (cp.location = cl.id)
JOIN $descendants a ON (cp.circ_lib = a.id)
WHERE r.metarecord = ?
- AND cp.status = 0
+ AND cp.status IN (0,7)
AND cn.deleted IS FALSE
AND cp.deleted IS FALSE
$copies_visible