From c6dca44a2cf6f5619b02d28076d3982fb8e78e94 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 --- koha-tmpl/intranet-tmpl/prog/en/includes/strings.inc | 1 + koha-tmpl/intranet-tmpl/prog/js/holds.js | 4 ++++ svc/holds | 6 ++++++ 3 files changed, 11 insertions(+) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/strings.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/strings.inc index 5ef174db7c..eaae671667 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/strings.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/strings.inc @@ -30,6 +30,7 @@ var HOLD_IS_SUSPENDED = _("Hold is suspended"); var UNTIL = _("until %s"); var NEXT_AVAILABLE_ITYPE = _("Next available %s item"); + var NEXT_AVAILABLE_VOLUME = _("Next available volume %s item"); var ITEM_IS_WAITING = _("Item is waiting"); var ITEM_IS_WAITING_HERE = _("Item is waiting here"); var AT = _("at %s"); diff --git a/koha-tmpl/intranet-tmpl/prog/js/holds.js b/koha-tmpl/intranet-tmpl/prog/js/holds.js index 41d47624e0..da6d41082c 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/holds.js +++ b/koha-tmpl/intranet-tmpl/prog/js/holds.js @@ -153,6 +153,10 @@ $(document).ready(function() { data += NEXT_AVAILABLE_ITYPE.format( oObj.itemtype_limit ); } + if ( oObj.volume_id ) { + data += NEXT_AVAILABLE_VOLUME.format( oObj.volume_description ); + } + if ( oObj.barcode ) { data += ""; if ( oObj.found == "W" ) { diff --git a/svc/holds b/svc/holds index af1b033063..ca81992821 100755 --- a/svc/holds +++ b/svc/holds @@ -70,6 +70,7 @@ my $borrower; my @holds; while ( my $h = $holds_rs->next() ) { my $item = $h->item(); + my $volume = $h->volume(); my $biblionumber = $h->biblio()->biblionumber(); @@ -148,6 +149,11 @@ while ( my $h = $holds_rs->next() ) { } } + if ($volume) { + $hold->{volume_id} = $volume->id; + $hold->{volume_description} = $volume->description; + } + push( @holds, $hold ); } -- 2.21.1 (Apple Git-122.3)