@@ -, +, @@ --- 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(-) --- a/acqui/acqui-home.pl +++ a/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, ); } --- a/opac/opac-account-pay-paypal-return.pl +++ a/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 ); --- a/opac/opac-account-pay.pl +++ a/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', --