|
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 606-612
sub search {
Link Here
|
| 606 |
if ( $status eq 'not_for_loan' ) { |
606 |
if ( $status eq 'not_for_loan' ) { |
| 607 |
my @item_types_notforloan = |
607 |
my @item_types_notforloan = |
| 608 |
Koha::ItemTypes->search( { notforloan => { '!=' => 0 } } )->get_column('itemtype'); |
608 |
Koha::ItemTypes->search( { notforloan => { '!=' => 0 } } )->get_column('itemtype'); |
| 609 |
$self = $self->search( [ { notforloan => { '<=' => 0 } }, { 'me.itype' => \@item_types_notforloan } ] ); |
609 |
$self = $self->search( [ { notforloan => { '>' => 0 } }, { 'me.itype' => \@item_types_notforloan } ] ); |
| 610 |
} |
610 |
} |
| 611 |
if ( $status eq 'on_hold' ) { |
611 |
if ( $status eq 'on_hold' ) { |
| 612 |
$self = $self->filter_by_has_holds; |
612 |
$self = $self->filter_by_has_holds; |
|
Lines 620-629
sub search {
Link Here
|
| 620 |
} |
620 |
} |
| 621 |
|
621 |
|
| 622 |
if ( $status eq 'restricted' ) { |
622 |
if ( $status eq 'restricted' ) { |
| 623 |
$self = $self->search( { restricted => [ { '!=' => 0 }, undef ] } ); |
623 |
$self = $self->search( { restricted => [ { '!=' => 0 } ] } ); |
| 624 |
} |
624 |
} |
| 625 |
} |
625 |
} |
| 626 |
|
|
|
| 627 |
return $self->SUPER::search( $params, $attributes ); |
626 |
return $self->SUPER::search( $params, $attributes ); |
| 628 |
} |
627 |
} |
| 629 |
|
628 |
|
| 630 |
- |
|
|