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

(-)a/catalogue/MARCdetail.pl (+7 lines)
Lines 61-66 use C4::Search; # enabled_staff_search_views Link Here
61
use Koha::Biblios;
61
use Koha::Biblios;
62
use Koha::BiblioFrameworks;
62
use Koha::BiblioFrameworks;
63
use Koha::Patrons;
63
use Koha::Patrons;
64
use Koha::DateUtils;
64
65
65
use List::MoreUtils qw( uniq );
66
use List::MoreUtils qw( uniq );
66
67
Lines 267-272 my %witness Link Here
267
my @item_subfield_codes;
268
my @item_subfield_codes;
268
my @item_loop;
269
my @item_loop;
269
my $norequests = 1;
270
my $norequests = 1;
271
270
foreach my $field (@fields) {
272
foreach my $field (@fields) {
271
    next if ( $field->tag() < 10 );
273
    next if ( $field->tag() < 10 );
272
    my @subf = $field->subfields;
274
    my @subf = $field->subfields;
Lines 294-299 foreach my $field (@fields) { Link Here
294
        }
296
        }
295
297
296
        $norequests = 0 if  $tagslib->{ $field->tag() }->{ $subf[$i][0] }->{kohafield} eq 'items.notforloan' and $subf[$i][1] == 0;
298
        $norequests = 0 if  $tagslib->{ $field->tag() }->{ $subf[$i][0] }->{kohafield} eq 'items.notforloan' and $subf[$i][1] == 0;
299
300
        if ( $subf[$i][0] eq 'd' || $subf[$i][0] eq 'q' || $subf[$i][0] eq 'r' || $subf[$i][0] eq 's' || $subf[$i][0] eq 'w' ){
301
            # date accessioned || on loan || date last seen || date last borrowed || replacement price date
302
            $item->{$subf[$i][0]} = output_pref({ dt => dt_from_string( $item->{$subf[$i][0]} ), dateonly => 1 });
303
        }
297
    }
304
    }
298
    push @item_loop, $item if $item;
305
    push @item_loop, $item if $item;
299
}
306
}
(-)a/cataloguing/additem.pl (-2 / +15 lines)
Lines 800-806 if ( C4::Context->preference('EasyAnalyticalRecords') ) { Link Here
800
    }
800
    }
801
}
801
}
802
802
803
804
foreach my $field (@fields) {
803
foreach my $field (@fields) {
805
    next if ( $field->tag() < 10 );
804
    next if ( $field->tag() < 10 );
806
805
Lines 857-863 my @item_value_loop; Link Here
857
my @header_value_loop;
856
my @header_value_loop;
858
for my $row ( @big_array ) {
857
for my $row ( @big_array ) {
859
    my %row_data;
858
    my %row_data;
860
    my @item_fields = map +{ field => $_ || '' }, @$row{ sort keys(%witness) };
859
    my @item_fields;
860
    foreach my $key (sort keys %witness){
861
        my $item_field;
862
        if ( $row->{$key} ){
863
            $item_field->{field} = $row->{$key};
864
        } else {
865
            $item_field->{field} = '';
866
        }
867
        if ( $key eq 'd' || $key eq 'q' || $key eq 'r' || $key eq 's' || $key eq 'w' ){
868
            # date accessioned || on loan || date last seen || date last borrowed || replacement price date
869
            $item_field->{field} = output_pref({ dt => dt_from_string( $row->{$key} ), dateonly => 1 });
870
        }
871
872
        push @item_fields, $item_field;
873
    }
861
    $row_data{item_value} = [ @item_fields ];
874
    $row_data{item_value} = [ @item_fields ];
862
    $row_data{itemnumber} = $row->{itemnumber};
875
    $row_data{itemnumber} = $row->{itemnumber};
863
    #reporting this_row values
876
    #reporting this_row values
(-)a/opac/opac-MARCdetail.pl (-1 / +7 lines)
Lines 63-68 use Koha::Items; Link Here
63
use Koha::ItemTypes;
63
use Koha::ItemTypes;
64
use Koha::Patrons;
64
use Koha::Patrons;
65
use Koha::RecordProcessor;
65
use Koha::RecordProcessor;
66
use Koha::DateUtils;
66
67
67
my $query = CGI->new();
68
my $query = CGI->new();
68
69
Lines 290-295 foreach my $field (@fields) { Link Here
290
        my $sf_def = $tagslib->{ $field->tag() }->{ $subf[$i][0] };
291
        my $sf_def = $tagslib->{ $field->tag() }->{ $subf[$i][0] };
291
        next if ( ($sf_def->{tab}||0) != 10 );
292
        next if ( ($sf_def->{tab}||0) != 10 );
292
        next if ( ($sf_def->{hidden}||0) > 0 );
293
        next if ( ($sf_def->{hidden}||0) > 0 );
294
293
        push @item_subfield_codes, $subf[$i][0];
295
        push @item_subfield_codes, $subf[$i][0];
294
        $witness{ $subf[$i][0] } = $sf_def->{lib};
296
        $witness{ $subf[$i][0] } = $sf_def->{lib};
295
297
Lines 310-315 foreach my $field (@fields) { Link Here
310
            $item->{ $subf[$i][0] } .= GetAuthorisedValueDesc( $field->tag(), $subf[$i][0],
312
            $item->{ $subf[$i][0] } .= GetAuthorisedValueDesc( $field->tag(), $subf[$i][0],
311
                $subf[$i][1], '', $tagslib, '', 'opac' );
313
                $subf[$i][1], '', $tagslib, '', 'opac' );
312
        }
314
        }
315
316
        if ( $subf[$i][0] eq 'd' || $subf[$i][0] eq 'q' || $subf[$i][0] eq 'r' || $subf[$i][0] eq 's' || $subf[$i][0] eq 'w' ){
317
            # date accessioned || on loan || date last seen || date last borrowed || replacement price date
318
            $item->{$subf[$i][0]} = output_pref({ dt => dt_from_string( $item->{$subf[$i][0]} ), dateonly => 1 });;
319
        }
313
    }
320
    }
314
    push @item_loop, $item if $item;
321
    push @item_loop, $item if $item;
315
}
322
}
316
- 

Return to bug 5103