From 24d9ff95c853f82c4ac31e245e4d8e4c8220ef4e Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Thu, 26 Mar 2020 09:24:49 -0400 Subject: [PATCH] Bug 24860: Add hold's volume to holds table on circulation.pl and moremember.pl Signed-off-by: Andrew Fuerste-Henry Signed-off-by: Rebecca Coert --- koha-tmpl/intranet-tmpl/prog/js/holds.js | 4 ++++ svc/holds | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/koha-tmpl/intranet-tmpl/prog/js/holds.js b/koha-tmpl/intranet-tmpl/prog/js/holds.js index 66dd265a14..ad16f3fad7 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/holds.js +++ b/koha-tmpl/intranet-tmpl/prog/js/holds.js @@ -155,6 +155,10 @@ $(document).ready(function() { data += __("Next available %s item").format(oObj.itemtype_limit); } + if ( oObj.volume_id ) { + data += _("Next available volume %s item").format( oObj.volume_description ); + } + if ( oObj.barcode ) { data += ""; if ( oObj.found == "W" ) { diff --git a/svc/holds b/svc/holds index 5e0a9d91fb..6442a9b2b2 100755 --- a/svc/holds +++ b/svc/holds @@ -69,6 +69,7 @@ my $holds_rs = Koha::Holds->search( my @holds; while ( my $h = $holds_rs->next() ) { my $item = $h->item(); + my $volume = $h->volume(); my $biblionumber = $h->biblio()->biblionumber(); @@ -154,6 +155,11 @@ while ( my $h = $holds_rs->next() ) { } } + if ($volume) { + $hold->{volume_id} = $volume->id; + $hold->{volume_description} = $volume->description; + } + push( @holds, $hold ); } -- 2.24.1 (Apple Git-126)