From: miker Date: Fri, 10 Oct 2008 17:44:05 +0000 (+0000) Subject: filter out deleted items and volumes X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=9fffbc6e3788a9e4dad537cc4c1f5f9c79ba46e3;p=Evergreen.git filter out deleted items and volumes git-svn-id: svn://svn.open-ils.org/ILS/trunk@10818 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/src/perlmods/OpenILS/Application/SuperCat.pm b/Open-ILS/src/perlmods/OpenILS/Application/SuperCat.pm index e33dcbb6f4..93e2c81079 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/SuperCat.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/SuperCat.pm @@ -365,13 +365,15 @@ sub new_record_holdings { $year += 1900; $month += 1; - $client->respond(""); + $client->respond(""); for my $cn (@{$tree->call_numbers}) { + next unless ( $cn->deleted eq 'f' || $cn->deleted == 0 ); my $found = 0; for my $c (@{$cn->copies}) { next unless grep {$c->circ_lib->id == $_} @ou_ids; + next unless ( $c->deleted eq 'f' || $c->deleted == 0 ); $found = 1; last; } @@ -385,11 +387,12 @@ sub new_record_holdings { my $cn_label = $cn->label; - my $xml = ""; + my $xml = ""; for my $cp (@{$cn->copies}) { next unless grep { $cp->circ_lib->id == $_ } @ou_ids; + next unless ( $cp->deleted eq 'f' || $cp->deleted == 0 ); (my $cp_class = $cp->class_name) =~ s/::/-/gso; $cp_class =~ s/Fieldmapper-//gso; @@ -400,34 +403,34 @@ sub new_record_holdings { my $cp_lib = escape($cp->circ_lib->shortname); my $cp_bc = escape($cp->barcode); - $xml .= "$cp_stat". - "$cp_loc$cp_lib"; + $xml .= "$cp_stat". + "$cp_loc$cp_lib"; if ($cp->notes) { for my $note ( @{$cp->notes} ) { next unless ( $note->pub eq 't' ); - $xml .= sprintf('%s',$note->create_date, escape($note->title), escape($note->value)); + $xml .= sprintf('%s',$note->create_date, escape($note->title), escape($note->value)); } } - $xml .= ""; + $xml .= ""; if ($cp->stat_cat_entries) { for my $sce ( @{$cp->stat_cat_entries} ) { next unless ( $sce->stat_cat->opac_visible eq 't' ); - $xml .= sprintf('%s',escape($sce->stat_cat->name) ,escape($sce->value)); + $xml .= sprintf('%s',escape($sce->stat_cat->name) ,escape($sce->value)); } } - $xml .= ""; + $xml .= ""; } - $xml .= ""; + $xml .= ""; $client->respond($xml) } - return ""; + return ""; } __PACKAGE__->register_method( method => 'new_record_holdings',