Lines 3000-3006
sub ModBiblioMarc {
Link Here
|
3000 |
|
3000 |
|
3001 |
=head2 prepare_host_field |
3001 |
=head2 prepare_host_field |
3002 |
|
3002 |
|
3003 |
$marcfield = prepare_host_field( $hostbiblioitem, $marcflavour ); |
3003 |
$marcfield = prepare_host_field( $hostbiblioitem, $marcflavour ); |
|
|
3004 |
|
3004 |
Generate the host item entry for an analytic child entry |
3005 |
Generate the host item entry for an analytic child entry |
3005 |
|
3006 |
|
3006 |
=cut |
3007 |
=cut |
Lines 3015-3020
sub prepare_host_field {
Link Here
|
3015 |
my $field; |
3016 |
my $field; |
3016 |
my $host_field; |
3017 |
my $host_field; |
3017 |
if ( $marcflavour eq 'MARC21' || $marcflavour eq 'NORMARC' ) { |
3018 |
if ( $marcflavour eq 'MARC21' || $marcflavour eq 'NORMARC' ) { |
|
|
3019 |
my $userenv = C4::Context->userenv; |
3020 |
my $library; |
3021 |
if ( $userenv && $userenv->{'branch'} ) { |
3022 |
$library = Koha::Libraries->find( $userenv->{'branch'} ); |
3023 |
} |
3018 |
if ( $field = $host->field('100') || $host->field('110') || $host->field('11') ) { |
3024 |
if ( $field = $host->field('100') || $host->field('110') || $host->field('11') ) { |
3019 |
my $s = $field->as_string('ab'); |
3025 |
my $s = $field->as_string('ab'); |
3020 |
if ($s) { |
3026 |
if ($s) { |
Lines 3052-3058
sub prepare_host_field {
Link Here
|
3052 |
} |
3058 |
} |
3053 |
} |
3059 |
} |
3054 |
if ( $field = $host->field('001') ) { |
3060 |
if ( $field = $host->field('001') ) { |
3055 |
$sfd{w} = $field->data(),; |
3061 |
$sfd{w} = $field->data(); |
|
|
3062 |
if ( $library->get_effective_marcorgcode ) { |
3063 |
if ( $field = $host->field('003') ) { |
3064 |
$sft{w} = "(" . $field->data() . ")" . $sft{w}; |
3065 |
} |
3066 |
} |
3056 |
} |
3067 |
} |
3057 |
$host_field = MARC::Field->new( 773, '0', ' ', %sfd ); |
3068 |
$host_field = MARC::Field->new( 773, '0', ' ', %sfd ); |
3058 |
return $host_field; |
3069 |
return $host_field; |
3059 |
- |
|
|