Lines 2012-2019
sub AddReturn {
Link Here
|
2012 |
$item->holdingbranch($branch)->store; |
2012 |
$item->holdingbranch($branch)->store; |
2013 |
} |
2013 |
} |
2014 |
|
2014 |
|
|
|
2015 |
my $item_was_lost = $item->itemlost; |
2015 |
my $leave_item_lost = C4::Context->preference("BlockReturnOfLostItems") ? 1 : 0; |
2016 |
my $leave_item_lost = C4::Context->preference("BlockReturnOfLostItems") ? 1 : 0; |
2016 |
ModDateLastSeen( $item->itemnumber, $leave_item_lost ); |
2017 |
ModDateLastSeen( $item->itemnumber, $leave_item_lost ); # will unset itemlost if needed |
|
|
2018 |
|
2019 |
# fix up the accounts..... |
2020 |
if ( $item_was_lost ) { |
2021 |
$messages->{'WasLost'} = 1; |
2022 |
unless ( C4::Context->preference("BlockReturnOfLostItems") ) { |
2023 |
#my $refunded = Koha::Account::Lines->search{(itemnumber => $item->itemnumber, type => 'LOST_FOUND', # FIXME which other parameters to know it has been refunded? |
2024 |
$messages->{'LostItemFeeRefunded'} = 1; |
2025 |
} |
2026 |
} |
2017 |
|
2027 |
|
2018 |
# check if we have a transfer for this document |
2028 |
# check if we have a transfer for this document |
2019 |
my ($datesent,$frombranch,$tobranch) = GetTransfers( $item->itemnumber ); |
2029 |
my ($datesent,$frombranch,$tobranch) = GetTransfers( $item->itemnumber ); |
Lines 2035-2048
sub AddReturn {
Link Here
|
2035 |
} |
2045 |
} |
2036 |
} |
2046 |
} |
2037 |
|
2047 |
|
2038 |
# fix up the accounts..... |
|
|
2039 |
if ( $item->itemlost ) { |
2040 |
$messages->{'WasLost'} = 1; |
2041 |
unless ( C4::Context->preference("BlockReturnOfLostItems") ) { |
2042 |
$messages->{'LostItemFeeRefunded'} = $refunded; |
2043 |
} |
2044 |
} |
2045 |
|
2046 |
# fix up the overdues in accounts... |
2048 |
# fix up the overdues in accounts... |
2047 |
if ($borrowernumber) { |
2049 |
if ($borrowernumber) { |
2048 |
my $fix = _FixOverduesOnReturn( $borrowernumber, $item->itemnumber, $exemptfine, 'RETURNED' ); |
2050 |
my $fix = _FixOverduesOnReturn( $borrowernumber, $item->itemnumber, $exemptfine, 'RETURNED' ); |
2049 |
- |
|
|