From 533fbac2b25383e8d5a011c252c913201b6d250f 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 --- 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 26aed46765..196b26c09c 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/strings.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/strings.inc @@ -31,6 +31,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 37254b6407..b6c5279364 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(); @@ -147,6 +148,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)