From a00d2b115c5dc5fac1d74d7385a289b3d1cb8a81 Mon Sep 17 00:00:00 2001
From: Josef Moravec <josef.moravec@gmail.com>
Date: Fri, 26 Oct 2018 09:28:01 +0000
Subject: [PATCH] Bug 21680: Remove dead code - C4::Accounts::fixaccounts

Test plan:

git grep fixacccounts
-- without patch there are 3 occurences
-- with patch - no occurence of fixaccounts

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
---
 C4/Accounts.pm | 31 -------------------------------
 1 file changed, 31 deletions(-)

diff --git a/C4/Accounts.pm b/C4/Accounts.pm
index f087ba6b1a..6281becbe8 100644
--- a/C4/Accounts.pm
+++ b/C4/Accounts.pm
@@ -85,37 +85,6 @@ sub getnextacctno {
     return ($sth->fetchrow || 1);
 }
 
-=head2 fixaccounts (removed)
-
-  &fixaccounts($accountlines_id, $borrowernumber, $accountnumber, $amount);
-
-#'
-# FIXME - I don't understand what this function does.
-sub fixaccounts {
-    my ( $accountlines_id, $borrowernumber, $accountno, $amount ) = @_;
-    my $dbh = C4::Context->dbh;
-    my $sth = $dbh->prepare(
-        "SELECT * FROM accountlines WHERE accountlines_id=?"
-    );
-    $sth->execute( $accountlines_id );
-    my $data = $sth->fetchrow_hashref;
-
-    # FIXME - Error-checking
-    my $diff        = $amount - $data->{'amount'};
-    my $outstanding = $data->{'amountoutstanding'} + $diff;
-    $sth->finish;
-
-    $dbh->do(<<EOT);
-        UPDATE  accountlines
-        SET     amount = '$amount',
-                amountoutstanding = '$outstanding'
-        WHERE   accountlines_id = $accountlines_id
-EOT
-	# FIXME: exceedingly bad form.  Use prepare with placholders ("?") in query and execute args.
-}
-
-=cut
-
 =head2 chargelostitem
 
 In a default install of Koha the following lost values are set
-- 
2.19.1