|
Lines 93-114
foreach my $biblionumber ( @bibs ) {
Link Here
|
| 93 |
next |
93 |
next |
| 94 |
if $biblio->hidden_in_opac({ rules => $rules }); |
94 |
if $biblio->hidden_in_opac({ rules => $rules }); |
| 95 |
|
95 |
|
| 96 |
# grab all the items... |
|
|
| 97 |
my $items = $biblio->items->filter_by_visible_in_opac({ patron => $logged_in_user })->unblessed; |
| 98 |
foreach my $item (@$items) { |
| 99 |
my $reserve_status = C4::Reserves::GetReserveStatus($item->{itemnumber}); |
| 100 |
if( $reserve_status eq "Waiting"){ $item->{'waiting'} = 1; } |
| 101 |
if( $reserve_status eq "Processing"){ $item->{'processing'} = 1; } |
| 102 |
} |
| 103 |
|
| 104 |
my $hasauthors = 0; |
96 |
my $hasauthors = 0; |
| 105 |
if($dat->{'author'} || @$marcauthorsarray) { |
97 |
if($dat->{'author'} || @$marcauthorsarray) { |
| 106 |
$hasauthors = 1; |
98 |
$hasauthors = 1; |
| 107 |
} |
99 |
} |
| 108 |
my $collections = |
|
|
| 109 |
{ map { $_->{authorised_value} => $_->{opac_description} } Koha::AuthorisedValues->get_descriptions_by_koha_field( { frameworkcode => $dat->{frameworkcode}, kohafield => 'items.ccode' } ) }; |
| 110 |
my $shelflocations = |
| 111 |
{ map { $_->{authorised_value} => $_->{opac_description} } Koha::AuthorisedValues->get_descriptions_by_koha_field( { frameworkcode => $dat->{frameworkcode}, kohafield => 'items.location' } ) }; |
| 112 |
|
100 |
|
| 113 |
# COinS format FIXME: for books Only |
101 |
# COinS format FIXME: for books Only |
| 114 |
my $fmt = substr $record->leader(), 6,2; |
102 |
my $fmt = substr $record->leader(), 6,2; |
|
Lines 120-140
foreach my $biblionumber ( @bibs ) {
Link Here
|
| 120 |
$dat->{'even'} = 1; |
108 |
$dat->{'even'} = 1; |
| 121 |
} |
109 |
} |
| 122 |
|
110 |
|
| 123 |
for my $itm (@$items) { |
|
|
| 124 |
if ($itm->{'location'}){ |
| 125 |
$itm->{'location_opac'} = $shelflocations->{$itm->{'location'} }; |
| 126 |
} |
| 127 |
my $item_object = Koha::Items->find($itm->{itemnumber}); |
| 128 |
my $transfer = $item_object->get_transfer; |
| 129 |
if ( $transfer && $transfer->in_transit ) { |
| 130 |
$itm->{transfertwhen} = $transfer->datesent; |
| 131 |
$itm->{transfertfrom} = $transfer->frombranch; |
| 132 |
$itm->{transfertto} = $transfer->tobranch; |
| 133 |
} |
| 134 |
} |
| 135 |
$num++; |
111 |
$num++; |
| 136 |
$dat->{biblionumber} = $biblionumber; |
112 |
$dat->{biblionumber} = $biblionumber; |
| 137 |
$dat->{ITEM_RESULTS} = $items; |
113 |
$dat->{ITEM_RESULTS} = $biblio->items->filter_by_visible_in_opac({ patron => $logged_in_user }); |
| 138 |
$dat->{MARCNOTES} = $marcnotesarray; |
114 |
$dat->{MARCNOTES} = $marcnotesarray; |
| 139 |
$dat->{MARCSUBJCTS} = $marcsubjctsarray; |
115 |
$dat->{MARCSUBJCTS} = $marcsubjctsarray; |
| 140 |
$dat->{MARCAUTHORS} = $marcauthorsarray; |
116 |
$dat->{MARCAUTHORS} = $marcauthorsarray; |
| 141 |
- |
|
|