Lines 535-541
sub UpdateFine {
Link Here
|
535 |
# - accumulate fines for other items |
535 |
# - accumulate fines for other items |
536 |
# so we can update $itemnum fine taking in account fine caps |
536 |
# so we can update $itemnum fine taking in account fine caps |
537 |
while (my $overdue = $overdues->next) { |
537 |
while (my $overdue = $overdues->next) { |
538 |
if ( defined $overdue->issue_id && $overdue->issue_id == $issue_id && $overdue->status eq 'UNRETURNED' ) { |
538 |
if ( defined $overdue->issue_id && $overdue->issue_id == $issue_id ) { |
539 |
if ($accountline) { |
539 |
if ($accountline) { |
540 |
Koha::Logger->get->debug("Not a unique accountlines record for issue_id $issue_id"); # FIXME Do we really need to log that? |
540 |
Koha::Logger->get->debug("Not a unique accountlines record for issue_id $issue_id"); # FIXME Do we really need to log that? |
541 |
#FIXME Should we still count this one in total_amount ?? |
541 |
#FIXME Should we still count this one in total_amount ?? |
Lines 564-570
sub UpdateFine {
Link Here
|
564 |
} |
564 |
} |
565 |
|
565 |
|
566 |
if ( $accountline ) { |
566 |
if ( $accountline ) { |
567 |
if ( Koha::Number::Price->new($accountline->amount)->round != Koha::Number::Price->new($amount)->round ) { |
567 |
# a book may be returned while cronjob/fines.pl is running |
|
|
568 |
if ( ( $accountline->status eq 'UNRETURNED' || ! C4::Context->preference('CalculateFinesOnReturn') ) |
569 |
&& Koha::Number::Price->new($accountline->amount)->round != Koha::Number::Price->new($amount)->round ) { |
568 |
$accountline->adjust( |
570 |
$accountline->adjust( |
569 |
{ |
571 |
{ |
570 |
amount => $amount, |
572 |
amount => $amount, |
571 |
- |
|
|