[open-ils-commits] r8364 - in branches/acq-experiment/Open-ILS/src/perlmods/OpenILS/Application: . Acq

svn at svn.open-ils.org svn at svn.open-ils.org
Wed Jan 9 10:59:10 EST 2008


Author: erickson
Date: 2008-01-09 10:34:36 -0500 (Wed, 09 Jan 2008)
New Revision: 8364

Modified:
   branches/acq-experiment/Open-ILS/src/perlmods/OpenILS/Application/Acq.pm
   branches/acq-experiment/Open-ILS/src/perlmods/OpenILS/Application/Acq/Financials.pm
   branches/acq-experiment/Open-ILS/src/perlmods/OpenILS/Application/Acq/Picklist.pm
Log:
fixed some syntax errors.  repaired descendent org fetching

Modified: branches/acq-experiment/Open-ILS/src/perlmods/OpenILS/Application/Acq/Financials.pm
===================================================================
--- branches/acq-experiment/Open-ILS/src/perlmods/OpenILS/Application/Acq/Financials.pm	2008-01-09 15:03:26 UTC (rev 8363)
+++ branches/acq-experiment/Open-ILS/src/perlmods/OpenILS/Application/Acq/Financials.pm	2008-01-09 15:34:36 UTC (rev 8364)
@@ -8,6 +8,8 @@
 use OpenILS::Const qw/:const/;
 use OpenSRF::Utils::SettingsClient;
 use OpenILS::Event;
+use OpenILS::Application::AppUtils;
+my $U = 'OpenILS::Application::AppUtils';
 
 my $BAD_PARAMS = OpenILS::Event->new('BAD_PARAMS');
 
@@ -63,7 +65,7 @@
 	/
 );
 
-sub retrieve_org_fund {
+sub retrieve_org_funds {
     my($self, $conn, $auth, $org_id, $options) = @_;
     my $e = new_editor(authtoken=>$auth);
     return $e->event unless $e->checkauth;
@@ -72,12 +74,13 @@
     my $search = {owner => $org_id};
 
     if($$options{children}) {
-        $org_list = $e->search_actor_org_unit([
-            {id => $org_id}, {
-                flesh => -1,
-                flesh_fields => {aou => ['children']}
-            }
-        ]);
+        # grab the descendent orgs
+        my $org = $e->retrieve_actor_org_unit(
+            [$org_id, {flesh=>1, flesh_fields=>{aou=>['ou_type']}}]) or return $e->event;
+        my $org_list = $U->simplereq(
+            'open-ils.storage',
+            'open-ils.storage.actor.org_unit.descendants.atomic',
+            $org_id, $org->ou_type->depth);
 
         my $org_ids = [];
         push(@$org_ids, $_->id) for @$org_list;
@@ -89,4 +92,4 @@
 }
 
 
-
+1;

Modified: branches/acq-experiment/Open-ILS/src/perlmods/OpenILS/Application/Acq/Picklist.pm
===================================================================
--- branches/acq-experiment/Open-ILS/src/perlmods/OpenILS/Application/Acq/Picklist.pm	2008-01-09 15:03:26 UTC (rev 8363)
+++ branches/acq-experiment/Open-ILS/src/perlmods/OpenILS/Application/Acq/Picklist.pm	2008-01-09 15:34:36 UTC (rev 8364)
@@ -176,3 +176,4 @@
 }
 
 
+1;

Modified: branches/acq-experiment/Open-ILS/src/perlmods/OpenILS/Application/Acq.pm
===================================================================
--- branches/acq-experiment/Open-ILS/src/perlmods/OpenILS/Application/Acq.pm	2008-01-09 15:03:26 UTC (rev 8363)
+++ branches/acq-experiment/Open-ILS/src/perlmods/OpenILS/Application/Acq.pm	2008-01-09 15:34:36 UTC (rev 8364)
@@ -3,12 +3,9 @@
 use strict; use warnings;
 
 use OpenSRF::Utils::Logger qw(:logger);
-use OpenILS::Utils::Fieldmapper;
 use OpenILS::Utils::CStoreEditor q/:funcs/;
-use OpenILS::Const qw/:const/;
-use OpenSRF::Utils::SettingsClient;
-use OpenILS::Event;
 
 use OpenILS::Application::Acq::Picklist;
 use OpenILS::Application::Acq::Financials;
 
+1;



More information about the open-ils-commits mailing list