From: erickson Date: Fri, 4 Aug 2006 03:05:44 +0000 (+0000) Subject: added single copy location fetcher X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=46baad30a371cf54a8969787af55bd9364a8e28b;p=Evergreen.git added single copy location fetcher git-svn-id: svn://svn.open-ils.org/ILS/trunk@5267 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Circ/CopyLocations.pm b/Open-ILS/src/perlmods/OpenILS/Application/Circ/CopyLocations.pm index 11e4f58482..600fe0762d 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Circ/CopyLocations.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Circ/CopyLocations.pm @@ -7,6 +7,7 @@ use OpenSRF::EX qw(:try); use OpenSRF::Utils::Logger qw(:logger); use OpenILS::Application::AppUtils; use OpenILS::Utils::Fieldmapper; +use OpenILS::Utils::CStoreEditor qw/:funcs/; my $U = "OpenILS::Application::AppUtils"; @@ -16,7 +17,7 @@ __PACKAGE__->register_method( argc => 1, signature => q/ Retrieves the ranged set of copy locations for the requested org. - If no org is provided, the home org of the requestor is used. + If no org is provided, all copy locations are returned @param authtoken The login session key @param orgId The org location id @return An array of copy location objects @@ -133,5 +134,20 @@ sub cl_update { } +__PACKAGE__->register_method( + method => 'fetch_loc', + api_name => 'open-ils.circ.copy_location.retrieve', +); + +sub fetch_loc { + my( $self, $con, $id ) = @_; + my $e = new_editor(); + my $cl = $e->retrieve_asset_copy_location($id) + or return $e->event; + return $cl; +} + + + -666; +23;