Lines 112-118
sub _increment_barcode {
Link Here
|
112 |
|
112 |
|
113 |
|
113 |
|
114 |
sub generate_subfield_form { |
114 |
sub generate_subfield_form { |
115 |
my ($tag, $subfieldtag, $value, $tagslib,$subfieldlib, $branches, $biblionumber, $temp, $loop_data, $i, $restrictededition) = @_; |
115 |
my ($tag, $subfieldtag, $value, $tagslib,$subfieldlib, $branches, $biblionumber, $temp, $loop_data, $i, $restrictededition, $patron) = @_; |
116 |
|
116 |
|
117 |
my $frameworkcode = &GetFrameworkCode($biblionumber); |
117 |
my $frameworkcode = &GetFrameworkCode($biblionumber); |
118 |
|
118 |
|
Lines 175-181
sub generate_subfield_form {
Link Here
|
175 |
my %authorised_lib; |
175 |
my %authorised_lib; |
176 |
# builds list, depending on authorised value... |
176 |
# builds list, depending on authorised value... |
177 |
if ( $subfieldlib->{authorised_value} eq "branches" ) { |
177 |
if ( $subfieldlib->{authorised_value} eq "branches" ) { |
|
|
178 |
my @allowed = $patron->libraries_where_can_edit_items; |
178 |
foreach my $thisbranch (@$branches) { |
179 |
foreach my $thisbranch (@$branches) { |
|
|
180 |
next unless any { /^$thisbranch->{branchcode}$/ } @allowed; |
179 |
push @authorised_values, $thisbranch->{branchcode}; |
181 |
push @authorised_values, $thisbranch->{branchcode}; |
180 |
$authorised_lib{$thisbranch->{branchcode}} = $thisbranch->{branchname}; |
182 |
$authorised_lib{$thisbranch->{branchcode}} = $thisbranch->{branchname}; |
181 |
$value = $thisbranch->{branchcode} if $thisbranch->{selected} && !$value; |
183 |
$value = $thisbranch->{branchcode} if $thisbranch->{selected} && !$value; |
Lines 914-920
if($itemrecord){
Link Here
|
914 |
|
916 |
|
915 |
next if ($tagslib->{$tag}->{$subfieldtag}->{'tab'} ne "10"); |
917 |
next if ($tagslib->{$tag}->{$subfieldtag}->{'tab'} ne "10"); |
916 |
|
918 |
|
917 |
my $subfield_data = generate_subfield_form($tag, $subfieldtag, $value, $tagslib, $subfieldlib, $libraries, $biblionumber, $temp, \@loop_data, $i, $restrictededition); |
919 |
my $subfield_data = generate_subfield_form($tag, $subfieldtag, $value, $tagslib, $subfieldlib, $libraries, $biblionumber, $temp, \@loop_data, $i, $restrictededition, $patron); |
918 |
push @fields, "$tag$subfieldtag"; |
920 |
push @fields, "$tag$subfieldtag"; |
919 |
push (@loop_data, $subfield_data); |
921 |
push (@loop_data, $subfield_data); |
920 |
$i++; |
922 |
$i++; |