Lines 2053-2059
sub AddReturn {
Link Here
|
2053 |
# fix up the overdues in accounts... |
2053 |
# fix up the overdues in accounts... |
2054 |
if ($borrowernumber) { |
2054 |
if ($borrowernumber) { |
2055 |
my $fix = _FixOverduesOnReturn( $borrowernumber, $item->itemnumber, $exemptfine, 'RETURNED' ); |
2055 |
my $fix = _FixOverduesOnReturn( $borrowernumber, $item->itemnumber, $exemptfine, 'RETURNED' ); |
2056 |
defined($fix) or warn "_FixOverduesOnReturn($borrowernumber, $item->itemnumber...) failed!"; # zero is OK, check defined |
2056 |
defined($fix) or warn "_FixOverduesOnReturn($borrowernumber, ".$item->itemnumber."...) failed!"; # zero is OK, check defined |
2057 |
|
2057 |
|
2058 |
if ( $issue and $issue->is_overdue($return_date) ) { |
2058 |
if ( $issue and $issue->is_overdue($return_date) ) { |
2059 |
# fix fine days |
2059 |
# fix fine days |
Lines 2453-2467
sub _FixOverduesOnReturn {
Link Here
|
2453 |
|
2453 |
|
2454 |
$credit->apply({ debits => [ $accountline ], offset_type => 'Forgiven' }); |
2454 |
$credit->apply({ debits => [ $accountline ], offset_type => 'Forgiven' }); |
2455 |
|
2455 |
|
2456 |
$accountline->status('FORGIVEN'); |
|
|
2457 |
$accountline->store(); |
2458 |
|
2459 |
if (C4::Context->preference("FinesLog")) { |
2456 |
if (C4::Context->preference("FinesLog")) { |
2460 |
&logaction("FINES", 'MODIFY',$borrowernumber,"Overdue forgiven: item $item"); |
2457 |
&logaction("FINES", 'MODIFY',$borrowernumber,"Overdue forgiven: item $item"); |
2461 |
} |
2458 |
} |
|
|
2459 |
|
2460 |
$accountline->status('FORGIVEN'); |
2461 |
$accountline->store(); |
2462 |
} else { |
2462 |
} else { |
2463 |
$accountline->status($status); |
2463 |
$accountline->status($status); |
2464 |
$accountline->store(); |
2464 |
$accountline->store(); |
|
|
2465 |
|
2465 |
} |
2466 |
} |
2466 |
} |
2467 |
} |
2467 |
); |
2468 |
); |
2468 |
- |
|
|