From dea4ddb5bd860e449fea34d9ad2c28c7c4ad7718 Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Fri, 31 Jan 2014 13:56:47 -0500 Subject: [PATCH] Bug 11629: (follow-up) Add message for librarian that status was updated Signed-off-by: Katrin Fischer Signed-off-by: Galen Charlton --- C4/Circulation.pm | 1 + circ/returns.pl | 3 +++ koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt | 8 ++++++++ 3 files changed, 12 insertions(+) diff --git a/C4/Circulation.pm b/C4/Circulation.pm index a001762fd3..6b700ec5b9 100644 --- a/C4/Circulation.pm +++ b/C4/Circulation.pm @@ -1767,6 +1767,7 @@ sub AddReturn { else { foreach my $key ( keys %$rules ) { if ( $item->{notforloan} eq $key ) { + $messages->{'NotForLoanStatusUpdated'} = { from => $item->{notforloan}, to => $rules->{$key} }; ModItem( { notforloan => $rules->{$key} }, undef, $itemnumber ); last; } diff --git a/circ/returns.pl b/circ/returns.pl index 6daddc4c54..a95a17ca85 100755 --- a/circ/returns.pl +++ b/circ/returns.pl @@ -504,6 +504,9 @@ foreach my $code ( keys %$messages ) { elsif ( $code eq 'PrevDebarred' ) { $err{prevdebarred} = $messages->{'PrevDebarred'}; } + elsif ( $code eq 'NotForLoanStatusUpdated' ) { + $err{NotForLoanStatusUpdated} = $messages->{NotForLoanStatusUpdated}; + } 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 4daf60129a..eaa6256975 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt @@ -2,6 +2,7 @@ [% USE Branches %] [% USE Koha %] [% USE Borrowers %] +[% USE AuthorisedValues %] [% INCLUDE 'doc-head-open.inc' %] Koha › Circulation › Check in [% title |html %] @@ -371,6 +372,13 @@ $(document).ready(function () {

Check in message

[% FOREACH errmsgloo IN errmsgloop %] + [% IF ( errmsgloo.NotForLoanStatusUpdated ) %] +

+ Not for loan status updated + from [% AuthorisedValues.GetByCode( 'NOT_LOAN', errmsgloo.NotForLoanStatusUpdated.from ) %] + to [% AuthorisedValues.GetByCode( 'NOT_LOAN', errmsgloo.NotForLoanStatusUpdated.to ) %] +

+ [% END %] [% IF ( errmsgloo.badbarcode ) %]

No item with barcode: [% errmsgloo.msg %]

[% END %] -- 2.20.1