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

(-)a/Koha/Item.pm (-1 / +21 lines)
Lines 414-419 sub last_checkout { Link Here
414
    return Koha::Old::Checkout->_new_from_dbic( $checkout_rs );
414
    return Koha::Old::Checkout->_new_from_dbic( $checkout_rs );
415
}
415
}
416
416
417
=head3 loss_checkout
418
419
  my $loss_checkout = $item->loss_checkout;
420
421
Return the old checkout from which this item was marked as lost
422
423
=cut
424
425
sub loss_checkout {
426
    my ( $self ) = @_;
427
    my $items_lost_issue_rs = $self->_result->items_lost_issue;
428
    return unless $items_lost_issue_rs;
429
    my $issue_rs = $items_lost_issue_rs->issue;
430
    return unless $issue_rs;
431
    return Koha::Old::Checkout->_new_from_dbic( $issue_rs );
432
}
433
417
=head3 holds
434
=head3 holds
418
435
419
my $holds = $item->holds();
436
my $holds = $item->holds();
Lines 1087-1093 Internal function, not exported, called only by Koha::Item->store. Link Here
1087
sub _set_found_trigger {
1104
sub _set_found_trigger {
1088
    my ( $self, $pre_mod_item ) = @_;
1105
    my ( $self, $pre_mod_item ) = @_;
1089
1106
1090
    ## If item was lost, it has now been found, reverse any list item charges if necessary.
1107
    # If item was lost, it has now been found
1108
    $self->_result->items_lost_issue->delete;
1109
1110
    # Reverse any lost item charges if necessary.
1091
    my $no_refund_after_days =
1111
    my $no_refund_after_days =
1092
      C4::Context->preference('NoRefundOnLostReturnedItemsAge');
1112
      C4::Context->preference('NoRefundOnLostReturnedItemsAge');
1093
    if ($no_refund_after_days) {
1113
    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 451-456 Note that permanent location is a code, and location may be an authval. Link Here
451
                            [% ELSE %]
451
                            [% ELSE %]
452
                                <span class="lost">Unavailable (lost or missing)</span>
452
                                <span class="lost">Unavailable (lost or missing)</span>
453
                            [% END %]
453
                            [% END %]
454
                            [% IF ( item.itemlost == Koha.Preference('BundleLostValue') AND item.loss_checkout ) %]
455
                                <span class="lost">Lost by [% INCLUDE 'patron-title.inc' patron=item.loss_checkout.patron hide_patron_infos_if_needed=1 %]</span>
456
                            [% END %]
454
                        [% END %]
457
                        [% END %]
455
458
456
                        [% IF ( item.withdrawn ) %]
459
                        [% IF ( item.withdrawn ) %]
457
- 

Return to bug 28854