From a42010076784e1b206b33ec15bb65a20144ca051 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 --- C4/Accounts.pm | 31 ------------------------------- 1 file changed, 31 deletions(-) diff --git a/C4/Accounts.pm b/C4/Accounts.pm index f087ba6..6281bec 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(<