Lines 623-638
sub SearchSubscriptions {
Link Here
|
623 |
for my $subscription ( @$results ) { |
623 |
for my $subscription ( @$results ) { |
624 |
$subscription->{cannotedit} = not can_edit_subscription( $subscription ); |
624 |
$subscription->{cannotedit} = not can_edit_subscription( $subscription ); |
625 |
$subscription->{cannotdisplay} = not can_show_subscription( $subscription ); |
625 |
$subscription->{cannotdisplay} = not can_show_subscription( $subscription ); |
626 |
my @additional_field_values = Koha::AdditionalFieldValues->search( |
|
|
627 |
{ |
628 |
field_id => { -in => [ keys %additional_fields_by_id ] }, |
629 |
record_id => $subscription->{subscriptionid} |
630 |
} |
631 |
)->as_list; |
632 |
|
626 |
|
633 |
$subscription->{additional_fields} = { |
627 |
if (%additional_fields_by_id) { |
634 |
map { $additional_fields_by_id{$_->field_id} => $_->value } @additional_field_values |
628 |
my @additional_field_values = Koha::AdditionalFieldValues->search( |
635 |
}; |
629 |
{ |
|
|
630 |
field_id => { -in => [ keys %additional_fields_by_id ] }, |
631 |
record_id => $subscription->{subscriptionid} |
632 |
} |
633 |
)->as_list; |
634 |
|
635 |
$subscription->{additional_fields} = { |
636 |
map { $additional_fields_by_id{$_->field_id} => $_->value } @additional_field_values |
637 |
}; |
638 |
} |
639 |
else { |
640 |
$subscription->{additional_fields} = {}; |
641 |
} |
636 |
} |
642 |
} |
637 |
|
643 |
|
638 |
return @$results; |
644 |
return @$results; |
639 |
- |
|
|