From: miker Date: Fri, 27 Jul 2007 17:49:00 +0000 (+0000) Subject: git-svn-id: svn://svn.open-ils.org/ILS/trunk@7600 dcc99617-32d9-48b4-a31d-7c20da2025e4 X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=35bd3f843794e2087f06fd28a89dd6e8590669a4;p=Evergreen.git git-svn-id: svn://svn.open-ils.org/ILS/trunk@7600 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/src/perlmods/OpenILS/WWW/Exporter.pm b/Open-ILS/src/perlmods/OpenILS/WWW/Exporter.pm index 60341b5928..f4435956a0 100644 --- a/Open-ILS/src/perlmods/OpenILS/WWW/Exporter.pm +++ b/Open-ILS/src/perlmods/OpenILS/WWW/Exporter.pm @@ -166,43 +166,45 @@ sub handler { ); - my $cn_list = $bib->call_numbers; - if ($cn_list && @$cn_list) { + if ($holdings) { + my $cn_list = $bib->call_numbers; + if ($cn_list && @$cn_list) { - my $cp_list = [ map { @{ $_->copies } } @$cn_list ]; - if ($cp_list && @$cp_list) { + my $cp_list = [ map { @{ $_->copies } } @$cn_list ]; + if ($cp_list && @$cp_list) { - my %cn_map; - push @{$cn_map{$_->call_number}}, $_ for (@$cp_list); + my %cn_map; + push @{$cn_map{$_->call_number}}, $_ for (@$cp_list); - for my $cn ( @$cn_list ) { - my $cn_map_list = $cn_map{$cn->id}; + for my $cn ( @$cn_list ) { + my $cn_map_list = $cn_map{$cn->id}; - for my $cp ( @$cn_map_list ) { + for my $cp ( @$cn_map_list ) { - $r->append_fields( - MARC::Field->new( - 852, '4', '', - a => $location, - b => $orgs{$cn->owning_lib}->shortname, - b => $orgs{$cp->circ_lib}->shortname, - c => $shelves{$cp->location}->name, - j => $cn->label, - ($cp->circ_modifier ? ( g => $cp->circ_modifier ) : ()), - p => $cp->barcode, - ($cp->price ? ( y => $cp->price ) : ()), - ($cp->copy_number ? ( t => $cp->copy_number ) : ()), - ($cp->ref eq 't' ? ( x => 'reference' ) : ()), - ($cp->holdable eq 'f' ? ( x => 'unholdable' ) : ()), - ($cp->circulate eq 'f' ? ( x => 'noncirculating' ) : ()), - ($cp->opac_visible eq 'f' ? ( x => 'hidden' ) : ()), - ) - ); - + $r->append_fields( + MARC::Field->new( + 852, '4', '', + a => $location, + b => $orgs{$cn->owning_lib}->shortname, + b => $orgs{$cp->circ_lib}->shortname, + c => $shelves{$cp->location}->name, + j => $cn->label, + ($cp->circ_modifier ? ( g => $cp->circ_modifier ) : ()), + p => $cp->barcode, + ($cp->price ? ( y => $cp->price ) : ()), + ($cp->copy_number ? ( t => $cp->copy_number ) : ()), + ($cp->ref eq 't' ? ( x => 'reference' ) : ()), + ($cp->holdable eq 'f' ? ( x => 'unholdable' ) : ()), + ($cp->circulate eq 'f' ? ( x => 'noncirculating' ) : ()), + ($cp->opac_visible eq 'f' ? ( x => 'hidden' ) : ()), + ) + ); + + } } } - } - } + } + } if (uc($format) eq 'XML') { my $x = $r->as_xml_record;