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

(-)a/Koha/Item.pm (-1 / +21 lines)
Lines 413-418 sub last_checkout { Link Here
413
    return Koha::Old::Checkout->_new_from_dbic( $checkout_rs );
413
    return Koha::Old::Checkout->_new_from_dbic( $checkout_rs );
414
}
414
}
415
415
416
=head3 loss_checkout
417
418
  my $loss_checkout = $item->loss_checkout;
419
420
Return the old checkout from which this item was marked as lost
421
422
=cut
423
424
sub loss_checkout {
425
    my ( $self ) = @_;
426
    my $items_lost_issue_rs = $self->_result->items_lost_issue;
427
    return unless $items_lost_issue_rs;
428
    my $issue_rs = $items_lost_issue_rs->issue;
429
    return unless $issue_rs;
430
    return Koha::Old::Checkout->_new_from_dbic( $issue_rs );
431
}
432
416
=head3 holds
433
=head3 holds
417
434
418
my $holds = $item->holds();
435
my $holds = $item->holds();
Lines 1051-1057 Internal function, not exported, called only by Koha::Item->store. Link Here
1051
sub _set_found_trigger {
1068
sub _set_found_trigger {
1052
    my ( $self, $pre_mod_item ) = @_;
1069
    my ( $self, $pre_mod_item ) = @_;
1053
1070
1054
    ## If item was lost, it has now been found, reverse any list item charges if necessary.
1071
    # If item was lost, it has now been found
1072
    $self->_result->items_lost_issue->delete;
1073
1074
    # Reverse any lost item charges if necessary.
1055
    my $no_refund_after_days =
1075
    my $no_refund_after_days =
1056
      C4::Context->preference('NoRefundOnLostReturnedItemsAge');
1076
      C4::Context->preference('NoRefundOnLostReturnedItemsAge');
1057
    if ($no_refund_after_days) {
1077
    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 28854