moved to storage copy circ count
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 21 Jun 2006 17:52:39 +0000 (17:52 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 21 Jun 2006 17:52:39 +0000 (17:52 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@4694 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/perlmods/OpenILS/Application/Circ.pm

index 03d1e88..77f4674 100644 (file)
@@ -478,8 +478,6 @@ __PACKAGE__->register_method(
        /);
 
 
-# XXX ?? move to request open-ils.storage 
-# open-ils.storage.asset.copy.circ_count 7999959, null/"year"/"month"/"day" 
 
 sub view_circs {
        my( $self, $client, $authtoken, $copyid, $count ) = @_; 
@@ -494,18 +492,12 @@ sub view_circs {
                'open-ils.storage.direct.action.circulation.search_where.atomic',
                        { 
                                target_copy => $copyid, 
-#                              opac_renewal => 'f',   
-#                              desk_renewal => 'f',
-#                              phone_renewal => 'f',
                        }, 
                        { 
                                limit => $count, 
                                order_by => "xact_start DESC" 
-                       } );
-
-#      my @users;
-#      push(@users, $_->usr) for @$circs;
-#      return \@users;
+                       } 
+       );
 
        return $circs;
 }
@@ -520,10 +512,9 @@ __PACKAGE__->register_method(
        /);
 
 sub circ_count {
-       my( $self, $client, $copyid ) = @_; 
+       my( $self, $client, $copyid, $range ) = @_; 
        my $e = OpenILS::Utils::Editor->new;
-       my $circs = $e->search_action_circulation({target_copy => $copyid}, {idlist=>1});
-       return scalar @$circs;
+       return $e->request('open-ils.storage.asset.copy.circ_count', $copyid, $range);
 }