LP#1292129: Removed deleted call numbers from the search results to properly show...
authorSteven Callender <stevecallender@esilibrary.com>
Thu, 13 Mar 2014 17:34:23 +0000 (13:34 -0400)
committerBen Shum <bshum@biblio.org>
Thu, 18 Sep 2014 20:26:50 +0000 (16:26 -0400)
The SQL in fm_IDL.xml for setting up the reporter source "Hold/Copy
Ratio per Bib" includes deleted call numbers which in turn can give
an incorrect copy count. The ratio appears to still be correct because
deleted copies are considered in the ratio calculation, but not the
copy count that is displayed.

Signed-off-by: Steven Callender <stevecallender@esilibrary.com>
Signed-off-by: Ben Shum <bshum@biblio.org>

Open-ILS/examples/fm_IDL.xml

index 0e9f710..9bd3039 100644 (file)
@@ -10278,7 +10278,7 @@ SELECT  usr,
                         SELECT 
                             (SELECT id
                                 FROM biblio.record_entry 
-                                WHERE id = (SELECT record FROM asset.call_number WHERE id = call_number)
+                                WHERE id = (SELECT record FROM asset.call_number WHERE id = call_number and deleted is false)
                             ) AS "bre", 
                             COUNT(*) AS "copy_count"
                         FROM asset.copy