Lines 1629-1635
sub NewSubscription {
Link Here
|
1629 |
my $record = GetMarcBiblio($biblionumber); |
1629 |
my $record = GetMarcBiblio($biblionumber); |
1630 |
my ( $tag, $subf ) = GetMarcFromKohaField( 'biblio.serial', $bib->{'frameworkcode'} ); |
1630 |
my ( $tag, $subf ) = GetMarcFromKohaField( 'biblio.serial', $bib->{'frameworkcode'} ); |
1631 |
if ($tag) { |
1631 |
if ($tag) { |
1632 |
eval { $record->field($tag)->update( $subf => 1 ); }; |
1632 |
if (my $f = $record->field($tag)) { |
|
|
1633 |
$f->update( $subf => 1 ) |
1634 |
} else { |
1635 |
$record->append_fields(MARC::Field->new($tag, '', '', $subf => 1)); |
1636 |
} |
1633 |
} |
1637 |
} |
1634 |
ModBiblio( $record, $biblionumber, $bib->{'frameworkcode'} ); |
1638 |
ModBiblio( $record, $biblionumber, $bib->{'frameworkcode'} ); |
1635 |
} |
1639 |
} |