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

(-)a/C4/ILSDI/Services.pm (-5 / +9 lines)
Lines 253-262 sub GetRecords { Link Here
253
            $item{'homebranchname'}    = $home_library    ? $home_library->branchname    : '';
253
            $item{'homebranchname'}    = $home_library    ? $home_library->branchname    : '';
254
            $item{'holdingbranchname'} = $holding_library ? $holding_library->branchname : '';
254
            $item{'holdingbranchname'} = $holding_library ? $holding_library->branchname : '';
255
255
256
            if ($item->location) {
256
            my @item_fields_description = ( 'location', 'ccode', 'permanent_location', 'notforloan', 'itemlost', 'withdrawn', 'damaged', 'restricted' );
257
                my $authorised_value = Koha::AuthorisedValues->find_by_koha_field({ kohafield => 'items.location', authorised_value => $item->location });
257
258
                if ($authorised_value) {
258
           foreach (@item_fields_description) {
259
                    $item{location_description} = $authorised_value->opac_description;
259
260
                if ( $item->$_ ) {
261
                    my $authorised_value = Koha::AuthorisedValues->find_by_koha_field( { kohafield => 'items.' . $_, authorised_value => $item->$_ } );
262
                        if ($authorised_value) {
263
                            $item{ $_ . _description } = $authorised_value->opac_description;
264
                        }
260
                }
265
                }
261
            }
266
            }
262
267
263
- 

Return to bug 31550