Lines 95-102
sub _increment_barcode {
Link Here
|
95 |
|
95 |
|
96 |
|
96 |
|
97 |
sub generate_subfield_form { |
97 |
sub generate_subfield_form { |
98 |
my ($tag, $subfieldtag, $value, $tagslib,$subfieldlib, $branches, $biblionumber, $temp, $loop_data, $i, $restrictededition, $item) = @_; |
98 |
my ($tag, $subfieldtag, $value, $tagslib,$subfieldlib, $branches, $biblionumber, $temp, $loop_data, $i, $restrictededition, $item, $patron) = @_; |
99 |
|
99 |
|
100 |
my $frameworkcode = &GetFrameworkCode($biblionumber); |
100 |
my $frameworkcode = &GetFrameworkCode($biblionumber); |
101 |
|
101 |
|
102 |
my %subfield_data; |
102 |
my %subfield_data; |
Lines 181-187
sub generate_subfield_form {
Link Here
|
181 |
} |
181 |
} |
182 |
} |
182 |
} |
183 |
elsif ( $subfieldlib->{authorised_value} eq "branches" ) { |
183 |
elsif ( $subfieldlib->{authorised_value} eq "branches" ) { |
|
|
184 |
my @allowed = $patron->libraries_where_can_edit_items; |
184 |
foreach my $thisbranch (@$branches) { |
185 |
foreach my $thisbranch (@$branches) { |
|
|
186 |
next unless any { /^$thisbranch->{branchcode}$/ } @allowed; |
185 |
push @authorised_values, $thisbranch->{branchcode}; |
187 |
push @authorised_values, $thisbranch->{branchcode}; |
186 |
$authorised_lib{$thisbranch->{branchcode}} = $thisbranch->{branchname}; |
188 |
$authorised_lib{$thisbranch->{branchcode}} = $thisbranch->{branchname}; |
187 |
$value = $thisbranch->{branchcode} if $thisbranch->{selected} && !$value; |
189 |
$value = $thisbranch->{branchcode} if $thisbranch->{selected} && !$value; |
Lines 964-970
if($itemrecord){
Link Here
|
964 |
|
966 |
|
965 |
next if ($tagslib->{$tag}->{$subfieldtag}->{'tab'} ne "10"); |
967 |
next if ($tagslib->{$tag}->{$subfieldtag}->{'tab'} ne "10"); |
966 |
|
968 |
|
967 |
my $subfield_data = generate_subfield_form($tag, $subfieldtag, $value, $tagslib, $subfieldlib, $libraries, $biblionumber, $temp, \@loop_data, $i, $restrictededition, $item); |
969 |
my $subfield_data = generate_subfield_form($tag, $subfieldtag, $value, $tagslib, $subfieldlib, $libraries, $biblionumber, $temp, \@loop_data, $i, $restrictededition, $item, $patron); |
968 |
push @fields, "$tag$subfieldtag"; |
970 |
push @fields, "$tag$subfieldtag"; |
969 |
push (@loop_data, $subfield_data); |
971 |
push (@loop_data, $subfield_data); |
970 |
$i++; |
972 |
$i++; |
Lines 988-994
foreach my $tag ( keys %{$tagslib}){
Link Here
|
988 |
my @values = (undef); |
990 |
my @values = (undef); |
989 |
@values = $itemrecord->field($tag)->subfield($subtag) if ($itemrecord && defined($itemrecord->field($tag)) && defined($itemrecord->field($tag)->subfield($subtag))); |
991 |
@values = $itemrecord->field($tag)->subfield($subtag) if ($itemrecord && defined($itemrecord->field($tag)) && defined($itemrecord->field($tag)->subfield($subtag))); |
990 |
for my $value (@values){ |
992 |
for my $value (@values){ |
991 |
my $subfield_data = generate_subfield_form($tag, $subtag, $value, $tagslib, $tagslib->{$tag}->{$subtag}, $libraries, $biblionumber, $temp, \@loop_data, $i, $restrictededition, $item); |
993 |
my $subfield_data = generate_subfield_form($tag, $subtag, $value, $tagslib, $tagslib->{$tag}->{$subtag}, $libraries, $biblionumber, $temp, \@loop_data, $i, $restrictededition, $item, $patron); |
992 |
push (@loop_data, $subfield_data); |
994 |
push (@loop_data, $subfield_data); |
993 |
$i++; |
995 |
$i++; |
994 |
} |
996 |
} |