Lines 1477-1482
sub AddIssue {
Link Here
|
1477 |
my ( $allowed, $message ) = CanBookBeReturned( $item_unblessed, C4::Context->userenv->{branch} ); |
1477 |
my ( $allowed, $message ) = CanBookBeReturned( $item_unblessed, C4::Context->userenv->{branch} ); |
1478 |
return unless $allowed; |
1478 |
return unless $allowed; |
1479 |
AddReturn( $item_object->barcode, C4::Context->userenv->{'branch'} ); |
1479 |
AddReturn( $item_object->barcode, C4::Context->userenv->{'branch'} ); |
|
|
1480 |
# AddReturn certainly has side-effects, like onloan => undef |
1481 |
$item_object->discard_changes; |
1480 |
} |
1482 |
} |
1481 |
|
1483 |
|
1482 |
C4::Reserves::MoveReserve( $item_object->itemnumber, $borrower->{'borrowernumber'}, $cancelreserve ); |
1484 |
C4::Reserves::MoveReserve( $item_object->itemnumber, $borrower->{'borrowernumber'}, $cancelreserve ); |
Lines 1566-1572
sub AddIssue {
Link Here
|
1566 |
$item_object->holdingbranch(C4::Context->userenv->{'branch'}); |
1568 |
$item_object->holdingbranch(C4::Context->userenv->{'branch'}); |
1567 |
$item_object->itemlost(0); |
1569 |
$item_object->itemlost(0); |
1568 |
$item_object->onloan($datedue->ymd()); |
1570 |
$item_object->onloan($datedue->ymd()); |
1569 |
$item_object->make_column_dirty('onloan'); # Force write onloan so we don't need to fetch from db |
|
|
1570 |
$item_object->datelastborrowed( dt_from_string()->ymd() ); |
1571 |
$item_object->datelastborrowed( dt_from_string()->ymd() ); |
1571 |
$item_object->datelastseen( dt_from_string()->ymd() ); |
1572 |
$item_object->datelastseen( dt_from_string()->ymd() ); |
1572 |
$item_object->store({log_action => 0}); |
1573 |
$item_object->store({log_action => 0}); |
1573 |
- |
|
|