Bugzilla – Attachment 48725 Details for
Bug 15987
Acq module fails with undefined subroutine &main::GetCurrency
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 15987: Fix undefined subroutine &main::GetCurrency in opac-account-pay
Bug-15987-Fix-undefined-subroutine-mainGetCurrency.patch (text/plain), 3.06 KB, created by
Jonathan Druart
on 2016-03-07 08:17:33 UTC
(
hide
)
Description:
Bug 15987: Fix undefined subroutine &main::GetCurrency in opac-account-pay
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2016-03-07 08:17:33 UTC
Size:
3.06 KB
patch
obsolete
>From cb85dd632880814fc36349ea60ace755eb42b317 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Mon, 7 Mar 2016 08:15:03 +0000 >Subject: [PATCH] Bug 15987: Fix undefined subroutine &main::GetCurrency in > opac-account-pay > >Bug 15987 and bug 11622 were competing the push to master status at the >same time. Bug 15987 removed the GetCurrency status and bug 11622 >reintroduced one occurrence of this subroutine. > >Test plan: >Confirm that the test plan for 11622 still passes. >--- > opac/opac-account-pay-paypal-return.pl | 6 +++--- > opac/opac-account-pay.pl | 6 +++--- > 2 files changed, 6 insertions(+), 6 deletions(-) > >diff --git a/opac/opac-account-pay-paypal-return.pl b/opac/opac-account-pay-paypal-return.pl >index 4279263..4768412 100755 >--- a/opac/opac-account-pay-paypal-return.pl >+++ b/opac/opac-account-pay-paypal-return.pl >@@ -30,8 +30,8 @@ use C4::Auth; > use C4::Output; > use C4::Accounts; > use C4::Members; >-use C4::Budgets qw(GetCurrency); > use Koha::Database; >+use Koha::Acquisition::Currencies; > > 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 ? $active_currency->currency : undef, > }; > > my $response = $ua->request( POST $url, $nvp_params ); >diff --git a/opac/opac-account-pay.pl b/opac/opac-account-pay.pl >index e8664e4..9cc7f9f 100755 >--- a/opac/opac-account-pay.pl >+++ b/opac/opac-account-pay.pl >@@ -30,8 +30,8 @@ use URI; > use C4::Auth; > use C4::Output; > use C4::Context; >-use C4::Budgets qw(GetCurrency); > use Koha::Database; >+use Koha::Acquisition::Currencies; > > 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 ? $active_currency->currency : undef, > 'PAYMENTREQUEST_0_AMT' => $amount_to_pay, > 'PAYMENTREQUEST_0_PAYMENTACTION' => 'Sale', > 'PAYMENTREQUEST_0_ALLOWEDPAYMENTMETHOD' => 'InstantPaymentOnly', >-- >2.7.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 15987
:
48724
| 48725