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

(-)a/Koha/ERM/EHoldings/Resource.pm (-1 / +4 lines)
Lines 68-74 sub store { Link Here
68
        $biblio_id = $title->biblio_id;
68
        $biblio_id = $title->biblio_id;
69
        C4::Biblio::ModBiblio($marc_record, $title->biblio_id, '');
69
        C4::Biblio::ModBiblio($marc_record, $title->biblio_id, '');
70
    } else {
70
    } else {
71
        ( $biblio_id ) = C4::Biblio::AddBiblio($marc_record, '');
71
        my $eholding_title = Koha::ERM::EHoldings::Titles->find($self->title_id);
72
73
        my $marc_record_from_kart = TransformKohaToMarc( $eholding_title->get_kbart_to_koha_biblio_mapping );
74
        ($biblio_id) = C4::Biblio::AddBiblio( $marc_record_from_kart, '' );
72
    }
75
    }
73
76
74
    $title->biblio_id($biblio_id)->store;
77
    $title->biblio_id($biblio_id)->store;
(-)a/Koha/ERM/EHoldings/Title.pm (-1 / +29 lines)
Lines 58-63 sub resources { Link Here
58
    return Koha::ERM::EHoldings::Resources->_new_from_dbic($resources_rs);
58
    return Koha::ERM::EHoldings::Resources->_new_from_dbic($resources_rs);
59
}
59
}
60
60
61
=head3 resources
62
63
Returns this title's kbart fields in koha fields format
64
65
=cut
66
67
sub get_kbart_to_koha_biblio_mapping {
68
    my ( $self ) = @_;
69
70
    return {
71
        'biblio.copyrightdate' => undef,
72
        'biblio.part_name'     => undef,
73
        'biblio.medium'        => undef,
74
        'biblio.frameworkcode' => undef,
75
        'biblio.subtitle'      => undef,
76
        'biblio.abstract'      => undef,
77
        'biblio.unititle'      => undef,
78
        'biblio.timestamp'     => undef,
79
        'biblio.datecreated'   => undef,
80
        'biblio.part_number'   => undef,
81
        'biblio.author'        => $self->first_author,
82
        'biblio.title'         => $self->publication_title,
83
        'biblio.serial'        => undef,
84
        'biblio.biblionumber'  => $self->biblio_id,
85
        'biblio.notes'         => $self->notes,
86
        'biblio.seriestitle'   => undef
87
    };
88
}
89
61
=head2 Internal methods
90
=head2 Internal methods
62
91
63
=head3 _type
92
=head3 _type
64
- 

Return to bug 35095