From 68343ccb26cbbca35b7a9cc1d7cd979d066ecff8 Mon Sep 17 00:00:00 2001 From: erickson Date: Wed, 9 Jan 2008 15:34:36 +0000 Subject: [PATCH] fixed some syntax errors. repaired descendent org fetching git-svn-id: svn://svn.open-ils.org/ILS/branches/acq-experiment@8364 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/src/perlmods/OpenILS/Application/Acq.pm | 5 +---- .../perlmods/OpenILS/Application/Acq/Financials.pm | 19 +++++++++++-------- .../src/perlmods/OpenILS/Application/Acq/Picklist.pm | 1 + 3 files changed, 13 insertions(+), 12 deletions(-) diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Acq.pm b/Open-ILS/src/perlmods/OpenILS/Application/Acq.pm index aecdba8a85..2048e16ff7 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Acq.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Acq.pm @@ -3,12 +3,9 @@ use base qw/OpenILS::Application/; 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; diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Acq/Financials.pm b/Open-ILS/src/perlmods/OpenILS/Application/Acq/Financials.pm index 68f5f868ca..8103f3eb4f 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Acq/Financials.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Acq/Financials.pm @@ -8,6 +8,8 @@ use OpenILS::Utils::CStoreEditor q/:funcs/; 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 @@ __PACKAGE__->register_method( / ); -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 @@ sub retrieve_org_fund { 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 @@ sub retrieve_org_fund { } - +1; diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Acq/Picklist.pm b/Open-ILS/src/perlmods/OpenILS/Application/Acq/Picklist.pm index dbdec82cdd..11cef02c6d 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Acq/Picklist.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Acq/Picklist.pm @@ -176,3 +176,4 @@ sub create_picklist_entry { } +1; -- 2.11.0