excluding deleted volumes
authormiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 26 Jun 2007 17:18:30 +0000 (17:18 +0000)
committermiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 26 Jun 2007 17:18:30 +0000 (17:18 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/branches/rel_1_0_6@7474 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/asset.pm

index 80576d7..b5c6dc6 100644 (file)
@@ -229,8 +229,8 @@ sub cn_browse_pagedown {
                from
                        $table cn
                where
-                       (upper(label) > ?
-                       or ( cn.id > ? and upper(label) = ? ))
+                       not deleted
+                       and (upper(label) > ? or ( cn.id > ? and upper(label) = ? ))
                        and owning_lib in ($orgs)
                order by upper(label), 4, 2
                limit $size;
@@ -284,8 +284,8 @@ sub cn_browse_pageup {
                        from
                                $table cn
                        where
-                               (upper(label) < ?
-                               or ( cn.id < ? and upper(label) = ? ))
+                               not deleted
+                               and (upper(label) < ? or ( cn.id < ? and upper(label) = ? ))
                                and owning_lib in ($orgs)
                        order by upper(label) desc, 4 desc, 2 desc
                        limit $size
@@ -342,7 +342,8 @@ sub cn_browse_target {
                        from
                                $table cn
                        where
-                               upper(label) < ?
+                               not deleted
+                               and upper(label) < ?
                                and owning_lib in ($orgs)
                        order by upper(label) desc, 4 desc, 2 desc
                        limit $topsize
@@ -359,7 +360,8 @@ sub cn_browse_target {
                from
                        $table cn
                where
-                       upper(label) >= ?
+                       not deleted
+                       and upper(label) >= ?
                        and owning_lib in ($orgs)
                order by upper(label),4,2
                limit $bottomsize;