[open-ils-commits] ***SPAM*** [GIT] Evergreen ILS branch master updated. 60ee958d1ea29a2f5ad4fba40936ef022164c36c

Evergreen Git git at git.evergreen-ils.org
Mon Feb 17 15:53:13 EST 2014


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Evergreen ILS".

The branch, master has been updated
       via  60ee958d1ea29a2f5ad4fba40936ef022164c36c (commit)
      from  ddbf7fc70d05d08c1fdceade812f9a26bc33d91a (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 60ee958d1ea29a2f5ad4fba40936ef022164c36c
Author: Jeff Godin <jgodin at tadl.org>
Date:   Fri May 31 22:47:49 2013 -0400

    LP#1187034 Remove obsolete collections code
    
    Remove obsolete collections code
    
    Specifically:
    
    open-ils.collections.users_owing_money.retrieve
    open-ils.storage.money.collections.users_owing_money
    
    Signed-off-by: Jeff Godin <jgodin at tadl.org>
    Signed-off-by: Bill Erickson <berick at esilibrary.com>

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Collections.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Collections.pm
index 8d61327..750468c 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Collections.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Collections.pm
@@ -307,81 +307,6 @@ sub process_users_of_interest_results {
 
 
 __PACKAGE__->register_method(
-    method    => 'users_owing_money',
-    api_name  => 'open-ils.collections.users_owing_money.retrieve',
-    api_level => 1,
-    argc      => 5,
-    stream    => 1,
-    signature => {
-        desc     => q/
-            Returns an array of users that owe money during
-            the given time frame at the location (or child locations)
-            provided/,
-
-        params   => [
-            {    name => 'auth',
-                desc => 'The authentication token',
-                type => 'string' },
-
-            {    name => 'start_date',
-                desc => 'The start of the time interval to check',
-                type => q/string (ISO 8601 timestamp.  E.g. 2006-06-24, 1994-11-05T08:15:30-05:00 /,
-            },
-
-            {    name => 'end_date',
-                desc => q/Then end date of the time interval to check/,
-                type => q/string (ISO 8601 timestamp.  E.g. 2006-06-24, 1994-11-05T08:15:30-05:00 /,
-            },
-            {    name => 'fine_level',
-                desc => q/The fine threshold at which users will be included in the search results /,
-                type => q/number/,
-            },
-            {    name => 'locations',
-                desc => q/  A list of one or more org-unit short names.
-                            If a selected location has 'child' locations (e.g. a library region), the
-                            child locations will be included in the search/,
-                type => q'string',
-            },
-        ],
-          'return' => {
-            desc        => q/An array of user information objects/,
-            type        => 'array',
-        }
-    }
-);
-
-
-sub users_owing_money {
-    my( $self, $conn, $auth, $start_date, $end_date, $fine_level, @locations ) = @_;
-
-    return OpenILS::Event->new('BAD_PARAMS')
-        unless ($auth and $start_date and $end_date and @locations);
-
-    my $e = new_editor(authtoken => $auth);
-    return $e->event unless $e->checkauth;
-
-    # they need global perms to view users so no org is provided
-    return $e->event unless $e->allowed('VIEW_USER');
-
-    my $data = [];
-
-    my $ses = OpenSRF::AppSession->create('open-ils.storage');
-
-    my $start = time;
-    my $req = $ses->request(
-        'open-ils.storage.money.collections.users_owing_money',
-        $start_date, $end_date, $fine_level, @locations);
-
-    # let the client know we're still here
-    $conn->status( new OpenSRF::DomainObject::oilsContinueStatus );
-
-    return process_users_of_interest_results(
-        $self, $conn, $e, $req, $start, $start_date, $end_date, $fine_level, @locations);
-}
-
-
-
-__PACKAGE__->register_method(
     method    => 'users_with_activity',
     api_name  => 'open-ils.collections.users_with_activity.retrieve',
     api_level => 1,
diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Publisher/money.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Publisher/money.pm
index 877ffd7..6b314bd 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Publisher/money.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Publisher/money.pm
@@ -123,7 +123,6 @@ sub new_collections {
     my $circ = action::circulation->table;
     my $mg = money::grocery->table;
     my $res = booking::reservation->table;
-    my $descendants = "actor.org_unit_descendants((select id from actor.org_unit where shortname = ?))";
 
     my $SQL = <<"    SQL";
 
@@ -221,100 +220,6 @@ __PACKAGE__->register_method(
     argc        => 3,
 );
 
-sub users_owing_money {
-    my $self = shift;
-    my $client = shift;
-    my $start = shift;
-    my $end = shift;
-    my $amount = shift;
-    my @loc = @_;
-
-    my $mct = money::collections_tracker->table;
-    my $mb = money::billing->table;
-    my $circ = action::circulation->table;
-    my $mg = money::grocery->table;
-    my $descendants = "actor.org_unit_descendants((select id from actor.org_unit where shortname = ?))";
-
-    my $SQL = <<"    SQL";
-
-select
-        usr,
-        SUM(total_billing) - SUM(COALESCE(p.amount,0)) as threshold_amount
-  from  (select
-                x.id,
-                x.usr,
-                SUM(b.amount) AS total_billing
-          from  action.circulation x
-                join money.billing b on (b.xact = x.id)
-          where x.xact_finish is null
-                and x.circ_lib in (XX)
-                and b.billing_ts between ? and ?
-                and not b.voided
-          group by 1,2
-
-                  union all
-
-         select
-                x.id,
-                x.usr,
-                SUM(b.amount) AS total_billing
-          from  money.grocery x
-                join money.billing b on (b.xact = x.id)
-          where x.xact_finish is null
-                and x.billing_location in (XX)
-                and b.billing_ts between ? and ?
-                and not b.voided
-          group by 1,2
-
-                  union all
-
-         select
-                x.id,
-                x.usr,
-                SUM(b.amount) AS total_billing
-          from  booking.reservation x
-                join money.billing b on (b.xact = x.id)
-          where x.xact_finish is null
-                and x.pickup_lib in (XX)
-                and b.billing_ts between ? and ?
-                and not b.voided
-          group by 1,2
-        ) full_list
-        left join money.payment p on (full_list.id = p.xact)
-  group by 1
-  having SUM(total_billing) - SUM(COALESCE(p.amount,0)) > ?
-;
-    SQL
-
-    my @l_ids;
-    for my $l (@loc) {
-        my ($org) = actor::org_unit->search( shortname => uc($l) );
-        next unless $org;
-
-        my $o_list = actor::org_unit->db_Main->selectcol_arrayref( "SELECT id FROM actor.org_unit_descendants(?);", {}, $org->id );
-        next unless (@$o_list);
-
-        my $o_txt = join ',' => @$o_list;
-
-        (my $real_sql = $SQL) =~ s/XX/$o_txt/gsm;
-
-        my $sth = money::collections_tracker->db_Main->prepare($real_sql);
-        $sth->execute( $start, $end, $start, $end, $amount );
-
-        while (my $row = $sth->fetchrow_hashref) {
-            #$row->{usr} = actor::user->retrieve($row->{usr})->to_fieldmapper;
-            $client->respond( $row );
-        }
-    }
-    return undef;
-}
-__PACKAGE__->register_method(
-    method      => 'users_owing_money',
-    api_name    => 'open-ils.storage.money.collections.users_owing_money',
-    stream      => 1,
-    argc        => 4,
-);
-
 sub active_in_collections {
     my $self = shift;
     my $client = shift;

-----------------------------------------------------------------------

Summary of changes:
 .../lib/OpenILS/Application/Collections.pm         |   75 ---------------
 .../OpenILS/Application/Storage/Publisher/money.pm |   95 --------------------
 2 files changed, 0 insertions(+), 170 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list