Bug 11629: (follow-up) Add message for librarian that status was updated
authorKyle M Hall <kyle@bywatersolutions.com>
Fri, 31 Jan 2014 18:56:47 +0000 (13:56 -0500)
committerGalen Charlton <gmc@esilibrary.com>
Mon, 26 May 2014 03:23:37 +0000 (03:23 +0000)
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
C4/Circulation.pm
circ/returns.pl
koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt

index a001762..6b700ec 100644 (file)
@@ -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;
                 }
index 6daddc4..a95a17c 100755 (executable)
@@ -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
index 4daf601..eaa6256 100644 (file)
@@ -2,6 +2,7 @@
 [% USE Branches %]
 [% USE Koha %]
 [% USE Borrowers %]
+[% USE AuthorisedValues %]
 
 [% INCLUDE 'doc-head-open.inc' %]
 <title>Koha &rsaquo; Circulation &rsaquo; Check in [% title |html %]</title>
@@ -371,6 +372,13 @@ $(document).ready(function () {
     <div class="dialog alert">
         <h3>Check in message</h3>
         [% FOREACH errmsgloo IN errmsgloop %]
+                    [% IF ( errmsgloo.NotForLoanStatusUpdated ) %]
+                        <p class="problem">
+                            Not for loan status updated
+                            from <strong>[% AuthorisedValues.GetByCode( 'NOT_LOAN', errmsgloo.NotForLoanStatusUpdated.from ) %]</strong>
+                            to <strong>[% AuthorisedValues.GetByCode( 'NOT_LOAN', errmsgloo.NotForLoanStatusUpdated.to ) %]</strong>
+                        </p>
+                    [% END %]
                     [% IF ( errmsgloo.badbarcode ) %]
                         <p class="problem">No item with barcode: [% errmsgloo.msg %]</p>
                     [% END %]