From 70d465be6a43b45807b769725b48d5654c606e71 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 Signed-off-by: Josef Moravec Signed-off-by: Martin Renvoize Signed-off-by: Nick Clemens (cherry picked from commit b6be4024196c9e62363eabf0d2ad0b9f9141d15c) Signed-off-by: Martin Renvoize --- 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 a36d3c62e1..2ba300d9c7 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.39.5