Lines 510-515
accountlines table of the Koha database.
Link Here
|
510 |
sub UpdateFine { |
510 |
sub UpdateFine { |
511 |
my ($params) = @_; |
511 |
my ($params) = @_; |
512 |
|
512 |
|
|
|
513 |
warn "\n\n"; |
514 |
|
513 |
my $issue_id = $params->{issue_id}; |
515 |
my $issue_id = $params->{issue_id}; |
514 |
my $itemnum = $params->{itemnumber}; |
516 |
my $itemnum = $params->{itemnumber}; |
515 |
my $borrowernumber = $params->{borrowernumber}; |
517 |
my $borrowernumber = $params->{borrowernumber}; |
Lines 549-560
sub UpdateFine {
Link Here
|
549 |
next; |
551 |
next; |
550 |
} |
552 |
} |
551 |
} |
553 |
} |
|
|
554 |
warn "adding " . $overdue->amountoutstanding . "\n"; |
552 |
$total_amount_other += $overdue->amountoutstanding; |
555 |
$total_amount_other += $overdue->amountoutstanding; |
553 |
} |
556 |
} |
554 |
|
557 |
|
555 |
if ( my $maxfine = C4::Context->preference('MaxFine') ) { |
558 |
if ( my $maxfine = C4::Context->preference('MaxFine') ) { |
|
|
559 |
warn "in maxFine with $maxfine\n"; |
556 |
my $maxIncrease = $maxfine - $total_amount_other; |
560 |
my $maxIncrease = $maxfine - $total_amount_other; |
|
|
561 |
warn "maxIncrease = $maxIncrease\n"; |
557 |
return if $maxIncrease <= 0.00; |
562 |
return if $maxIncrease <= 0.00; |
|
|
563 |
warn "maxIncrease more than 0.00\n"; |
558 |
if ($accountline) { |
564 |
if ($accountline) { |
559 |
if ( ( $amount - $accountline->amount ) > $maxIncrease ) { |
565 |
if ( ( $amount - $accountline->amount ) > $maxIncrease ) { |
560 |
my $new_amount = $accountline->amount + $maxIncrease; |
566 |
my $new_amount = $accountline->amount + $maxIncrease; |
561 |
- |
|
|