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

(-)a/C4/Circulation.pm (-3 / +25 lines)
Lines 22-27 use Modern::Perl; Link Here
22
use DateTime;
22
use DateTime;
23
use POSIX qw( floor );
23
use POSIX qw( floor );
24
use Encode;
24
use Encode;
25
use Try::Tiny;
25
26
26
use C4::Context;
27
use C4::Context;
27
use C4::Stats qw( UpdateStats );
28
use C4::Stats qw( UpdateStats );
Lines 1735-1741 sub AddIssue { Link Here
1735
                );
1736
                );
1736
            }
1737
            }
1737
            $issue->discard_changes;
1738
            $issue->discard_changes;
1738
            $patron->update_lastseen('check_out');
1739
            #Update borrowers.lastseen
1740
            try{
1741
                $patron->update_lastseen('check_out');
1742
            }
1743
            catch {
1744
                my $exception = $_;
1745
                warn "Problem updating lastseen date for borrowernumber " . $patron->borrowernumber . ": $exception";
1746
            };
1739
            if ( $item_object->location && $item_object->location eq 'CART'
1747
            if ( $item_object->location && $item_object->location eq 'CART'
1740
                && ( !$item_object->permanent_location || $item_object->permanent_location ne 'CART' ) ) {
1748
                && ( !$item_object->permanent_location || $item_object->permanent_location ne 'CART' ) ) {
1741
            ## Item was moved to cart via UpdateItemLocationOnCheckin, anything issued should be taken off the cart.
1749
            ## Item was moved to cart via UpdateItemLocationOnCheckin, anything issued should be taken off the cart.
Lines 2493-2499 sub AddReturn { Link Here
2493
            if C4::Context->preference("ReturnLog");
2501
            if C4::Context->preference("ReturnLog");
2494
2502
2495
        #Update borrowers.lastseen
2503
        #Update borrowers.lastseen
2496
        $patron->update_lastseen('check_in');
2504
        try{
2505
            $patron->update_lastseen('check_in');
2506
        }
2507
        catch {
2508
            my $exception = $_;
2509
            warn "Problem updating lastseen date for borrowernumber " . $patron->borrowernumber . ": $exception";
2510
            $messages->{UpdateLastSeenError} = "$exception";
2511
        };
2497
    }
2512
    }
2498
2513
2499
    # Check if this item belongs to a biblio record that is attached to an
2514
    # Check if this item belongs to a biblio record that is attached to an
Lines 3404-3410 sub AddRenewal { Link Here
3404
            }
3419
            }
3405
        );
3420
        );
3406
        #Update borrowers.lastseen
3421
        #Update borrowers.lastseen
3407
        $patron->update_lastseen('renewal');
3422
        try{
3423
            $patron->update_lastseen('renewal');
3424
        }
3425
        catch {
3426
            my $exception = $_;
3427
            warn "Problem updating lastseen date for borrowernumber " . $patron->borrowernumber . ": $exception";
3428
        };
3429
3408
3430
3409
        #Log the renewal
3431
        #Log the renewal
3410
        logaction("CIRCULATION", "RENEWAL", $borrowernumber, $itemnumber) if C4::Context->preference("RenewalLog");
3432
        logaction("CIRCULATION", "RENEWAL", $borrowernumber, $itemnumber) if C4::Context->preference("RenewalLog");
(-)a/circ/returns.pl (+2 lines)
Lines 766-771 foreach my $code ( keys %$messages ) { Link Here
766
        ;
766
        ;
767
    } elsif ( $code eq 'InBundle' ) {
767
    } elsif ( $code eq 'InBundle' ) {
768
        $template->param( InBundle => $messages->{InBundle} );
768
        $template->param( InBundle => $messages->{InBundle} );
769
    } elsif ( $code eq 'UpdateLastSeenError' ) {
770
        $err{UpdateLastSeenError}           = $messages->{UpdateLastSeenError};
769
    } else {
771
    } else {
770
        die "Unknown error code $code";    # note we need all the (empty) elsif's above, or we die.
772
        die "Unknown error code $code";    # note we need all the (empty) elsif's above, or we die.
771
                                           # This forces the issue of staying in sync w/ Circulation.pm
773
                                           # This forces the issue of staying in sync w/ Circulation.pm
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt (-1 / +9 lines)
Lines 267-274 Link Here
267
                                        <p><a href="/cgi-bin/koha/catalogue/detail.pl?type=intra&amp;biblionumber=[% itembiblionumber | uri %]">[% item.barcode | html %]: [% title | html %]</a></p>
267
                                        <p><a href="/cgi-bin/koha/catalogue/detail.pl?type=intra&amp;biblionumber=[% itembiblionumber | uri %]">[% item.barcode | html %]: [% title | html %]</a></p>
268
                                    [% END %]
268
                                    [% END %]
269
                                    [% FOREACH errmsgloo IN errmsgloop %]
269
                                    [% FOREACH errmsgloo IN errmsgloop %]
270
                                        [% IF ( errmsgloo.UpdateLastSeenError ) %]
271
                                            <div id="update_last_seen_error" class="alert alert-warning audio-alert-warning">
272
                                                <h3>Error updating patron's last seen date</h3>
273
                                                <p>The item has been checked in, but the issue below must be corrected:</p>
274
                                                <p>The system encountered an error when updating the patron's last seen date:</p>
275
                                                <p>[% errmsgloo.UpdateLastSeenError | html %]</p>
276
                                            </div>
277
                                        [% END %]
270
                                        [% IF ( errmsgloo.NotForLoanStatusUpdated ) %]
278
                                        [% IF ( errmsgloo.NotForLoanStatusUpdated ) %]
271
                                            <p class="problem ret_nflupdate">
279
                                            <p class="problem ret_nflupdate">
280
272
                                            [% IF errmsgloo.NotForLoanStatusUpdated.to == 'ONLYMESSAGE' %]
281
                                            [% IF errmsgloo.NotForLoanStatusUpdated.to == 'ONLYMESSAGE' %]
273
                                                [% AuthorisedValues.GetByCode( 'NOT_LOAN', errmsgloo.NotForLoanStatusUpdated.from ) | html %]
282
                                                [% AuthorisedValues.GetByCode( 'NOT_LOAN', errmsgloo.NotForLoanStatusUpdated.from ) | html %]
274
                                            [% ELSE %]
283
                                            [% ELSE %]
275
- 

Return to bug 39180