-
-#DEBUG Notes: Build an array element 'item' of the correct bib (results) hash which contains item-specific data...
- if ( $item_results->{$item}->{'biblionumber'} eq
- $results[$i]->{'biblionumber'} )
- {
-
-# NOTE: The order of the elements in this array must be preserved or the table dependent on it will be incorrectly rendered.
-# This is a real hack, but I can't think of a better way right now. -fbcit
-# It is conceivable that itemcallnumber and/or barcode fields might be empty so the trinaries cover this possibility.
- push @{ $results[$i]->{'item'} }, { i_itemnumber1 =>
- $item_results->{$item}->{'itemnumber'} };
- push @{ $results[$i]->{'item'} },
- {
- i_itemcallnumber => (
- $item_results->{$item}->{'itemcallnumber'}
- ? $item_results->{$item}->{'itemcallnumber'}
- : 'NA'
- )
- };
- push @{ $results[$i]->{'item'} }, { i_dateaccessioned =>
- $item_results->{$item}->{'dateaccessioned'} };
- push @{ $results[$i]->{'item'} },
- {
- i_barcode => (
- $item_results->{$item}->{'barcode'}
- ? $item_results->{$item}->{'barcode'}
- : 'NA'
- )
- };
- push @{ $results[$i]->{'item'} }, { i_itemnumber2 =>
- $item_results->{$item}->{'itemnumber'} };
+ #DEBUG Notes: Build an array element 'item' of the correct bib (results) hash which contains item-specific data...
+ if ($item_results->{$item}->{'biblionumber'} eq $results_set[$i]->{'biblionumber'}) {
+ my $item_data;
+ $item_data->{'_item_number'} = $item_results->{$item}->{'itemnumber'};
+ $item_data->{'_item_call_number'} = ($item_results->{$item}->{'itemcallnumber'} ? $item_results->{$item}->{'itemcallnumber'} : 'NA');
+ $item_data->{'_date_accessioned'} = $item_results->{$item}->{'dateaccessioned'};
+ $item_data->{'_barcode'} = ( $item_results->{$item}->{'barcode'} ? $item_results->{$item}->{'barcode'} : 'NA');
+ $item_data->{'_add'} = $item_results->{$item}->{'itemnumber'};
+ unshift (@row_data, $item_data); # item numbers are given to us in descending order by get_itemnumbers_of()...