From: Dan Scott Date: Sat, 9 Mar 2013 03:41:08 +0000 (-0500) Subject: Show OPAC-invisible copies in TPAC in staff context X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=e63f10e8cae413188af0055b6b80ea42ea901225;p=evergreen%2Fequinox.git Show OPAC-invisible copies in TPAC in staff context We were not calling the staff variation of the copy count method; thus, the record details template was skipping the copy table in the event that all copies for a given record were marked as OPAC-invisible via either copy visibility or shelving location visibility. Signed-off-by: Dan Scott Signed-off-by: Ben Shum --- diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Record.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Record.pm index a4af2c657f..7421857c4a 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Record.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Record.pm @@ -378,10 +378,14 @@ sub prepare_browse_call_numbers { sub get_hold_copy_summary { my ($self, $rec_id, $org) = @_; - + my $search = OpenSRF::AppSession->create('open-ils.search'); - my $req1 = $search->request( - 'open-ils.search.biblio.record.copy_count', $org, $rec_id); + my $copy_count_meth = 'open-ils.search.biblio.record.copy_count'; + # We want to include OPAC-invisible copies in a staff context + if ($self->ctx->{is_staff}) { + $copy_count_meth .= '.staff'; + } + my $req1 = $search->request($copy_count_meth, $org, $rec_id); $self->ctx->{record_hold_count} = $U->simplereq( 'open-ils.circ', 'open-ils.circ.bre.holds.count', $rec_id);