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

(-)a/Koha/Item.pm (-1 / +21 lines)
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) {
(-)a/circ/returns.pl (+2 lines)
Lines 383-388 if ($barcode) { Link Here
383
            for my $missing_item ( keys %{$expected_items} ) {
383
            for my $missing_item ( keys %{$expected_items} ) {
384
                my $bundle_item = $expected_items->{$missing_item};
384
                my $bundle_item = $expected_items->{$missing_item};
385
                $bundle_item->itemlost($BundleLostValue)->store();
385
                $bundle_item->itemlost($BundleLostValue)->store();
386
                $bundle_item->_result->update_or_create_related(
387
                    'items_lost_issue', { issue_id => $checkout->issue_id } );
386
                push @missing_items, $bundle_item;
388
                push @missing_items, $bundle_item;
387
            }
389
            }
388
            $template->param(
390
            $template->param(
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt (-1 / +3 lines)
Lines 455-460 Note that permanent location is a code, and location may be an authval. Link Here
455
                            [% ELSE %]
455
                            [% ELSE %]
456
                                <span class="lost">Unavailable (lost or missing)</span>
456
                                <span class="lost">Unavailable (lost or missing)</span>
457
                            [% END %]
457
                            [% END %]
458
                            [% IF ( item.itemlost == Koha.Preference('BundleLostValue') AND item.loss_checkout ) %]
459
                                <span class="lost">Lost by [% INCLUDE 'patron-title.inc' patron=item.loss_checkout.patron hide_patron_infos_if_needed=1 %]</span>
460
                            [% END %]
458
                        [% END %]
461
                        [% END %]
459
462
460
                        [% IF ( item.withdrawn ) %]
463
                        [% IF ( item.withdrawn ) %]
461
- 

Return to bug 24454