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>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
This commit is contained in:
Josef Moravec 2018-10-26 09:28:01 +00:00 committed by Nick Clemens
parent 51ce2ebfe1
commit 89bad1fa46
1 changed files with 0 additions and 31 deletions

View File

@ -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