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

(-)a/C4/Koha.pm (+2 lines)
Lines 581-586 sub display_marc_indicators { Link Here
581
sub GetNormalizedUPC {
581
sub GetNormalizedUPC {
582
    my ($marcrecord,$marcflavour) = @_;
582
    my ($marcrecord,$marcflavour) = @_;
583
583
584
    $marcflavour ||= C4::Context->preference('marcflavour');
585
584
    return unless $marcrecord;
586
    return unless $marcrecord;
585
    if ($marcflavour eq 'UNIMARC') {
587
    if ($marcflavour eq 'UNIMARC') {
586
        my @fields = $marcrecord->field('072');
588
        my @fields = $marcrecord->field('072');
(-)a/Koha/Biblio.pm (-2 / +15 lines)
Lines 23-29 use List::MoreUtils qw( any ); Link Here
23
use URI;
23
use URI;
24
use URI::Escape qw( uri_escape_utf8 );
24
use URI::Escape qw( uri_escape_utf8 );
25
25
26
use C4::Koha qw( GetNormalizedISBN );
26
use C4::Koha qw( GetNormalizedISBN GetNormalizedUPC );
27
27
28
use Koha::Database;
28
use Koha::Database;
29
use Koha::DateUtils qw( dt_from_string );
29
use Koha::DateUtils qw( dt_from_string );
Lines 1244-1249 sub normalized_isbn { Link Here
1244
    return C4::Koha::GetNormalizedISBN($self->biblioitem->isbn);
1244
    return C4::Koha::GetNormalizedISBN($self->biblioitem->isbn);
1245
}
1245
}
1246
1246
1247
=head3 normalized_upc
1248
1249
    my $normalized_upc = $biblio->normalized_upc
1250
1251
Normalizes and returns the UPC value found in the MARC record.
1252
1253
=cut
1254
1255
sub normalized_upc {
1256
    my ( $self ) = @_;
1257
    my $marc_record = $self->metadata->record;
1258
    return C4::Koha::GetNormalizedUPC( $marc_record );
1259
}
1260
1247
=head3 to_api
1261
=head3 to_api
1248
1262
1249
    my $json = $biblio->to_api;
1263
    my $json = $biblio->to_api;
1250
- 

Return to bug 33955