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