From: erickson Date: Tue, 22 Jan 2008 16:23:59 +0000 (+0000) Subject: added currency_type retrieval method X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=39b9bcfd558e08e950f00bde02a18ff58e52181a;p=Evergreen.git added currency_type retrieval method git-svn-id: svn://svn.open-ils.org/ILS/branches/acq-experiment@8454 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Acq/Financials.pm b/Open-ILS/src/perlmods/OpenILS/Application/Acq/Financials.pm index 696777aa8c..320000c0c6 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Acq/Financials.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Acq/Financials.pm @@ -321,4 +321,25 @@ sub retrieve_budget_alloc { } +__PACKAGE__->register_method( + method => 'retrieve_all_currency_type', + api_name => 'open-ils.acq.currency_type.all.retrieve', + signature => { + desc => 'Retrieves all currency_type objects', + params => [ + {desc => 'Authentication token', type => 'string'}, + ], + return => {desc => 'List of currency_type objects', type => 'list'} + } +); + +sub retrieve_all_currency_type { + my($self, $conn, $auth, $budget_alloc_id) = @_; + my $e = new_editor(authtoken=>$auth); + return $e->event unless $e->checkauth; + return $e->event unless $e->allowed('GENERAL_ACQ'); + return $e->retrieve_all_acq_currency_type(); +} + + 1;