From 96a70655aac0c96b82a77dd1e71eee7858d7a274 Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Sat, 1 May 2010 14:02:32 -0400 Subject: [PATCH] bug 4396: clarify return of itemtype-level notforloan flag * GetItemsInfo now includes a notforloan_per_itemtype key with the value of the item type's notforloan setting, correctly set based on the value of the item-level_itypes syspref * Adjusted OPAC details item status display to use that notforloan_per_itemtype key NOTE: one of the assumptions of item-level_itypes is that you can have either bib-level item types or item-level item types, but not both in the same database. In particular, it does not establish a hierarchy where Koha checks the item-level itemtype first, then the bib-level. Signed-off-by: Galen Charlton --- C4/Items.pm | 2 +- koha-tmpl/opac-tmpl/prog/en/includes/item-status.inc | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/C4/Items.pm b/C4/Items.pm index ee6bf3a7ff..2969c9bcb1 100644 --- a/C4/Items.pm +++ b/C4/Items.pm @@ -1272,6 +1272,7 @@ sub GetItemsInfo { biblioitems.url, items.notforloan as itemnotforloan, itemtypes.description, + itemtypes.notforloan as notforloan_per_itemtype, branchurl FROM items LEFT JOIN branches ON items.homebranch = branches.branchcode @@ -1355,7 +1356,6 @@ sub GetItemsInfo { my ($lib) = $sthnflstatus->fetchrow; $data->{notforloanvalue} = $lib; } - $data->{itypenotforloan} = $data->{notforloan} if (C4::Context->preference('item-level_itypes')); # my stack procedures my $stackstatus = $dbh->prepare( diff --git a/koha-tmpl/opac-tmpl/prog/en/includes/item-status.inc b/koha-tmpl/opac-tmpl/prog/en/includes/item-status.inc index f242f0191d..af71a99f80 100644 --- a/koha-tmpl/opac-tmpl/prog/en/includes/item-status.inc +++ b/koha-tmpl/opac-tmpl/prog/en/includes/item-status.inc @@ -1,6 +1,4 @@ - - Not for loan () - + Not for loan () -- 2.39.5