Lines 2937-2943
sub ModBiblioMarc {
Link Here
|
2937 |
|
2937 |
|
2938 |
=head2 prepare_host_field |
2938 |
=head2 prepare_host_field |
2939 |
|
2939 |
|
2940 |
$marcfield = prepare_host_field( $hostbiblioitem, $marcflavour ); |
2940 |
$marcfield = prepare_host_field( $hostbiblioitem, $marcflavour ); |
|
|
2941 |
|
2941 |
Generate the host item entry for an analytic child entry |
2942 |
Generate the host item entry for an analytic child entry |
2942 |
|
2943 |
|
2943 |
=cut |
2944 |
=cut |
Lines 2954-2959
sub prepare_host_field {
Link Here
|
2954 |
my $field; |
2955 |
my $field; |
2955 |
my $host_field; |
2956 |
my $host_field; |
2956 |
if ( $marcflavour eq 'MARC21' ) { |
2957 |
if ( $marcflavour eq 'MARC21' ) { |
|
|
2958 |
my $userenv = C4::Context->userenv; |
2959 |
my $library; |
2960 |
if ( $userenv && $userenv->{'branch'} ) { |
2961 |
$library = Koha::Libraries->find( $userenv->{'branch'} ); |
2962 |
} |
2957 |
if ( $field = $host->field('100') || $host->field('110') || $host->field('11') ) { |
2963 |
if ( $field = $host->field('100') || $host->field('110') || $host->field('11') ) { |
2958 |
my $s = $field->as_string('ab'); |
2964 |
my $s = $field->as_string('ab'); |
2959 |
if ($s) { |
2965 |
if ($s) { |
Lines 2991-2997
sub prepare_host_field {
Link Here
|
2991 |
} |
2997 |
} |
2992 |
} |
2998 |
} |
2993 |
if ( $field = $host->field('001') ) { |
2999 |
if ( $field = $host->field('001') ) { |
2994 |
$sfd{w} = $field->data(),; |
3000 |
$sfd{w} = $field->data(); |
|
|
3001 |
if ( $library->get_effective_marcorgcode ) { |
3002 |
if ( $field = $host->field('003') ) { |
3003 |
$sft{w} = "(" . $field->data() . ")" . $sft{w}; |
3004 |
} |
3005 |
} |
2995 |
} |
3006 |
} |
2996 |
$host_field = MARC::Field->new( 773, '0', ' ', %sfd ); |
3007 |
$host_field = MARC::Field->new( 773, '0', ' ', %sfd ); |
2997 |
return $host_field; |
3008 |
return $host_field; |
2998 |
- |
|
|