Lines 2202-2207
sub MarkIssueReturned {
Link Here
|
2202 |
# FIXME Improve the return value and handle it from callers |
2202 |
# FIXME Improve the return value and handle it from callers |
2203 |
$schema->txn_do(sub { |
2203 |
$schema->txn_do(sub { |
2204 |
|
2204 |
|
|
|
2205 |
my $patron = Koha::Patrons->find( $borrowernumber ); |
2206 |
|
2207 |
# Remove any OVERDUES related debarment if the borrower has no overdues |
2208 |
if ( C4::Context->preference('AutoRemoveOverduesRestrictions') |
2209 |
&& $patron->debarred |
2210 |
&& !$patron->has_overdues |
2211 |
&& @{ GetDebarments({ borrowernumber => $borrowernumber, type => 'OVERDUES' }) } |
2212 |
) { |
2213 |
DelUniqueDebarment({ borrowernumber => $borrowernumber, type => 'OVERDUES' }); |
2214 |
} |
2215 |
|
2216 |
|
2205 |
# Update the returndate value |
2217 |
# Update the returndate value |
2206 |
if ( $returndate ) { |
2218 |
if ( $returndate ) { |
2207 |
$issue->returndate( $returndate )->store->discard_changes; # update and refetch |
2219 |
$issue->returndate( $returndate )->store->discard_changes; # update and refetch |
Lines 2225-2231
sub MarkIssueReturned {
Link Here
|
2225 |
|
2237 |
|
2226 |
if ( C4::Context->preference('StoreLastBorrower') ) { |
2238 |
if ( C4::Context->preference('StoreLastBorrower') ) { |
2227 |
my $item = Koha::Items->find( $itemnumber ); |
2239 |
my $item = Koha::Items->find( $itemnumber ); |
2228 |
my $patron = Koha::Patrons->find( $borrowernumber ); |
|
|
2229 |
$item->last_returned_by( $patron ); |
2240 |
$item->last_returned_by( $patron ); |
2230 |
} |
2241 |
} |
2231 |
}); |
2242 |
}); |
2232 |
- |
|
|