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

(-)a/Koha/Holding.pm (-1 / +14 lines)
Lines 338-343 sub marc_to_koha_fields { Link Here
338
        my ($table, $column) = split /[.]/, $kohafield, 2;
338
        my ($table, $column) = split /[.]/, $kohafield, 2;
339
        next unless $table eq 'holdings' && $mss->{$kohafield};
339
        next unless $table eq 'holdings' && $mss->{$kohafield};
340
340
341
        if ( $column eq 'callnumber' && C4::Context->preference('itemcallnumber') ) {
342
343
            my @CN_prefs_mapping;
344
            foreach my $itemcn_pref (split(/,/,C4::Context->preference('itemcallnumber'))){
345
                my $CNtag      = substr( $itemcn_pref, 0, 3 );
346
                my @CNsubfields = split('',substr( $itemcn_pref, 3 ));
347
                @CNsubfields = ('') unless @CNsubfields;
348
                foreach my $CNsubfield (@CNsubfields) {
349
                    push @CN_prefs_mapping, { tagfield => $CNtag, tagsubfield => $CNsubfield };
350
                }
351
            }
352
            @{$mss->{$kohafield}} = @CN_prefs_mapping if @CN_prefs_mapping;
353
        }
354
341
        my @values;
355
        my @values;
342
        foreach my $field (@{$mss->{$kohafield}}) {
356
        foreach my $field (@{$mss->{$kohafield}}) {
343
            my $tag = $field->{tagfield};
357
            my $tag = $field->{tagfield};
344
- 

Return to bug 20447