Lines 146-153
my $hostrecords;
Link Here
|
146 |
# adding items linked via host biblios |
146 |
# adding items linked via host biblios |
147 |
my @hostitems = GetHostItemsInfo($record); |
147 |
my @hostitems = GetHostItemsInfo($record); |
148 |
if (@hostitems){ |
148 |
if (@hostitems){ |
149 |
$hostrecords =1; |
149 |
$hostrecords =1; |
150 |
push (@items,@hostitems); |
150 |
push (@items,@hostitems); |
151 |
} |
151 |
} |
152 |
|
152 |
|
153 |
my $dat = &GetBiblioData($biblionumber); |
153 |
my $dat = &GetBiblioData($biblionumber); |
Lines 159-165
my @subs;
Link Here
|
159 |
|
159 |
|
160 |
foreach my $subscription (@subscriptions) { |
160 |
foreach my $subscription (@subscriptions) { |
161 |
my %cell; |
161 |
my %cell; |
162 |
my $serials_to_display; |
162 |
my $serials_to_display; |
163 |
$cell{subscriptionid} = $subscription->{subscriptionid}; |
163 |
$cell{subscriptionid} = $subscription->{subscriptionid}; |
164 |
$cell{subscriptionnotes} = $subscription->{internalnotes}; |
164 |
$cell{subscriptionnotes} = $subscription->{internalnotes}; |
165 |
$cell{missinglist} = $subscription->{missinglist}; |
165 |
$cell{missinglist} = $subscription->{missinglist}; |
Lines 169-183
foreach my $subscription (@subscriptions) {
Link Here
|
169 |
$cell{callnumber} = $subscription->{callnumber}; |
169 |
$cell{callnumber} = $subscription->{callnumber}; |
170 |
$cell{closed} = $subscription->{closed}; |
170 |
$cell{closed} = $subscription->{closed}; |
171 |
#get the three latest serials. |
171 |
#get the three latest serials. |
172 |
$serials_to_display = $subscription->{staffdisplaycount}; |
172 |
$serials_to_display = $subscription->{staffdisplaycount}; |
173 |
$serials_to_display = C4::Context->preference('StaffSerialIssueDisplayCount') unless $serials_to_display; |
173 |
$serials_to_display = C4::Context->preference('StaffSerialIssueDisplayCount') unless $serials_to_display; |
174 |
$cell{staffdisplaycount} = $serials_to_display; |
174 |
$cell{staffdisplaycount} = $serials_to_display; |
175 |
$cell{latestserials} = |
175 |
$cell{latestserials} = GetLatestSerials( $subscription->{subscriptionid}, $serials_to_display ); |
176 |
GetLatestSerials( $subscription->{subscriptionid}, $serials_to_display ); |
|
|
177 |
push @subs, \%cell; |
176 |
push @subs, \%cell; |
178 |
} |
177 |
} |
179 |
|
178 |
|
180 |
|
|
|
181 |
# Get acquisition details |
179 |
# Get acquisition details |
182 |
if ( C4::Context->preference('AcquisitionDetails') ) { |
180 |
if ( C4::Context->preference('AcquisitionDetails') ) { |
183 |
my $orders = C4::Acquisition::GetHistory( biblionumber => $biblionumber, get_canceled_order => 1 ); |
181 |
my $orders = C4::Acquisition::GetHistory( biblionumber => $biblionumber, get_canceled_order => 1 ); |
Lines 244-250
foreach my $item (@items) {
Link Here
|
244 |
#get shelf location and collection code description if they are authorised value. |
242 |
#get shelf location and collection code description if they are authorised value. |
245 |
# same thing for copy number |
243 |
# same thing for copy number |
246 |
my $shelfcode = $item->{'location'}; |
244 |
my $shelfcode = $item->{'location'}; |
247 |
$item->{'location'} = $shelflocations->{$shelfcode} if ( defined( $shelfcode ) && defined($shelflocations) && exists( $shelflocations->{$shelfcode} ) ); |
245 |
my $permshelfcode = $item->{'permanent_location'}; |
|
|
246 |
$item->{'location'} = ( defined( $permshelfcode ) && defined($shelflocations) && exists( $shelflocations->{$permshelfcode} ) ) ? $shelflocations->{$permshelfcode} : undef; |
247 |
$item->{'location'} .= ' (' . $shelflocations->{$shelfcode} . ')' if ( defined( $shelfcode ) && defined($shelflocations) && exists($shelflocations->{$shelfcode} ) && ($shelfcode ne $permshelfcode) ); |
248 |
my $ccode = $item->{'ccode'}; |
248 |
my $ccode = $item->{'ccode'}; |
249 |
$item->{'ccode'} = $collections->{$ccode} if ( defined( $ccode ) && defined($collections) && exists( $collections->{$ccode} ) ); |
249 |
$item->{'ccode'} = $collections->{$ccode} if ( defined( $ccode ) && defined($collections) && exists( $collections->{$ccode} ) ); |
250 |
my $copynumber = $item->{'copynumber'}; |
250 |
my $copynumber = $item->{'copynumber'}; |
Lines 275-281
foreach my $item (@items) {
Link Here
|
275 |
} |
275 |
} |
276 |
|
276 |
|
277 |
|
277 |
|
278 |
# Check the transit status |
278 |
# Check the transit status |
279 |
my ( $transfertwhen, $transfertfrom, $transfertto ) = GetTransfers($item->{itemnumber}); |
279 |
my ( $transfertwhen, $transfertfrom, $transfertto ) = GetTransfers($item->{itemnumber}); |
280 |
if ( defined( $transfertwhen ) && ( $transfertwhen ne '' ) ) { |
280 |
if ( defined( $transfertwhen ) && ( $transfertwhen ne '' ) ) { |
281 |
$item->{transfertwhen} = $transfertwhen; |
281 |
$item->{transfertwhen} = $transfertwhen; |
Lines 295-303
foreach my $item (@items) {
Link Here
|
295 |
|
295 |
|
296 |
if ($item->{biblionumber} ne $biblionumber){ |
296 |
if ($item->{biblionumber} ne $biblionumber){ |
297 |
$item->{hostbiblionumber} = $item->{biblionumber}; |
297 |
$item->{hostbiblionumber} = $item->{biblionumber}; |
298 |
$item->{hosttitle} = GetBiblioData($item->{biblionumber})->{title}; |
298 |
$item->{hosttitle} = GetBiblioData($item->{biblionumber})->{title}; |
299 |
} |
299 |
} |
300 |
|
300 |
|
301 |
#count if item is used in analytical bibliorecords |
301 |
#count if item is used in analytical bibliorecords |
302 |
my $countanalytics= GetAnalyticsCount($item->{itemnumber}); |
302 |
my $countanalytics= GetAnalyticsCount($item->{itemnumber}); |
303 |
if ($countanalytics > 0){ |
303 |
if ($countanalytics > 0){ |
Lines 346-372
if (scalar(@itemloop) == 0 || scalar(@otheritemloop) == 0) {
Link Here
|
346 |
|
346 |
|
347 |
$template->param( norequests => $norequests ); |
347 |
$template->param( norequests => $norequests ); |
348 |
$template->param( |
348 |
$template->param( |
349 |
MARCNOTES => $marcnotesarray, |
349 |
MARCNOTES => $marcnotesarray, |
350 |
MARCSUBJCTS => $marcsubjctsarray, |
350 |
MARCSUBJCTS => $marcsubjctsarray, |
351 |
MARCAUTHORS => $marcauthorsarray, |
351 |
MARCAUTHORS => $marcauthorsarray, |
352 |
MARCSERIES => $marcseriesarray, |
352 |
MARCSERIES => $marcseriesarray, |
353 |
MARCURLS => $marcurlsarray, |
353 |
MARCURLS => $marcurlsarray, |
354 |
MARCISBNS => $marcisbnsarray, |
354 |
MARCISBNS => $marcisbnsarray, |
355 |
MARCHOSTS => $marchostsarray, |
355 |
MARCHOSTS => $marchostsarray, |
356 |
subtitle => $subtitle, |
356 |
subtitle => $subtitle, |
357 |
itemdata_ccode => $itemfields{ccode}, |
357 |
itemdata_ccode => $itemfields{ccode}, |
358 |
itemdata_enumchron => $itemfields{enumchron}, |
358 |
itemdata_enumchron => $itemfields{enumchron}, |
359 |
itemdata_uri => $itemfields{uri}, |
359 |
itemdata_uri => $itemfields{uri}, |
360 |
itemdata_copynumber => $itemfields{copynumber}, |
360 |
itemdata_copynumber => $itemfields{copynumber}, |
361 |
itemdata_stocknumber => $itemfields{stocknumber}, |
361 |
itemdata_stocknumber => $itemfields{stocknumber}, |
362 |
volinfo => $itemfields{enumchron}, |
362 |
volinfo => $itemfields{enumchron}, |
363 |
itemdata_itemnotes => $itemfields{itemnotes}, |
363 |
itemdata_itemnotes => $itemfields{itemnotes}, |
364 |
itemdata_nonpublicnotes => $itemfields{itemnotes_nonpublic}, |
364 |
itemdata_nonpublicnotes => $itemfields{itemnotes_nonpublic}, |
365 |
z3950_search_params => C4::Search::z3950_search_args($dat), |
365 |
z3950_search_params => C4::Search::z3950_search_args($dat), |
366 |
hostrecords => $hostrecords, |
366 |
hostrecords => $hostrecords, |
367 |
analytics_flag => $analytics_flag, |
367 |
analytics_flag => $analytics_flag, |
368 |
C4::Search::enabled_staff_search_views, |
368 |
C4::Search::enabled_staff_search_views, |
369 |
materials => $materials_flag, |
369 |
materials => $materials_flag, |
370 |
); |
370 |
); |
371 |
|
371 |
|
372 |
if (C4::Context->preference("AlternateHoldingsField") && scalar @items == 0) { |
372 |
if (C4::Context->preference("AlternateHoldingsField") && scalar @items == 0) { |