Bug 19287: Do not display buttons for biblio level holds
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Mon, 9 Apr 2018 18:08:42 +0000 (15:08 -0300)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Mon, 23 Apr 2018 15:56:05 +0000 (12:56 -0300)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
circ/pendingreserves.pl
koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingreserves.tt

index 6f47a31..5e6418b 100755 (executable)
@@ -177,7 +177,7 @@ my $strsth =
                     ORDER BY items.itemnumber SEPARATOR '|') l_holdingbranch,
             reserves.biblionumber,
             reserves.branchcode as l_branch,
-            items.itemnumber,
+            reserves.itemnumber,
             items.holdingbranch,
             items.homebranch,
             GROUP_CONCAT(DISTINCT items.itype 
index f56bd81..ccac35f 100644 (file)
@@ -36,7 +36,7 @@
                 [% CASE 'hold_cancelled' %]
                     <span>The hold has been correctly cancelled.</span>
                 [% CASE 'hold_placed_at_biblio_level' %]
-                    <span>The hold has been placed at biblio level. It is not possible to mark it as lost.</span>
+                    <span>The hold has been placed on biblio level. It is not possible to determine the item to mark as lost.</span>
                 [% CASE %]
                     [% m.code %]
                 [% END %]
             </form>
 
         [% IF Koha.Preference('CanMarkHoldsToPullAsLost') != 'do_not_allow' %]
-            <form name="cancelReserve" action="/cgi-bin/koha/circ/pendingreserves.pl" method="post">
-                <input type="hidden" name="reserve_id" value="[% reserveloo.reserve_id %]" />
-                [% IF Koha.Preference('CanMarkHoldsToPullAsLost') == 'allow' %]
-                    <input type="hidden" name="op" value="mark_as_lost" />
-                    <input type="submit" value="Mark item as lost" />
-                [% ELSIF Koha.Preference('CanMarkHoldsToPullAsLost') == 'allow_and_notify' %]
-                    <input type="hidden" name="op" value="mark_as_lost_and_notify" />
-                    <input type="submit" value="Mark item as lost and notify the patron" />
-                [% END %]
-            </form>
+            [% IF reserveloo.itemnumber %]
+                <form name="cancelReserve" action="/cgi-bin/koha/circ/pendingreserves.pl" method="post">
+                    <input type="hidden" name="reserve_id" value="[% reserveloo.reserve_id %]" />
+                    [% IF Koha.Preference('CanMarkHoldsToPullAsLost') == 'allow' %]
+                        <input type="hidden" name="op" value="mark_as_lost" />
+                        <input type="submit" value="Mark item as lost" />
+                    [% ELSIF Koha.Preference('CanMarkHoldsToPullAsLost') == 'allow_and_notify' %]
+                        <input type="hidden" name="op" value="mark_as_lost_and_notify" />
+                        <input type="submit" value="Mark item as lost and notify the patron" />
+                    [% END %]
+                </form>
+            [% ELSE %]
+                <span>Biblio level hold.</span>
+            [% END %]
         [% END %]
         </tr>
         [% END %]