Lines 154-164
sub generate_subfield_form {
Link Here
|
154 |
|
154 |
|
155 |
my $pref_itemcallnumber = C4::Context->preference('itemcallnumber'); |
155 |
my $pref_itemcallnumber = C4::Context->preference('itemcallnumber'); |
156 |
if (!$value && $subfieldlib->{kohafield} eq 'items.itemcallnumber' && $pref_itemcallnumber) { |
156 |
if (!$value && $subfieldlib->{kohafield} eq 'items.itemcallnumber' && $pref_itemcallnumber) { |
157 |
my $CNtag = substr($pref_itemcallnumber, 0, 3); |
157 |
foreach my $pref_itemcallnumber_part (split(/,/, $pref_itemcallnumber)){ |
158 |
my $CNsubfield = substr($pref_itemcallnumber, 3, 1); |
158 |
my $CNtag = substr($pref_itemcallnumber_part, 0, 3); |
159 |
my $CNsubfield2 = substr($pref_itemcallnumber, 4, 1); |
159 |
my $temp2 = $temp->field($CNtag); |
160 |
my $temp2 = $temp->field($CNtag); |
160 |
next unless $temp2; |
161 |
if ($temp2) { |
161 |
my $CNsubfield = substr($pref_itemcallnumber_part, 3, 1); |
|
|
162 |
my $CNsubfield2 = substr($pref_itemcallnumber_part, 4, 1); |
162 |
$value = join ' ', $temp2->subfield($CNsubfield) || q{}, $temp2->subfield($CNsubfield2) || q{}; |
163 |
$value = join ' ', $temp2->subfield($CNsubfield) || q{}, $temp2->subfield($CNsubfield2) || q{}; |
163 |
#remove any trailing space incase one subfield is used |
164 |
#remove any trailing space incase one subfield is used |
164 |
$value =~ s/^\s+|\s+$//g; |
165 |
$value =~ s/^\s+|\s+$//g; |
Lines 883-890
foreach my $subfield_code (sort keys(%witness)) {
Link Here
|
883 |
my @loop_data =(); |
884 |
my @loop_data =(); |
884 |
my $i=0; |
885 |
my $i=0; |
885 |
|
886 |
|
886 |
my $pref_itemcallnumber = C4::Context->preference('itemcallnumber'); |
|
|
887 |
|
888 |
my $branch = $input->param('branch') || C4::Context->userenv->{branch}; |
887 |
my $branch = $input->param('branch') || C4::Context->userenv->{branch}; |
889 |
my $libraries = Koha::Libraries->search({}, { order_by => ['branchname'] })->unblessed;# build once ahead of time, instead of multiple times later. |
888 |
my $libraries = Koha::Libraries->search({}, { order_by => ['branchname'] })->unblessed;# build once ahead of time, instead of multiple times later. |
890 |
for my $library ( @$libraries ) { |
889 |
for my $library ( @$libraries ) { |
891 |
- |
|
|