Bugzilla – Attachment 93065 Details for
Bug 14697
Extend and enhance "Claims returned" lost status
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 14697: Show an item has unresolved claims on checkin
Bug-14697-Show-an-item-has-unresolved-claims-on-ch.patch (text/plain), 4.36 KB, created by
Kyle M Hall (khall)
on 2019-09-20 21:13:30 UTC
(
hide
)
Description:
Bug 14697: Show an item has unresolved claims on checkin
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2019-09-20 21:13:30 UTC
Size:
4.36 KB
patch
obsolete
>From 9659ad969355bed1db7d0baa48bd0c0e7604c795 Mon Sep 17 00:00:00 2001 >From: Andrew <andrew@bywatersolutions.com> >Date: Fri, 20 Sep 2019 18:18:13 +0000 >Subject: [PATCH] Bug 14697: Show an item has unresolved claims on checkin > >Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> > >Signed-off-by: Lisette Scheer <lisetteslatah@gmail.com> >--- > C4/Circulation.pm | 14 ++++++++++++++ > Koha/Checkouts/ReturnClaim.pm | 12 ++++++++++++ > circ/returns.pl | 4 +++- > .../prog/en/modules/circ/returns.tt | 19 +++++++++++++++++++ > 4 files changed, 48 insertions(+), 1 deletion(-) > >diff --git a/C4/Circulation.pm b/C4/Circulation.pm >index e346e2dfd6..ca870377aa 100644 >--- a/C4/Circulation.pm >+++ b/C4/Circulation.pm >@@ -60,6 +60,7 @@ use Koha::Account::Offsets; > use Koha::Config::SysPrefs; > use Koha::Charges::Fees; > use Koha::Util::SystemPreferences; >+use Koha::Checkouts::ReturnClaims; > use Carp; > use List::MoreUtils qw( uniq any ); > use Scalar::Util qw( looks_like_number ); >@@ -2120,6 +2121,19 @@ sub AddReturn { > } > } > >+ if ( C4::Context->preference('ClaimReturnedLostValue') ) { >+ my $claims = Koha::Checkouts::ReturnClaims->search( >+ { >+ itemnumber => $item->id, >+ resolution => undef, >+ } >+ ); >+ >+ if ( $claims->count ) { >+ $messages->{ReturnClaims} = $claims; >+ } >+ } >+ > return ( $doreturn, $messages, $issue, ( $patron ? $patron->unblessed : {} )); > } > >diff --git a/Koha/Checkouts/ReturnClaim.pm b/Koha/Checkouts/ReturnClaim.pm >index 3fff2e6608..de014bd627 100644 >--- a/Koha/Checkouts/ReturnClaim.pm >+++ b/Koha/Checkouts/ReturnClaim.pm >@@ -23,6 +23,7 @@ use base qw(Koha::Object); > > use Koha::Checkouts; > use Koha::Old::Checkouts; >+use Koha::Patrons; > > =head1 NAME > >@@ -48,6 +49,17 @@ sub checkout { > return Koha::Old::Checkout->_new_from_dbic( $old_issue ) if $old_issue; > } > >+=head3 patron >+ >+=cut >+ >+sub patron { >+ my ( $self ) = @_; >+ >+ my $borrower = $self->_result->borrowernumber; >+ return Koha::Patron->_new_from_dbic( $borrower ) if $borrower; >+} >+ > =head3 _type > > =cut >diff --git a/circ/returns.pl b/circ/returns.pl >index 657229a10e..35872d1e5b 100755 >--- a/circ/returns.pl >+++ b/circ/returns.pl >@@ -542,7 +542,9 @@ foreach my $code ( keys %$messages ) { > elsif ( $code eq 'DataCorrupted' ) { > $err{data_corrupted} = 1; > } >- else { >+ elsif ( $code eq 'ReturnClaims' ) { >+ $template->param( ReturnClaims => $messages->{ReturnClaims} ); >+ } else { > die "Unknown error code $code"; # note we need all the (empty) elsif's above, or we die. > # This forces the issue of staying in sync w/ Circulation.pm > } >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt >index 42d7a19089..98cd097937 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt >@@ -166,6 +166,25 @@ > </div> > [% END %] > >+ <!-- Item has return claim(s) --> >+ [% IF ( ReturnClaims ) %] >+ <div class="dialog alert return-claim"> >+ <h3> >+ This item has been claimed as returned by: >+ <ul> >+ [% FOREACH rc IN ReturnClaims %] >+ [% SET patron = rc.patron %] >+ <li> >+ <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% patron.borrowernumber | uri %]"> >+ [% patron.firstname | html %] [% patron.surname | html %] >+ </a> >+ </li> >+ [% END %] >+ </ul> >+ </h3> >+ </div> >+ [% END %] >+ > <!-- Patron has waiting holds --> > [% IF ( waiting_holds ) %] > <div id="awaiting-pickup" class="dialog message"> >-- >2.20.1 (Apple Git-117)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 14697
:
92407
|
92408
|
92409
|
92410
|
92962
|
92963
|
92964
|
92965
|
93005
|
93006
|
93007
|
93008
|
93012
|
93013
|
93014
|
93015
|
93017
|
93038
|
93039
|
93040
|
93041
|
93042
|
93061
|
93062
|
93063
|
93064
|
93065
|
93952
|
93953
|
93954
|
93955
|
93956
|
93957
|
93959
|
94842
|
94843
|
94844
|
94845
|
94846
|
94847
|
94848
|
94849
|
94850
|
94851
|
94852
|
94853
|
94854
|
94857
|
94877
|
94878