|
Lines 194-202
my @biblionumbers = uniq $distinct_holds->get_column('biblionumber');
Link Here
|
| 194 |
# make final reserves hash and fill with info |
194 |
# make final reserves hash and fill with info |
| 195 |
my $reserves; |
195 |
my $reserves; |
| 196 |
foreach my $bibnum ( @biblionumbers ){ |
196 |
foreach my $bibnum ( @biblionumbers ){ |
| 197 |
|
|
|
| 198 |
my @branchtransfers = map { $_->itemnumber } Koha::Item::Transfers->search({ datearrived => undef }, { columns => [ 'itemnumber' ], collapse => 1 }); |
197 |
my @branchtransfers = map { $_->itemnumber } Koha::Item::Transfers->search({ datearrived => undef }, { columns => [ 'itemnumber' ], collapse => 1 }); |
| 199 |
my @checkouts = map { $_->itemnumber } Koha::Checkouts->search({}, { columns => [ 'itemnumber' ], collapse => 1 }); |
|
|
| 200 |
my @waiting_holds = map { $_->itemnumber } Koha::Holds->search({'found' => 'W'}, { columns => [ 'itemnumber' ], collapse => 1 }); |
198 |
my @waiting_holds = map { $_->itemnumber } Koha::Holds->search({'found' => 'W'}, { columns => [ 'itemnumber' ], collapse => 1 }); |
| 201 |
|
199 |
|
| 202 |
my @items = Koha::Items->search( |
200 |
my @items = Koha::Items->search( |
|
Lines 205-211
foreach my $bibnum ( @biblionumbers ){
Link Here
|
| 205 |
itemlost => 0, |
203 |
itemlost => 0, |
| 206 |
withdrawn => 0, |
204 |
withdrawn => 0, |
| 207 |
notforloan => 0, |
205 |
notforloan => 0, |
| 208 |
itemnumber => { -not_in => [ @branchtransfers, @checkouts, @waiting_holds ] }, |
206 |
onloan => undef, |
|
|
207 |
itemnumber => { -not_in => [ @branchtransfers, @waiting_holds ] }, |
| 209 |
} |
208 |
} |
| 210 |
); |
209 |
); |
| 211 |
|
210 |
|
| 212 |
- |
|
|