Bug 15084: Remove C4::Budgets::ConvertCurrency
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Thu, 29 Oct 2015 14:51:37 +0000 (14:51 +0000)
committerBrendan A Gallagher <brendan@bywatersolutions.com>
Thu, 3 Mar 2016 20:39:01 +0000 (20:39 +0000)
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>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
C4/Budgets.pm
acqui/basketgroup.pl

index 734eb6a..9c50bda 100644 (file)
@@ -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) = @_;
 
index b2ed7db..dacc74e 100755 (executable)
@@ -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/;