Lines 108-115
sub _increment_barcode {
Link Here
|
108 |
|
108 |
|
109 |
|
109 |
|
110 |
sub generate_subfield_form { |
110 |
sub generate_subfield_form { |
111 |
my ($tag, $subfieldtag, $value, $tagslib,$subfieldlib, $branches, $biblionumber, $temp, $loop_data, $i, $restrictededition, $item) = @_; |
111 |
my ($tag, $subfieldtag, $value, $tagslib,$subfieldlib, $branches, $biblionumber, $temp, $loop_data, $i, $restrictededition, $item, $patron) = @_; |
112 |
|
112 |
|
113 |
my $frameworkcode = &GetFrameworkCode($biblionumber); |
113 |
my $frameworkcode = &GetFrameworkCode($biblionumber); |
114 |
|
114 |
|
115 |
my %subfield_data; |
115 |
my %subfield_data; |
Lines 188-194
sub generate_subfield_form {
Link Here
|
188 |
} |
188 |
} |
189 |
} |
189 |
} |
190 |
elsif ( $subfieldlib->{authorised_value} eq "branches" ) { |
190 |
elsif ( $subfieldlib->{authorised_value} eq "branches" ) { |
|
|
191 |
my @allowed = $patron->libraries_where_can_edit_items; |
191 |
foreach my $thisbranch (@$branches) { |
192 |
foreach my $thisbranch (@$branches) { |
|
|
193 |
next unless any { /^$thisbranch->{branchcode}$/ } @allowed; |
192 |
push @authorised_values, $thisbranch->{branchcode}; |
194 |
push @authorised_values, $thisbranch->{branchcode}; |
193 |
$authorised_lib{$thisbranch->{branchcode}} = $thisbranch->{branchname}; |
195 |
$authorised_lib{$thisbranch->{branchcode}} = $thisbranch->{branchname}; |
194 |
$value = $thisbranch->{branchcode} if $thisbranch->{selected} && !$value; |
196 |
$value = $thisbranch->{branchcode} if $thisbranch->{selected} && !$value; |
Lines 973-979
if($itemrecord){
Link Here
|
973 |
|
975 |
|
974 |
next if ($tagslib->{$tag}->{$subfieldtag}->{'tab'} ne "10"); |
976 |
next if ($tagslib->{$tag}->{$subfieldtag}->{'tab'} ne "10"); |
975 |
|
977 |
|
976 |
my $subfield_data = generate_subfield_form($tag, $subfieldtag, $value, $tagslib, $subfieldlib, $libraries, $biblionumber, $temp, \@loop_data, $i, $restrictededition, $item); |
978 |
my $subfield_data = generate_subfield_form($tag, $subfieldtag, $value, $tagslib, $subfieldlib, $libraries, $biblionumber, $temp, \@loop_data, $i, $restrictededition, $item, $patron); |
977 |
push @fields, "$tag$subfieldtag"; |
979 |
push @fields, "$tag$subfieldtag"; |
978 |
push (@loop_data, $subfield_data); |
980 |
push (@loop_data, $subfield_data); |
979 |
$i++; |
981 |
$i++; |
Lines 997-1003
foreach my $tag ( keys %{$tagslib}){
Link Here
|
997 |
my @values = (undef); |
999 |
my @values = (undef); |
998 |
@values = $itemrecord->field($tag)->subfield($subtag) if ($itemrecord && defined($itemrecord->field($tag)) && defined($itemrecord->field($tag)->subfield($subtag))); |
1000 |
@values = $itemrecord->field($tag)->subfield($subtag) if ($itemrecord && defined($itemrecord->field($tag)) && defined($itemrecord->field($tag)->subfield($subtag))); |
999 |
for my $value (@values){ |
1001 |
for my $value (@values){ |
1000 |
my $subfield_data = generate_subfield_form($tag, $subtag, $value, $tagslib, $tagslib->{$tag}->{$subtag}, $libraries, $biblionumber, $temp, \@loop_data, $i, $restrictededition, $item); |
1002 |
my $subfield_data = generate_subfield_form($tag, $subtag, $value, $tagslib, $tagslib->{$tag}->{$subtag}, $libraries, $biblionumber, $temp, \@loop_data, $i, $restrictededition, $item, $patron); |
1001 |
push (@loop_data, $subfield_data); |
1003 |
push (@loop_data, $subfield_data); |
1002 |
$i++; |
1004 |
$i++; |
1003 |
} |
1005 |
} |