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 2121-2126 sub AddReturn { Link Here
2121
        }
2122
        }
2122
    }
2123
    }
2123
2124
2125
    if ( C4::Context->preference('ClaimReturnedLostValue') ) {
2126
        my $claims = Koha::Checkouts::ReturnClaims->search(
2127
           {
2128
               itemnumber => $item->id,
2129
               resolution => undef,
2130
           }
2131
        );
2132
2133
        if ( $claims->count ) {
2134
            $messages->{ReturnClaims} = $claims;
2135
        }
2136
    }
2137
2124
    return ( $doreturn, $messages, $issue, ( $patron ? $patron->unblessed : {} ));
2138
    return ( $doreturn, $messages, $issue, ( $patron ? $patron->unblessed : {} ));
2125
}
2139
}
2126
2140
(-)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 156-161 Link Here
156
                                </div>
156
                                </div>
157
                            [% END %]
157
                            [% END %]
158
158
159
							<!-- Item has return claim(s) -->
160
							[% IF ( ReturnClaims ) %]
161
								<div class="dialog alert return-claim">
162
									<h3>
163
										This item has been claimed as returned by:
164
										<ul>
165
										[% FOREACH rc IN ReturnClaims %]
166
											[% SET patron = rc.patron %]
167
											<li>
168
												<a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% patron.borrowernumber | uri %]">
169
													[% patron.firstname | html %] [% patron.surname | html %]
170
												</a>
171
											</li>
172
										[% END %]
173
										</ul>
174
									</h3>
175
								</div>
176
							[% END %]
177
159
                            <!-- Patron has waiting holds -->
178
                            <!-- Patron has waiting holds -->
160
                            [% IF ( waiting_holds ) %]
179
                            [% IF ( waiting_holds ) %]
161
                                <div id="awaiting-pickup" class="dialog message">
180
                                <div id="awaiting-pickup" class="dialog message">
162
- 

Return to bug 14697