|
Lines 836-842
sub CanBookBeIssued {
Link Here
|
| 836 |
); |
836 |
); |
| 837 |
my $block_lost_return = C4::Context->preference("BlockReturnOfLostItems") ? 1 : 0; |
837 |
my $block_lost_return = C4::Context->preference("BlockReturnOfLostItems") ? 1 : 0; |
| 838 |
my ( $stats_return, $stats_messages, $stats_iteminformation, $stats_borrower ) = |
838 |
my ( $stats_return, $stats_messages, $stats_iteminformation, $stats_borrower ) = |
| 839 |
AddReturn( $item_object->barcode, C4::Context->userenv->{'branch'} ); |
839 |
AddReturn( $item_object->barcode, C4::Context->userenv->{'branch'}, undef, undef, 1 ); |
| 840 |
ModDateLastSeen( $item_object->itemnumber, $block_lost_return ); # FIXME Move to Koha::Item |
840 |
ModDateLastSeen( $item_object->itemnumber, $block_lost_return ); # FIXME Move to Koha::Item |
| 841 |
return ( |
841 |
return ( |
| 842 |
{ |
842 |
{ |
|
Lines 2049-2055
sub GetBranchItemRule {
Link Here
|
| 2049 |
=head2 AddReturn |
2049 |
=head2 AddReturn |
| 2050 |
|
2050 |
|
| 2051 |
($doreturn, $messages, $iteminformation, $borrower) = |
2051 |
($doreturn, $messages, $iteminformation, $borrower) = |
| 2052 |
&AddReturn( $barcode, $branch [,$exemptfine] [,$returndate] ); |
2052 |
&AddReturn( $barcode, $branch [,$exemptfine] [,$returndate] [,$skip_localuse ] ); |
| 2053 |
|
2053 |
|
| 2054 |
Returns a book. |
2054 |
Returns a book. |
| 2055 |
|
2055 |
|
|
Lines 2065-2070
removed. Optional.
Link Here
|
| 2065 |
=item C<$return_date> allows the default return date to be overridden |
2065 |
=item C<$return_date> allows the default return date to be overridden |
| 2066 |
by the given return date. Optional. |
2066 |
by the given return date. Optional. |
| 2067 |
|
2067 |
|
|
|
2068 |
=item C<$skip_localuse> indicated that localuse should not be recorded. Optional. |
| 2069 |
|
| 2068 |
=back |
2070 |
=back |
| 2069 |
|
2071 |
|
| 2070 |
C<&AddReturn> returns a list of four items: |
2072 |
C<&AddReturn> returns a list of four items: |
|
Lines 2130-2136
patron who last borrowed the book.
Link Here
|
| 2130 |
=cut |
2132 |
=cut |
| 2131 |
|
2133 |
|
| 2132 |
sub AddReturn { |
2134 |
sub AddReturn { |
| 2133 |
my ( $barcode, $branch, $exemptfine, $return_date ) = @_; |
2135 |
my ( $barcode, $branch, $exemptfine, $return_date, $skip_localuse ) = @_; |
| 2134 |
|
2136 |
|
| 2135 |
if ($branch and not Koha::Libraries->find($branch)) { |
2137 |
if ($branch and not Koha::Libraries->find($branch)) { |
| 2136 |
warn "AddReturn error: branch '$branch' not found. Reverting to " . C4::Context->userenv->{'branch'}; |
2138 |
warn "AddReturn error: branch '$branch' not found. Reverting to " . C4::Context->userenv->{'branch'}; |
|
Lines 2473-2479
sub AddReturn {
Link Here
|
| 2473 |
ccode => $item->ccode, |
2475 |
ccode => $item->ccode, |
| 2474 |
categorycode => $categorycode, |
2476 |
categorycode => $categorycode, |
| 2475 |
interface => C4::Context->interface, |
2477 |
interface => C4::Context->interface, |
| 2476 |
}); |
2478 |
}) unless ( $skip_localuse && $stat_type eq 'localuse' ); |
| 2477 |
|
2479 |
|
| 2478 |
# Send a check-in slip. # NOTE: borrower may be undef. Do not try to send messages then. |
2480 |
# Send a check-in slip. # NOTE: borrower may be undef. Do not try to send messages then. |
| 2479 |
if ( $patron ) { |
2481 |
if ( $patron ) { |
| 2480 |
- |
|
|