Bugzilla – Attachment 48747 Details for
Bug 15084
Move the currency related code to Koha::Acquisition::Currenc[y|ies]
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 15084 [QA Followup] - Fix new uses of GetCurrency
Bug-15084-QA-Followup---Fix-new-uses-of-GetCurrenc.patch (text/plain), 3.48 KB, created by
Kyle M Hall (khall)
on 2016-03-07 13:33:44 UTC
(
hide
)
Description:
Bug 15084 [QA Followup] - Fix new uses of GetCurrency
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2016-03-07 13:33:44 UTC
Size:
3.48 KB
patch
obsolete
>From 59bef628b69ecea5edc8c0150fbddf9cf5cd5796 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >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 <kyle@bywatersolutions.com> >--- > 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 393a131..804e3ce 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 4279263..1823d2f 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 e8664e4..8dfdfcd 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.1.4
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 15084
:
44162
|
44163
|
44164
|
44165
|
44166
|
44167
|
44168
|
45690
|
45691
|
45692
|
45693
|
45694
|
45695
|
45696
|
45759
|
45761
|
45807
|
45808
|
45809
|
45810
|
45811
|
45812
|
45813
|
45814
|
47213
|
47214
|
47215
|
47216
|
47217
|
47218
|
47219
|
47220
|
47221
|
48594
|
48595
|
48596
|
48597
|
48598
|
48599
|
48600
|
48601
|
48602
|
48603
|
48703
| 48747 |
48772
|
48783
|
48858