Lines 991-998
sub BuildSummary {
Link Here
|
991 |
use C4::Heading::MARC21; |
991 |
use C4::Heading::MARC21; |
992 |
my $handler = C4::Heading::MARC21->new(); |
992 |
my $handler = C4::Heading::MARC21->new(); |
993 |
my $subfields_to_report; |
993 |
my $subfields_to_report; |
994 |
my $subfields_to_subdivision=""; |
994 |
my $subfields_to_subdivision = ""; |
995 |
my $delimiter = C4::Context->preference('AuthoritySeparator'); |
995 |
my $delimiter = C4::Context->preference('AuthoritySeparator'); |
996 |
|
996 |
|
997 |
foreach my $field ($record->field('1..')) { |
997 |
foreach my $field ($record->field('1..')) { |
998 |
my $tag = $field->tag(); |
998 |
my $tag = $field->tag(); |
Lines 1071-1140
sub BuildSummary {
Link Here
|
1071 |
push @notes, { note => $field->as_string(), field => $field->tag() }; |
1071 |
push @notes, { note => $field->as_string(), field => $field->tag() }; |
1072 |
} |
1072 |
} |
1073 |
|
1073 |
|
1074 |
foreach my $field ($record->field('7..')) |
1074 |
foreach my $field ( $record->field('7..') ) { |
1075 |
{ |
1075 |
my $tag = $field->tag(); |
1076 |
my $tag = $field->tag(); |
1076 |
|
1077 |
|
1077 |
if ( $tag eq '700' ) { |
1078 |
if ($tag eq '700') { |
1078 |
$subfields_to_report = 'abcdefghjklmnopqrst'; |
1079 |
$subfields_to_report = 'abcdefghjklmnopqrst'; |
1079 |
$subfields_to_subdivision = 'vxyz'; |
1080 |
$subfields_to_subdivision='vxyz'; |
1080 |
} elsif ( $tag eq '710' ) { |
1081 |
} elsif ($tag eq '710') { |
1081 |
$subfields_to_report = 'abcdefghklmnoprst'; |
1082 |
$subfields_to_report = 'abcdefghklmnoprst'; |
1082 |
$subfields_to_subdivision = 'vxyz'; |
1083 |
$subfields_to_subdivision='vxyz'; |
1083 |
} elsif ( $tag eq '711' ) { |
1084 |
} elsif ($tag eq '711') { |
1084 |
$subfields_to_report = 'acdefghklnpqst'; |
1085 |
$subfields_to_report = 'acdefghklnpqst'; |
1085 |
$subfields_to_subdivision = 'vxyz'; |
1086 |
$subfields_to_subdivision='vxyz'; |
1086 |
} elsif ( $tag eq '730' ) { |
1087 |
} elsif ($tag eq '730') { |
1087 |
$subfields_to_report = 'adfghklmnoprst'; |
1088 |
$subfields_to_report = 'adfghklmnoprst'; |
1088 |
$subfields_to_subdivision = 'vxyz'; |
1089 |
$subfields_to_subdivision='vxyz'; |
1089 |
} elsif ( $tag eq '748' ) { |
1090 |
} elsif ($tag eq '748') { |
1090 |
$subfields_to_report = 'ab'; |
1091 |
$subfields_to_report = 'ab'; |
1091 |
$subfields_to_subdivision = 'vxyz'; |
1092 |
$subfields_to_subdivision='vxyz'; |
1092 |
} elsif ( $tag eq '750' ) { |
1093 |
} elsif ($tag eq '750') { |
1093 |
$subfields_to_report = 'ab'; |
1094 |
$subfields_to_report = 'ab'; |
1094 |
$subfields_to_subdivision = 'vxyz'; |
1095 |
$subfields_to_subdivision='vxyz'; |
1095 |
} elsif ( $tag eq '751' ) { |
1096 |
} elsif ($tag eq '751') { |
1096 |
$subfields_to_report = 'a'; |
1097 |
$subfields_to_report = 'a'; |
1097 |
$subfields_to_subdivision = 'vxyz'; |
1098 |
$subfields_to_subdivision='vxyz'; |
1098 |
} elsif ( $tag eq '755' ) { |
1099 |
} elsif ($tag eq '755') { |
1099 |
$subfields_to_report = 'abvxyz'; |
1100 |
$subfields_to_report = 'abvxyz'; |
1100 |
$subfields_to_subdivision = 'vxyz'; |
1101 |
$subfields_to_subdivision='vxyz'; |
1101 |
} elsif ( $tag eq '780' ) { |
1102 |
} elsif ($tag eq '780') { |
1102 |
$subfields_to_report = 'vxyz'; |
1103 |
$subfields_to_report = 'vxyz'; |
1103 |
$delimiter = " "; |
1104 |
$delimiter=" "; |
1104 |
} elsif ( $tag eq '781' ) { |
1105 |
} elsif ($tag eq '781') { |
1105 |
$subfields_to_report = 'vxyz'; |
1106 |
$subfields_to_report = 'vxyz'; |
1106 |
$delimiter = " "; |
1107 |
$delimiter=" "; |
1107 |
} elsif ( $tag eq '782' ) { |
1108 |
} elsif ($tag eq '782') { |
1108 |
$subfields_to_report = 'vxyz'; |
1109 |
$subfields_to_report = 'vxyz'; |
1109 |
$delimiter = " "; |
1110 |
$delimiter=" "; |
1110 |
} elsif ( $tag eq '785' ) { |
1111 |
} elsif ($tag eq '785') { |
1111 |
$subfields_to_report = 'vxyz'; |
1112 |
$subfields_to_report = 'vxyz'; |
1112 |
$delimiter = " "; |
1113 |
$delimiter=" "; |
1113 |
} |
1114 |
} |
|
|
1115 |
|
1114 |
|
1116 |
my $heading = $field->as_string($subfields_to_report); |
1115 |
my $heading = $field->as_string($subfields_to_report); |
1117 |
|
1116 |
|
1118 |
my $subheading = $field->as_string($subfields_to_subdivision,$delimiter); |
1117 |
my $subheading = $field->as_string( $subfields_to_subdivision, $delimiter ); |
1119 |
if(length $subheading > 0 ) |
1118 |
if ( length $subheading > 0 ) { |
1120 |
{ |
1119 |
$heading .= $delimiter . $subheading; |
1121 |
$heading.=$delimiter.$subheading; |
1120 |
} |
1122 |
} |
|
|
1123 |
|
1121 |
|
1124 |
if ($subfields_to_report) { |
1122 |
if ($subfields_to_report) { |
1125 |
push @equalterm, { |
1123 |
push @equalterm, { |
1126 |
heading => $heading, |
1124 |
heading => $heading, |
1127 |
hemain => ( $field->subfield( substr($subfields_to_report, 0, 1) ) // undef ), |
1125 |
hemain => ( $field->subfield( substr( $subfields_to_report, 0, 1 ) ) // undef ), |
1128 |
field => $tag, |
1126 |
field => $tag, |
1129 |
}; |
1127 |
}; |
1130 |
} else { |
1128 |
} else { |
1131 |
push @equalterm, { |
1129 |
push @equalterm, { |
1132 |
heading => $field->as_string(), |
1130 |
heading => $field->as_string(), |
1133 |
hemain => ( $field->subfield( 'a' ) // undef ), |
1131 |
hemain => ( $field->subfield('a') // undef ), |
1134 |
field => $tag, |
1132 |
field => $tag, |
1135 |
}; |
1133 |
}; |
1136 |
} |
|
|
1137 |
} |
1134 |
} |
|
|
1135 |
} |
1138 |
|
1136 |
|
1139 |
foreach my $field ($record->field('880')) { |
1137 |
foreach my $field ($record->field('880')) { |
1140 |
my $linkage = $field->subfield('6'); |
1138 |
my $linkage = $field->subfield('6'); |
Lines 1156-1169
sub BuildSummary {
Link Here
|
1156 |
push @otherscript, { term => $field->as_string($subfields_to_report), category => $category, type => $type, direction => $direction, linkage => $linkage }; |
1154 |
push @otherscript, { term => $field->as_string($subfields_to_report), category => $category, type => $type, direction => $direction, linkage => $linkage }; |
1157 |
} |
1155 |
} |
1158 |
} |
1156 |
} |
1159 |
$summary{mainentry} = $authorized[0]->{heading}; |
1157 |
$summary{mainentry} = $authorized[0]->{heading}; |
1160 |
$summary{mainmainentry} = $authorized[0]->{hemain}; |
1158 |
$summary{mainmainentry} = $authorized[0]->{hemain}; |
1161 |
$summary{authorized} = \@authorized; |
1159 |
$summary{authorized} = \@authorized; |
1162 |
$summary{notes} = \@notes; |
1160 |
$summary{notes} = \@notes; |
1163 |
$summary{seefrom} = \@seefrom; |
1161 |
$summary{seefrom} = \@seefrom; |
1164 |
$summary{seealso} = \@seealso; |
1162 |
$summary{seealso} = \@seealso; |
1165 |
$summary{otherscript} = \@otherscript; |
1163 |
$summary{otherscript} = \@otherscript; |
1166 |
$summary{equalterm} = \@equalterm; |
1164 |
$summary{equalterm} = \@equalterm; |
1167 |
return \%summary; |
1165 |
return \%summary; |
1168 |
} |
1166 |
} |
1169 |
|
1167 |
|