From a3caf67de361ec0dc33c4d8984daee32d8ba85fd Mon Sep 17 00:00:00 2001 From: Matthias Meusburger Date: Wed, 17 Jan 2018 11:49:14 +0100 Subject: [PATCH] Bug 19661 - Use Koha::Acquisition::Funds instead of C4::Budgets --- Koha/REST/V1/Acquisitions/Funds.pm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Koha/REST/V1/Acquisitions/Funds.pm b/Koha/REST/V1/Acquisitions/Funds.pm index a36d3c6..2ba300d 100644 --- a/Koha/REST/V1/Acquisitions/Funds.pm +++ b/Koha/REST/V1/Acquisitions/Funds.pm @@ -19,7 +19,7 @@ use Modern::Perl; use Mojo::Base 'Mojolicious::Controller'; -use C4::Budgets; +use Koha::Acquisition::Funds; use JSON qw(to_json); use Try::Tiny; @@ -50,10 +50,10 @@ sub list_funds { } return try { - my $funds = GetBudgets($filter); - my @fundsArray = map { _to_api($_) } @$funds; + my @funds = Koha::Acquisition::Funds->search($filter); + @funds = map { _to_api($_->TO_JSON) } @funds; return $c->render( status => 200, - openapi => \@fundsArray); + openapi => \@funds); } catch { if ( $_->isa('DBIx::Class::Exception') ) { -- 2.7.4