|
Lines 107-114
sub _increment_barcode {
Link Here
|
| 107 |
|
107 |
|
| 108 |
|
108 |
|
| 109 |
sub generate_subfield_form { |
109 |
sub generate_subfield_form { |
| 110 |
my ($tag, $subfieldtag, $value, $tagslib,$subfieldlib, $branches, $biblionumber, $temp, $loop_data, $i, $restrictededition, $item) = @_; |
110 |
my ($tag, $subfieldtag, $value, $tagslib,$subfieldlib, $branches, $biblionumber, $temp, $loop_data, $i, $restrictededition, $item, $patron) = @_; |
| 111 |
|
111 |
|
| 112 |
my $frameworkcode = &GetFrameworkCode($biblionumber); |
112 |
my $frameworkcode = &GetFrameworkCode($biblionumber); |
| 113 |
|
113 |
|
| 114 |
my %subfield_data; |
114 |
my %subfield_data; |
|
Lines 187-193
sub generate_subfield_form {
Link Here
|
| 187 |
} |
187 |
} |
| 188 |
} |
188 |
} |
| 189 |
elsif ( $subfieldlib->{authorised_value} eq "branches" ) { |
189 |
elsif ( $subfieldlib->{authorised_value} eq "branches" ) { |
|
|
190 |
my @allowed = $patron->libraries_where_can_edit_items; |
| 190 |
foreach my $thisbranch (@$branches) { |
191 |
foreach my $thisbranch (@$branches) { |
|
|
192 |
next unless any { /^$thisbranch->{branchcode}$/ } @allowed; |
| 191 |
push @authorised_values, $thisbranch->{branchcode}; |
193 |
push @authorised_values, $thisbranch->{branchcode}; |
| 192 |
$authorised_lib{$thisbranch->{branchcode}} = $thisbranch->{branchname}; |
194 |
$authorised_lib{$thisbranch->{branchcode}} = $thisbranch->{branchname}; |
| 193 |
$value = $thisbranch->{branchcode} if $thisbranch->{selected} && !$value; |
195 |
$value = $thisbranch->{branchcode} if $thisbranch->{selected} && !$value; |
|
Lines 951-957
if($itemrecord){
Link Here
|
| 951 |
|
953 |
|
| 952 |
next if ($tagslib->{$tag}->{$subfieldtag}->{'tab'} ne "10"); |
954 |
next if ($tagslib->{$tag}->{$subfieldtag}->{'tab'} ne "10"); |
| 953 |
|
955 |
|
| 954 |
my $subfield_data = generate_subfield_form($tag, $subfieldtag, $value, $tagslib, $subfieldlib, $libraries, $biblionumber, $temp, \@loop_data, $i, $restrictededition, $item); |
956 |
my $subfield_data = generate_subfield_form($tag, $subfieldtag, $value, $tagslib, $subfieldlib, $libraries, $biblionumber, $temp, \@loop_data, $i, $restrictededition, $item, $patron); |
| 955 |
push @fields, "$tag$subfieldtag"; |
957 |
push @fields, "$tag$subfieldtag"; |
| 956 |
push (@loop_data, $subfield_data); |
958 |
push (@loop_data, $subfield_data); |
| 957 |
$i++; |
959 |
$i++; |
|
Lines 975-981
foreach my $tag ( keys %{$tagslib}){
Link Here
|
| 975 |
my @values = (undef); |
977 |
my @values = (undef); |
| 976 |
@values = $itemrecord->field($tag)->subfield($subtag) if ($itemrecord && defined($itemrecord->field($tag)) && defined($itemrecord->field($tag)->subfield($subtag))); |
978 |
@values = $itemrecord->field($tag)->subfield($subtag) if ($itemrecord && defined($itemrecord->field($tag)) && defined($itemrecord->field($tag)->subfield($subtag))); |
| 977 |
for my $value (@values){ |
979 |
for my $value (@values){ |
| 978 |
my $subfield_data = generate_subfield_form($tag, $subtag, $value, $tagslib, $tagslib->{$tag}->{$subtag}, $libraries, $biblionumber, $temp, \@loop_data, $i, $restrictededition, $item); |
980 |
my $subfield_data = generate_subfield_form($tag, $subtag, $value, $tagslib, $tagslib->{$tag}->{$subtag}, $libraries, $biblionumber, $temp, \@loop_data, $i, $restrictededition, $item, $patron); |
| 979 |
push (@loop_data, $subfield_data); |
981 |
push (@loop_data, $subfield_data); |
| 980 |
$i++; |
982 |
$i++; |
| 981 |
} |
983 |
} |