From d3b087cd5b6a709166a66010d255d133129f5d7d Mon Sep 17 00:00:00 2001 From: Wainui Witika-Park Date: Wed, 20 Mar 2024 18:06:02 +1300 Subject: [PATCH] Bug 36366: Itemtype can be used in XSLT Sponsored-by: Catalyst IT --- C4/XSLT.pm | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/C4/XSLT.pm b/C4/XSLT.pm index 458d732d23c..0057b9def60 100644 --- a/C4/XSLT.pm +++ b/C4/XSLT.pm @@ -354,6 +354,12 @@ sub buildKohaItemsNamespace { else { $status = "available"; } + + my $itemtype; + if ( exists $itemtypes->{ $item->effective_itemtype } ) { + $itemtype = $item->effective_itemtype; + } + my $homebranch = C4::Koha::xml_escape($branches{$item->homebranch}); my $holdingbranch = C4::Koha::xml_escape($branches{$item->holdingbranch}); my $resultbranch = C4::Context->preference('OPACResultsLibrary') eq 'homebranch' ? $homebranch : $holdingbranch; @@ -372,6 +378,7 @@ sub buildKohaItemsNamespace { . "$substatus" . "$itemcallnumber" . "$stocknumber" + . "$itemtype" . ""; } $xml = "".$xml.""; -- 2.30.2