From 59bef628b69ecea5edc8c0150fbddf9cf5cd5796 Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Mon, 7 Mar 2016 13:33:43 +0000 Subject: [PATCH] Bug 15084 [QA Followup] - Fix new uses of GetCurrency Signed-off-by: Kyle M Hall --- acqui/acqui-home.pl | 5 +++-- opac/opac-account-pay-paypal-return.pl | 6 +++--- opac/opac-account-pay.pl | 6 +++--- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/acqui/acqui-home.pl b/acqui/acqui-home.pl index 393a13152b..804e3ce062 100755 --- a/acqui/acqui-home.pl +++ b/acqui/acqui-home.pl @@ -38,6 +38,7 @@ use C4::Members; use C4::Branch; use C4::Debug; use C4::Suggestions; +use Koha::Acquisition::Currencies; my $query = CGI->new; my ( $template, $loggedinuser, $cookie, $userflags ) = get_template_and_user( @@ -129,10 +130,10 @@ $template->param( suggestions_count => $suggestions_count, ); -my $cur = GetCurrency(); +my $cur = Koha::Acquisition::Currencies->get_active; if ( $cur ) { $template->param( - currency => $cur->{currency}, + currency => $cur->currency, ); } diff --git a/opac/opac-account-pay-paypal-return.pl b/opac/opac-account-pay-paypal-return.pl index 4279263254..1823d2ffe6 100755 --- a/opac/opac-account-pay-paypal-return.pl +++ b/opac/opac-account-pay-paypal-return.pl @@ -30,7 +30,7 @@ use C4::Auth; use C4::Output; use C4::Accounts; use C4::Members; -use C4::Budgets qw(GetCurrency); +use Koha::Acquisition::Currencies; use Koha::Database; my $cgi = new CGI; @@ -50,7 +50,7 @@ my ( $template, $borrowernumber, $cookie ) = get_template_and_user( } ); -my $active_currency = GetCurrency(); +my $active_currency = Koha::Acquisition::Currencies->get_active; my $token = $cgi->param('token'); my $payer_id = $cgi->param('PayerID'); @@ -78,7 +78,7 @@ my $nvp_params = { 'PAYERID' => $payer_id, 'TOKEN' => $token, 'PAYMENTREQUEST_0_AMT' => $amount, - 'PAYMENTREQUEST_0_CURRENCYCODE' => $active_currency->{currency}, + 'PAYMENTREQUEST_0_CURRENCYCODE' => $active_currency->currency, }; my $response = $ua->request( POST $url, $nvp_params ); diff --git a/opac/opac-account-pay.pl b/opac/opac-account-pay.pl index e8664e48f4..8dfdfcdb12 100755 --- a/opac/opac-account-pay.pl +++ b/opac/opac-account-pay.pl @@ -30,7 +30,7 @@ use URI; use C4::Auth; use C4::Output; use C4::Context; -use C4::Budgets qw(GetCurrency); +use Koha::Acquisition::Currencies; use Koha::Database; my $cgi = new CGI; @@ -58,7 +58,7 @@ my $amount_to_pay = ->get_column('amountoutstanding')->sum(); $amount_to_pay = sprintf( "%.2f", $amount_to_pay ); -my $active_currency = GetCurrency(); +my $active_currency = Koha::Acquisition::Currencies->get_active; my $error = 0; if ( $payment_method eq 'paypal' ) { @@ -94,7 +94,7 @@ if ( $payment_method eq 'paypal' ) { 'BRANDNAME' => C4::Context->preference('LibraryName'), 'CANCELURL' => $cancel_url->as_string(), 'RETURNURL' => $return_url->as_string(), - 'PAYMENTREQUEST_0_CURRENCYCODE' => $active_currency->{currency}, + 'PAYMENTREQUEST_0_CURRENCYCODE' => $active_currency->currency, 'PAYMENTREQUEST_0_AMT' => $amount_to_pay, 'PAYMENTREQUEST_0_PAYMENTACTION' => 'Sale', 'PAYMENTREQUEST_0_ALLOWEDPAYMENTMETHOD' => 'InstantPaymentOnly', -- 2.39.5