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 1280-1285 sub public_read_list { Link Here
1280
    ];
1280
    ];
1281
}
1281
}
1282
1282
1283
=head3 normalized_upc
1284
1285
    my $normalized_upc = $biblio->normalized_upc
1286
1287
Normalizes and returns the UPC value found in the MARC record.
1288
1289
=cut
1290
1291
sub normalized_upc {
1292
    my ($self) = @_;
1293
    my $marc_record = $self->metadata->record;
1294
    return C4::Koha::GetNormalizedUPC($marc_record);
1295
}
1296
1283
=head3 to_api
1297
=head3 to_api
1284
1298
1285
    my $json = $biblio->to_api;
1299
    my $json = $biblio->to_api;
1286
- 

Return to bug 33955