|
Lines 20-25
Link Here
|
| 20 |
use Modern::Perl; |
20 |
use Modern::Perl; |
| 21 |
|
21 |
|
| 22 |
use constant PULL_INTERVAL => 2; |
22 |
use constant PULL_INTERVAL => 2; |
|
|
23 |
use List::MoreUtils qw( uniq ); |
| 23 |
|
24 |
|
| 24 |
use C4::Context; |
25 |
use C4::Context; |
| 25 |
use C4::Output; |
26 |
use C4::Output; |
|
Lines 183-198
if ( C4::Context->preference('IndependentBranches') ){
Link Here
|
| 183 |
} |
184 |
} |
| 184 |
|
185 |
|
| 185 |
# get all distinct unfulfilled reserves |
186 |
# get all distinct unfulfilled reserves |
| 186 |
my @distinct_holds = Koha::Holds->search( |
187 |
my $distinct_holds = Koha::Holds->search( |
| 187 |
{ %where }, |
188 |
{ %where }, |
| 188 |
{ join => 'itembib', group_by => 'reserve.biblionumber', alias => 'reserve' } |
189 |
{ join => 'itembib', alias => 'reserve' } |
| 189 |
); |
190 |
); |
|
|
191 |
my @biblionumbers = uniq $distinct_holds->get_column('biblionumber'); |
| 190 |
|
192 |
|
| 191 |
# make final reserves hash and fill with info |
193 |
# make final reserves hash and fill with info |
| 192 |
my $reserves; |
194 |
my $reserves; |
| 193 |
foreach my $dh ( @distinct_holds ){ |
195 |
foreach my $bibnum ( @biblionumbers ){ |
| 194 |
|
|
|
| 195 |
my $bibnum = $dh->biblionumber; |
| 196 |
|
196 |
|
| 197 |
my @items = Koha::Items->search({ biblionumber => $bibnum }); |
197 |
my @items = Koha::Items->search({ biblionumber => $bibnum }); |
| 198 |
foreach my $i ( @items ){ |
198 |
foreach my $i ( @items ){ |
| 199 |
- |
|
|