View | Details | Raw Unified | Return to bug 33220
Collapse All | Expand All

(-)a/recalls/recalls_to_pull.pl (-4 / +3 lines)
Lines 50-56 if ( $op eq 'cancel' ) { Link Here
50
}
50
}
51
51
52
if ( $op eq 'list' ) {
52
if ( $op eq 'list' ) {
53
    my @recalls = Koha::Recalls->search({ status => [ 'requested','overdue','in_transit' ] })->as_list;
53
    my @recalls = Koha::Recalls->search({ status => [ 'requested','overdue' ] })->as_list;
54
    my @pull_list;
54
    my @pull_list;
55
    my %seen_bib;
55
    my %seen_bib;
56
    foreach my $recall ( @recalls ) {
56
    foreach my $recall ( @recalls ) {
Lines 64-70 if ( $op eq 'list' ) { Link Here
64
            # get recall data about this biblio
64
            # get recall data about this biblio
65
            my $biblio = $recall->biblio;
65
            my $biblio = $recall->biblio;
66
            my @this_bib_recalls = $biblio->recalls->search(
66
            my @this_bib_recalls = $biblio->recalls->search(
67
                { status   => [ 'requested', 'overdue', 'in_transit' ] },
67
                { status   => [ 'requested','overdue' ] },
68
                { order_by => { -asc => 'created_date' } }
68
                { order_by => { -asc => 'created_date' } }
69
            )->as_list;
69
            )->as_list;
70
            my $recalls_count = scalar @this_bib_recalls;
70
            my $recalls_count = scalar @this_bib_recalls;
Lines 82-88 if ( $op eq 'list' ) { Link Here
82
82
83
            my @items = $biblio->items->as_list;
83
            my @items = $biblio->items->as_list;
84
            foreach my $item ( @items ) {
84
            foreach my $item ( @items ) {
85
                if ( $item->can_be_waiting_recall and !$item->checkout ) {
85
                if ( $item->can_be_waiting_recall and !$item->checkout and Koha::Recalls->search({ item_id => $item->id, status => [ 'waiting','in_transit' ], completed => 0 })->count == 0 ) {
86
                    # if item can be pulled to fulfill recall, collect item data
86
                    # if item can be pulled to fulfill recall, collect item data
87
                    $items_count++;
87
                    $items_count++;
88
                    push( @callnumbers, $item->itemcallnumber ) if ( $item->itemcallnumber );
88
                    push( @callnumbers, $item->itemcallnumber ) if ( $item->itemcallnumber );
89
- 

Return to bug 33220