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

(-)a/C4/Circulation.pm (+14 lines)
Lines 60-65 use Koha::Account::Offsets; Link Here
60
use Koha::Config::SysPrefs;
60
use Koha::Config::SysPrefs;
61
use Koha::Charges::Fees;
61
use Koha::Charges::Fees;
62
use Koha::Util::SystemPreferences;
62
use Koha::Util::SystemPreferences;
63
use Koha::Checkouts::ReturnClaims;
63
use Carp;
64
use Carp;
64
use List::MoreUtils qw( uniq any );
65
use List::MoreUtils qw( uniq any );
65
use Scalar::Util qw( looks_like_number );
66
use Scalar::Util qw( looks_like_number );
Lines 2120-2125 sub AddReturn { Link Here
2120
        }
2121
        }
2121
    }
2122
    }
2122
2123
2124
    if ( C4::Context->preference('ClaimReturnedLostValue') ) {
2125
        my $claims = Koha::Checkouts::ReturnClaims->search(
2126
           {
2127
               itemnumber => $item->id,
2128
               resolution => undef,
2129
           }
2130
        );
2131
2132
        if ( $claims->count ) {
2133
            $messages->{ReturnClaims} = $claims;
2134
        }
2135
    }
2136
2123
    return ( $doreturn, $messages, $issue, ( $patron ? $patron->unblessed : {} ));
2137
    return ( $doreturn, $messages, $issue, ( $patron ? $patron->unblessed : {} ));
2124
}
2138
}
2125
2139
(-)a/Koha/Checkouts/ReturnClaim.pm (+12 lines)
Lines 23-28 use base qw(Koha::Object); Link Here
23
23
24
use Koha::Checkouts;
24
use Koha::Checkouts;
25
use Koha::Old::Checkouts;
25
use Koha::Old::Checkouts;
26
use Koha::Patrons;
26
27
27
=head1 NAME
28
=head1 NAME
28
29
Lines 48-53 sub checkout { Link Here
48
    return Koha::Old::Checkout->_new_from_dbic( $old_issue ) if $old_issue;
49
    return Koha::Old::Checkout->_new_from_dbic( $old_issue ) if $old_issue;
49
}
50
}
50
51
52
=head3 patron
53
54
=cut
55
56
sub patron {
57
    my ( $self ) = @_;
58
59
    my $borrower = $self->_result->borrowernumber;
60
    return Koha::Patron->_new_from_dbic( $borrower ) if $borrower;
61
}
62
51
=head3 _type
63
=head3 _type
52
64
53
=cut
65
=cut
(-)a/circ/returns.pl (-1 / +3 lines)
Lines 542-548 foreach my $code ( keys %$messages ) { Link Here
542
    elsif ( $code eq 'DataCorrupted' ) {
542
    elsif ( $code eq 'DataCorrupted' ) {
543
        $err{data_corrupted} = 1;
543
        $err{data_corrupted} = 1;
544
    }
544
    }
545
    else {
545
    elsif ( $code eq 'ReturnClaims' ) {
546
        $template->param( ReturnClaims => $messages->{ReturnClaims} );
547
    } else {
546
        die "Unknown error code $code";    # note we need all the (empty) elsif's above, or we die.
548
        die "Unknown error code $code";    # note we need all the (empty) elsif's above, or we die.
547
        # This forces the issue of staying in sync w/ Circulation.pm
549
        # This forces the issue of staying in sync w/ Circulation.pm
548
    }
550
    }
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt (-1 / +19 lines)
Lines 166-171 Link Here
166
                            </div>
166
                            </div>
167
                        [% END %]
167
                        [% END %]
168
168
169
                        <!-- Item has return claim(s) -->
170
                        [% IF ( ReturnClaims ) %]
171
                            <div class="dialog alert return-claim">
172
                                <h3>
173
                                    This item has been claimed as returned by:
174
                                    <ul>
175
                                    [% FOREACH rc IN ReturnClaims %]
176
                                        [% SET patron = rc.patron %]
177
                                        <li>
178
                                            <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% patron.borrowernumber | uri %]">
179
                                                [% patron.firstname | html %] [% patron.surname | html %]
180
                                            </a>
181
                                        </li>
182
                                    [% END %]
183
                                    </ul>
184
                                </h3>
185
                            </div>
186
                        [% END %]
187
169
                        <!-- Patron has waiting holds -->
188
                        <!-- Patron has waiting holds -->
170
                        [% IF ( waiting_holds ) %]
189
                        [% IF ( waiting_holds ) %]
171
                            <div id="awaiting-pickup" class="dialog message">
190
                            <div id="awaiting-pickup" class="dialog message">
172
- 

Return to bug 14697