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

(-)a/C4/ImportBatch.pm (+4 lines)
Lines 634-639 sub BatchCommitRecords { Link Here
634
            foreach my $item_field ($marc_record->field($item_tag)) {
634
            foreach my $item_field ($marc_record->field($item_tag)) {
635
                $marc_record->delete_field($item_field);
635
                $marc_record->delete_field($item_field);
636
            }
636
            }
637
            if(C4::Context->preference('autoControlNumber') eq 'biblionumber'){
638
                my @control_num = $marc_record->field('001');
639
                $marc_record->delete_fields(@control_num);
640
            }
637
        }
641
        }
638
642
639
        my ($record_result, $item_result, $record_match) =
643
        my ($record_result, $item_result, $record_match) =
(-)a/cataloguing/addbiblio.pl (+4 lines)
Lines 82-87 sub MARCfindbreeding { Link Here
82
    # remove the - in isbn, koha store isbn without any -
82
    # remove the - in isbn, koha store isbn without any -
83
    if ($marc) {
83
    if ($marc) {
84
        my $record = MARC::Record->new_from_usmarc($marc);
84
        my $record = MARC::Record->new_from_usmarc($marc);
85
        if(C4::Context->preference('autoControlNumber') eq 'biblionumber'){
86
            my @control_num = $record->field('001');
87
            $record->delete_fields(@control_num);
88
        }
85
        my ($isbnfield,$isbnsubfield) = GetMarcFromKohaField( 'biblioitems.isbn' );
89
        my ($isbnfield,$isbnsubfield) = GetMarcFromKohaField( 'biblioitems.isbn' );
86
        if ( $record->field($isbnfield) ) {
90
        if ( $record->field($isbnfield) ) {
87
            foreach my $field ( $record->field($isbnfield) ) {
91
            foreach my $field ( $record->field($isbnfield) ) {
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/cateditor-ui.inc (+2 lines)
Lines 412-417 require( [ 'koha-backend', 'search', 'macros', 'marc-editor', 'marc-record', 'pr Link Here
412
412
413
        backends[ parts[0] ].get( parts[1], function( record ) {
413
        backends[ parts[0] ].get( parts[1], function( record ) {
414
            if ( !record.error ) {
414
            if ( !record.error ) {
415
                var remove_control_num = [% IF Koha.Preference('autoControlNumber') == 'OFF' %] 0 [% ELSE %] 1 [% END %];
416
                if( remove_control_num ){ record.removeField("001"); }
415
                editor.displayRecord( record );
417
                editor.displayRecord( record );
416
                editor.focus();
418
                editor.focus();
417
            }
419
            }
(-)a/svc/import_bib (-1 / +4 lines)
Lines 79-84 sub import_bib { Link Here
79
        $result->{'error'} = $@;
79
        $result->{'error'} = $@;
80
        return $result;
80
        return $result;
81
    }
81
    }
82
    if(C4::Context->preference('autoControlNumber') eq 'biblionumber'){
83
        my @control_num = $record->field('001');
84
        $marc_record->delete_fields(@control_num);
85
    }
82
86
83
    my $import_record_id = AddBiblioToBatch($batch_id, 0, $marc_record, "utf8", int(rand(99999)));
87
    my $import_record_id = AddBiblioToBatch($batch_id, 0, $marc_record, "utf8", int(rand(99999)));
84
    my @import_items_ids = AddItemsToImportBiblio($batch_id, $import_record_id, $marc_record, 'UPDATE COUNTS');
88
    my @import_items_ids = AddItemsToImportBiblio($batch_id, $import_record_id, $marc_record, 'UPDATE COUNTS');
85
- 

Return to bug 27981