Bug 24146: Increment existing fine

We should increment an existing fine even if it has been fully paid off
whilst it is still incrementing and not create a new fine.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This commit is contained in:
Martin Renvoize 2019-12-05 10:14:51 +00:00
parent ba7c2236d5
commit 7a1e1a1f88
No known key found for this signature in database
GPG Key ID: 422B469130441A0F
1 changed files with 1 additions and 3 deletions

View File

@ -526,8 +526,7 @@ sub UpdateFine {
my $overdues = Koha::Account::Lines->search(
{
borrowernumber => $borrowernumber,
debit_type_code => 'OVERDUE',
amountoutstanding => { '<>' => 0 }
debit_type_code => 'OVERDUE'
}
);
@ -561,7 +560,6 @@ sub UpdateFine {
}
}
if ( $accountline ) {
if ( $accountline->amount != $amount ) {
$accountline->adjust(