Lines 411-416
sub last_checkout {
Link Here
|
411 |
return Koha::Old::Checkout->_new_from_dbic( $checkout_rs ); |
411 |
return Koha::Old::Checkout->_new_from_dbic( $checkout_rs ); |
412 |
} |
412 |
} |
413 |
|
413 |
|
|
|
414 |
=head3 loss_checkout |
415 |
|
416 |
my $loss_checkout = $item->loss_checkout; |
417 |
|
418 |
Return the old checkout from which this item was marked as lost |
419 |
|
420 |
=cut |
421 |
|
422 |
sub loss_checkout { |
423 |
my ( $self ) = @_; |
424 |
my $items_lost_issue_rs = $self->_result->items_lost_issue; |
425 |
return unless $items_lost_issue_rs; |
426 |
my $issue_rs = $items_lost_issue_rs->issue; |
427 |
return unless $issue_rs; |
428 |
return Koha::Old::Checkout->_new_from_dbic( $issue_rs ); |
429 |
} |
430 |
|
414 |
=head3 holds |
431 |
=head3 holds |
415 |
|
432 |
|
416 |
my $holds = $item->holds(); |
433 |
my $holds = $item->holds(); |
Lines 972-978
Internal function, not exported, called only by Koha::Item->store.
Link Here
|
972 |
sub _set_found_trigger { |
989 |
sub _set_found_trigger { |
973 |
my ( $self, $pre_mod_item ) = @_; |
990 |
my ( $self, $pre_mod_item ) = @_; |
974 |
|
991 |
|
975 |
## If item was lost, it has now been found, reverse any list item charges if necessary. |
992 |
# If item was lost, it has now been found |
|
|
993 |
$self->_result->items_lost_issue->delete; |
994 |
|
995 |
# Reverse any lost item charges if necessary. |
976 |
my $no_refund_after_days = |
996 |
my $no_refund_after_days = |
977 |
C4::Context->preference('NoRefundOnLostReturnedItemsAge'); |
997 |
C4::Context->preference('NoRefundOnLostReturnedItemsAge'); |
978 |
if ($no_refund_after_days) { |
998 |
if ($no_refund_after_days) { |