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

(-)a/C4/Circulation.pm (-3 / +24 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 1783-1789 sub AddIssue { Link Here
1783
                );
1784
                );
1784
            }
1785
            }
1785
            $issue->discard_changes;
1786
            $issue->discard_changes;
1786
            $patron->update_lastseen('check_out');
1787
            #Update borrowers.lastseen
1788
            try{
1789
                $patron->update_lastseen('check_out');
1790
            }
1791
            catch {
1792
                my $exception = $_;
1793
                warn "Problem updating lastseen date for borrowernumber " . $patron->borrowernumber . ": $exception";
1794
            };
1787
            if (   $item_object->location
1795
            if (   $item_object->location
1788
                && $item_object->location eq 'CART'
1796
                && $item_object->location eq 'CART'
1789
                && ( !$item_object->permanent_location || $item_object->permanent_location ne 'CART' ) )
1797
                && ( !$item_object->permanent_location || $item_object->permanent_location ne 'CART' ) )
Lines 2581-2587 sub AddReturn { Link Here
2581
            if C4::Context->preference("ReturnLog");
2589
            if C4::Context->preference("ReturnLog");
2582
2590
2583
        #Update borrowers.lastseen
2591
        #Update borrowers.lastseen
2584
        $patron->update_lastseen('check_in');
2592
        try{
2593
            $patron->update_lastseen('check_in');
2594
        }
2595
        catch {
2596
            my $exception = $_;
2597
            warn "Problem updating lastseen date for borrowernumber " . $patron->borrowernumber . ": $exception";
2598
            $messages->{UpdateLastSeenError} = "$exception";
2599
        };
2585
    }
2600
    }
2586
2601
2587
    # Check if this item belongs to a biblio record that is attached to an
2602
    # Check if this item belongs to a biblio record that is attached to an
Lines 3529-3535 sub AddRenewal { Link Here
3529
            );
3544
            );
3530
3545
3531
            #Update borrowers.lastseen
3546
            #Update borrowers.lastseen
3532
            $patron->update_lastseen('renewal');
3547
            try{
3548
                $patron->update_lastseen('renewal');
3549
            }
3550
            catch {
3551
                my $exception = $_;
3552
                warn "Problem updating lastseen date for borrowernumber " . $patron->borrowernumber . ": $exception";
3553
            };
3533
3554
3534
            #Log the renewal
3555
            #Log the renewal
3535
            logaction( "CIRCULATION", "RENEWAL", $borrowernumber, $itemnumber )
3556
            logaction( "CIRCULATION", "RENEWAL", $borrowernumber, $itemnumber )
(-)a/circ/returns.pl (+2 lines)
Lines 743-748 foreach my $code ( keys %$messages ) { Link Here
743
        ;
743
        ;
744
    } elsif ( $code eq 'InBundle' ) {
744
    } elsif ( $code eq 'InBundle' ) {
745
        $template->param( InBundle => $messages->{InBundle} );
745
        $template->param( InBundle => $messages->{InBundle} );
746
    } elsif ( $code eq 'UpdateLastSeenError' ) {
747
        $err{UpdateLastSeenError}           = $messages->{UpdateLastSeenError};
746
    } else {
748
    } else {
747
        die "Unknown error code $code";    # note we need all the (empty) elsif's above, or we die.
749
        die "Unknown error code $code";    # note we need all the (empty) elsif's above, or we die.
748
                                           # This forces the issue of staying in sync w/ Circulation.pm
750
                                           # This forces the issue of staying in sync w/ Circulation.pm
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt (-1 / +8 lines)
Lines 294-299 Link Here
294
                            [% END %]
294
                            [% END %]
295
                        </p>
295
                        </p>
296
                    [% END %]
296
                    [% END %]
297
                    [% IF ( errmsgloo.UpdateLastSeenError ) %]
298
                        <div id="update_last_seen_error" class="alert alert-warning audio-alert-warning">
299
                            <h3>Error updating patron's last seen date</h3>
300
                            <p>The item has been checked in, but the issue below must be corrected:</p>
301
                            <p>The system encountered an error when updating the patron's last seen date:</p>
302
                            <p>[% errmsgloo.UpdateLastSeenError | html %]</p>
303
                        </div>
304
                    [% END %]
297
                    [% IF ( errmsgloo.ItemLocationUpdated ) %]
305
                    [% IF ( errmsgloo.ItemLocationUpdated ) %]
298
                        <p class="problem ret_location_update">
306
                        <p class="problem ret_location_update">
299
                            Item shelving location updated.
307
                            Item shelving location updated.
300
- 

Return to bug 39180