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 2576-2582
sub AddReturn {
Link Here
|
2576 |
if C4::Context->preference("ReturnLog"); |
2584 |
if C4::Context->preference("ReturnLog"); |
2577 |
|
2585 |
|
2578 |
#Update borrowers.lastseen |
2586 |
#Update borrowers.lastseen |
2579 |
$patron->update_lastseen('check_in'); |
2587 |
try{ |
|
|
2588 |
$patron->update_lastseen('check_in'); |
2589 |
} |
2590 |
catch { |
2591 |
my $exception = $_; |
2592 |
warn "Problem updating lastseen date for borrowernumber " . $patron->borrowernumber . ": $exception"; |
2593 |
$messages->{UpdateLastSeenError} = "$exception"; |
2594 |
}; |
2580 |
} |
2595 |
} |
2581 |
|
2596 |
|
2582 |
# Check if this item belongs to a biblio record that is attached to an |
2597 |
# Check if this item belongs to a biblio record that is attached to an |
Lines 3524-3530
sub AddRenewal {
Link Here
|
3524 |
); |
3539 |
); |
3525 |
|
3540 |
|
3526 |
#Update borrowers.lastseen |
3541 |
#Update borrowers.lastseen |
3527 |
$patron->update_lastseen('renewal'); |
3542 |
try{ |
|
|
3543 |
$patron->update_lastseen('renewal'); |
3544 |
} |
3545 |
catch { |
3546 |
my $exception = $_; |
3547 |
warn "Problem updating lastseen date for borrowernumber " . $patron->borrowernumber . ": $exception"; |
3548 |
}; |
3528 |
|
3549 |
|
3529 |
#Log the renewal |
3550 |
#Log the renewal |
3530 |
logaction( "CIRCULATION", "RENEWAL", $borrowernumber, $itemnumber ) |
3551 |
logaction( "CIRCULATION", "RENEWAL", $borrowernumber, $itemnumber ) |