Lines 956-963
sub _availability {
Link Here
|
956 |
my ($itemnumber) = @_; |
956 |
my ($itemnumber) = @_; |
957 |
my $item = Koha::Items->find($itemnumber); |
957 |
my $item = Koha::Items->find($itemnumber); |
958 |
|
958 |
|
|
|
959 |
use Koha::I18N; |
960 |
|
959 |
unless ( $item ) { |
961 |
unless ( $item ) { |
960 |
return ( undef, 'unknown', 'Error: could not retrieve availability for this ID', undef ); |
962 |
return ( undef, __('unknown'), __('Error: could not retrieve availability for this ID'), undef ); |
961 |
} |
963 |
} |
962 |
|
964 |
|
963 |
my $biblionumber = $item->biblioitemnumber; |
965 |
my $biblionumber = $item->biblioitemnumber; |
Lines 966-982
sub _availability {
Link Here
|
966 |
my $itemcallnumber = $item->itemcallnumber; |
968 |
my $itemcallnumber = $item->itemcallnumber; |
967 |
|
969 |
|
968 |
if ( $item->notforloan ) { |
970 |
if ( $item->notforloan ) { |
969 |
return ( $biblionumber, 'not available', 'Not for loan', $location, $itemcallnumber ); |
971 |
return ( $biblionumber, __('not available'), __('Not for loan'), $location, $itemcallnumber ); |
970 |
} elsif ( $item->onloan ) { |
972 |
} elsif ( $item->onloan ) { |
971 |
return ( $biblionumber, 'not available', 'Checked out', $location, $itemcallnumber ); |
973 |
return ( $biblionumber, __('not available'), __('Checked out'), $location, $itemcallnumber ); |
972 |
} elsif ( $item->itemlost ) { |
974 |
} elsif ( $item->itemlost ) { |
973 |
return ( $biblionumber, 'not available', 'Item lost', $location, $itemcallnumber ); |
975 |
return ( $biblionumber, __('not available'), __('Item lost'), $location, $itemcallnumber ); |
974 |
} elsif ( $item->withdrawn ) { |
976 |
} elsif ( $item->withdrawn ) { |
975 |
return ( $biblionumber, 'not available', 'Item withdrawn', $location, $itemcallnumber ); |
977 |
return ( $biblionumber, __('not available'), __('Item withdrawn'), $location, $itemcallnumber ); |
976 |
} elsif ( $item->damaged ) { |
978 |
} elsif ( $item->damaged ) { |
977 |
return ( $biblionumber, 'not available', 'Item damaged', $location, $itemcallnumber ); |
979 |
return ( $biblionumber, __('not available'), __('Item damaged'), $location, $itemcallnumber ); |
978 |
} else { |
980 |
} else { |
979 |
return ( $biblionumber, 'available', undef, $location, $itemcallnumber ); |
981 |
return ( $biblionumber, __('available'), undef, $location, $itemcallnumber ); |
980 |
} |
982 |
} |
981 |
} |
983 |
} |
982 |
|
984 |
|