View | Details | Raw Unified | Return to bug 35950
Collapse All | Expand All

(-)a/C4/Circulation.pm (-14 / +1 lines)
Lines 836-856 sub CanBookBeIssued { Link Here
836
            }
836
            }
837
        );
837
        );
838
        my $block_lost_return = C4::Context->preference("BlockReturnOfLostItems") ? 1 : 0;
838
        my $block_lost_return = C4::Context->preference("BlockReturnOfLostItems") ? 1 : 0;
839
        my ( $stats_return, $stats_messages, $stats_iteminformation, $stats_borrower );
840
        ( $stats_return, $stats_messages, $stats_iteminformation, $stats_borrower ) =
841
            AddReturn( $item_object->barcode, C4::Context->userenv->{'branch'}, undef, undef, 1 )
842
            if $item_object->onloan;
843
        ModDateLastSeen( $item_object->itemnumber, $block_lost_return );    # FIXME Move to Koha::Item
839
        ModDateLastSeen( $item_object->itemnumber, $block_lost_return );    # FIXME Move to Koha::Item
844
        return (
840
        return ( { STATS => 1, }, {} );
845
            {
846
                STATS     => 1,
847
                CHECKEDIN => $stats_return,
848
                MESSAGES  => $stats_messages,
849
                ITEM      => $stats_iteminformation,
850
                BORROWER  => $stats_borrower,
851
            },
852
            {}
853
        );
854
    }
841
    }
855
842
856
    if ( $patron->gonenoaddress && $patron->gonenoaddress == 1 ) {
843
    if ( $patron->gonenoaddress && $patron->gonenoaddress == 1 ) {
(-)a/circ/circulation.pl (-2 / +16 lines)
Lines 34-40 use Try::Tiny; Link Here
34
use C4::Output qw( output_and_exit_if_error output_and_exit output_html_with_http_headers );
34
use C4::Output qw( output_and_exit_if_error output_and_exit output_html_with_http_headers );
35
use C4::Auth qw( get_session get_template_and_user );
35
use C4::Auth qw( get_session get_template_and_user );
36
use C4::Koha;
36
use C4::Koha;
37
use C4::Circulation qw( barcodedecode CanBookBeIssued AddIssue );
37
use C4::Circulation qw( barcodedecode CanBookBeIssued AddIssue AddReturn );
38
use C4::Members;
38
use C4::Members;
39
use C4::Biblio qw( TransformMarcToKoha );
39
use C4::Biblio qw( TransformMarcToKoha );
40
use C4::Search qw( new_record_from_zebra );
40
use C4::Search qw( new_record_from_zebra );
Lines 355-360 if (@$barcodes && $op eq 'cud-checkout') { Link Here
355
        $biblio = $item->biblio;
355
        $biblio = $item->biblio;
356
    }
356
    }
357
357
358
    if ( $issuingimpossible->{'STATS'} ) {
359
        $template->param( STATS => 1 );
360
361
        if ( $item->onloan ) {
362
            my ( $stats_return, $stats_messages, $stats_iteminformation, $stats_borrower ) =
363
                AddReturn( $item->barcode, C4::Context->userenv->{'branch'}, undef, undef, 1 );
364
365
            $template->param(
366
                CHECKEDIN => $stats_return,
367
                MESSAGES  => $stats_messages,
368
                ITEM      => $stats_iteminformation,
369
                BORROWER  => $stats_borrower,
370
            );
371
        }
372
    }
358
    # Fix for bug 7494: optional checkout-time fallback search for a book
373
    # Fix for bug 7494: optional checkout-time fallback search for a book
359
374
360
    if ( $issuingimpossible->{'UNKNOWN_BARCODE'}
375
    if ( $issuingimpossible->{'UNKNOWN_BARCODE'}
361
- 

Return to bug 35950