|
Lines 307-315
sub filter_by_available {
Link Here
|
| 307 |
itemlost => 0, |
307 |
itemlost => 0, |
| 308 |
withdrawn => 0, |
308 |
withdrawn => 0, |
| 309 |
damaged => 0, |
309 |
damaged => 0, |
| 310 |
notforloan => { '<=' => 0 }, |
310 |
notforloan => { '<=' => 0 }, |
| 311 |
'me.itype' => { -not_in => \@item_types_notforloan }, |
|
|
| 312 |
restricted => [ { '!=' => 0 }, undef ], |
311 |
restricted => [ { '!=' => 0 }, undef ], |
|
|
312 |
'me.itype' => { -not_in => \@item_types_notforloan }, |
| 313 |
} |
313 |
} |
| 314 |
); |
314 |
); |
| 315 |
} |
315 |
} |
|
Lines 612-618
sub search {
Link Here
|
| 612 |
if ( $status eq 'not_for_loan' ) { |
612 |
if ( $status eq 'not_for_loan' ) { |
| 613 |
my @item_types_notforloan = |
613 |
my @item_types_notforloan = |
| 614 |
Koha::ItemTypes->search( { notforloan => { '!=' => 0 } } )->get_column('itemtype'); |
614 |
Koha::ItemTypes->search( { notforloan => { '!=' => 0 } } )->get_column('itemtype'); |
| 615 |
$self = $self->search( [ { notforloan => { '<=' => 0 } }, { 'me.itype' => \@item_types_notforloan } ] ); |
615 |
$self = $self->search( [ { notforloan => { '>' => 0 } }, { 'me.itype' => \@item_types_notforloan } ] ); |
| 616 |
} |
616 |
} |
| 617 |
if ( $status eq 'on_hold' ) { |
617 |
if ( $status eq 'on_hold' ) { |
| 618 |
$self = $self->filter_by_has_holds; |
618 |
$self = $self->filter_by_has_holds; |
|
Lines 626-635
sub search {
Link Here
|
| 626 |
} |
626 |
} |
| 627 |
|
627 |
|
| 628 |
if ( $status eq 'restricted' ) { |
628 |
if ( $status eq 'restricted' ) { |
| 629 |
$self = $self->search( { restricted => [ { '!=' => 0 }, undef ] } ); |
629 |
$self = $self->search( { restricted => [ { '!=' => 0 } ] } ); |
| 630 |
} |
630 |
} |
| 631 |
} |
631 |
} |
| 632 |
|
|
|
| 633 |
return $self->SUPER::search( $params, $attributes ); |
632 |
return $self->SUPER::search( $params, $attributes ); |
| 634 |
} |
633 |
} |
| 635 |
|
634 |
|
| 636 |
- |
|
|