From 89bad1fa460dc75bdaeb40e82ee56639e35fe0c9 Mon Sep 17 00:00:00 2001 From: Josef Moravec 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 Signed-off-by: Martin Renvoize Signed-off-by: Nick Clemens --- 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(<