Permalink
Browse files

Merge pull request #159 from hgq/13_03_pt17425127_4_08

13 03 pt17425127 4 08
  • Loading branch information...
2 parents 750216c + bb35247 commit 59ce2c4f7da14961c329d90802b256a81008c180 @ctfliblime ctfliblime committed Sep 19, 2011
Showing with 5 additions and 5 deletions.
  1. +2 −2 C4/Circulation.pm
  2. +3 −3 C4/Overdues.pm
View
4 C4/Circulation.pm
@@ -1939,7 +1939,7 @@ sub _FixAccountOverdues {
$$issue{itemnumber},
$$issue{borrowernumber},
$amount,
- undef,
+ 'F',
$start_date->output,
$ismax
);
@@ -2038,7 +2038,7 @@ sub _FixAccountOverdues {
}
else { # new amount is greater than previous
C4::Overdues::UpdateFine(
- $issue->{itemnumber}, $issue->{borrowernumber}, $amount, undef, $start_date->output,$ismax
+ $issue->{itemnumber}, $issue->{borrowernumber}, $amount, 'F', $start_date->output,$ismax
);
_checkinDescFine($$issue{borrowernumber},$$row{accountno},$checkindate,$$flags{tolost},$verbiage);
}
View
6 C4/Overdues.pm
@@ -500,7 +500,7 @@ accountlines table of the Koha database.
#
sub UpdateFine {
my ( $itemnum, $borrowernumber, $amount, $type, $due, $ismax ) = @_;
- $debug and warn "UpdateFine($itemnum, $borrowernumber, $amount, " . ($type||'""') . ", $due) called";
+ $type ||= 'FU';
my $dbh = C4::Context->dbh;
# FIXME - What exactly is this query supposed to do? It looks up an
# entry in accountlines that matches the given item and borrower
@@ -545,12 +545,12 @@ sub UpdateFine {
amount = ?,
amountoutstanding= ?,
lastincrement = ?,
- accounttype = 'FU',
+ accounttype = ?,
description = ?
WHERE borrowernumber = ?
AND accountno = ?";
my $sth2 = $dbh->prepare($query);
- $sth2->execute($amount, $out, $diff, $$data{description},$data->{'borrowernumber'}, $data->{accountno});
+ $sth2->execute($amount,$out,$diff,$type,$$data{description},$data->{'borrowernumber'}, $data->{accountno});
UpdateStats( my $branch = '', my $stattype = "fine_update", $amount, my $other = '', $data->{'itemnumber'}, my $itemtype = '', $data->{'borrowernumber'}, my $proccode = '' );
} else {
# print "no update needed $data->{'amount'}"

0 comments on commit 59ce2c4

Please sign in to comment.