Bugzilla – Attachment 48598 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: Remove C4::Budgets::ConvertCurrency
Bug-15084-Remove-C4BudgetsConvertCurrency.patch (text/plain), 2.22 KB, created by
Jonathan Druart
on 2016-03-03 08:42:15 UTC
(
hide
)
Description:
Bug 15084: Remove C4::Budgets::ConvertCurrency
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2016-03-03 08:42:15 UTC
Size:
2.22 KB
patch
obsolete
>From 74ac4d30a9862a0c7919917dda2382ff89cba040 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Thu, 29 Oct 2015 14:51:37 +0000 >Subject: [PATCH] Bug 15084: Remove C4::Budgets::ConvertCurrency > >This subroutine is unused and can be removed. >There is no trace left of currency in C4::Budgets. > >Signed-off-by: Josef Moravec <josef.moravec@gmail.com> > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >--- > C4/Budgets.pm | 32 -------------------------------- > acqui/basketgroup.pl | 1 - > 2 files changed, 33 deletions(-) > >diff --git a/C4/Budgets.pm b/C4/Budgets.pm >index 734eb6a..9c50bda 100644 >--- a/C4/Budgets.pm >+++ b/C4/Budgets.pm >@@ -59,8 +59,6 @@ BEGIN { > > &ModBudgetPlan > >- &ConvertCurrency >- > &GetBudgetsPlanCell > &AddBudgetPlanValue > &GetBudgetAuthCats >@@ -913,36 +911,6 @@ sub CanUserModifyBudget { > return 1; > } > >-# ------------------------------------------------------------------- >- >-=head2 ConvertCurrency >- >- $foreignprice = &ConvertCurrency($currency, $localprice); >- >-Converts the price C<$localprice> to foreign currency C<$currency> by >-dividing by the exchange rate, and returns the result. >- >-If no exchange rate is found, e is one to one. >- >-=cut >- >-sub ConvertCurrency { >- my ( $currency, $price ) = @_; >- my $dbh = C4::Context->dbh; >- my $query = " >- SELECT rate >- FROM currency >- WHERE currency=? >- "; >- my $sth = $dbh->prepare($query); >- $sth->execute($currency); >- my $cur = ( $sth->fetchrow_array() )[0]; >- unless ($cur) { >- $cur = 1; >- } >- return ( $price / $cur ); >-} >- > sub _round { > my ($value, $increment) = @_; > >diff --git a/acqui/basketgroup.pl b/acqui/basketgroup.pl >index b2ed7db..dacc74e 100755 >--- a/acqui/basketgroup.pl >+++ b/acqui/basketgroup.pl >@@ -51,7 +51,6 @@ use C4::Auth; > use C4::Output; > use CGI qw ( -utf8 ); > >-use C4::Budgets qw/ConvertCurrency/; > use C4::Acquisition qw/CloseBasketgroup ReOpenBasketgroup GetOrders GetBasketsByBasketgroup GetBasketsByBookseller ModBasketgroup NewBasketgroup DelBasketgroup GetBasketgroups ModBasket GetBasketgroup GetBasket GetBasketGroupAsCSV/; > use C4::Branch qw/GetBranches/; > use C4::Members qw/GetMember/; >-- >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 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