Link Here
|
96 |
} |
96 |
} |
97 |
} |
97 |
} |
98 |
$template->param( is_an_edit => 1); |
98 |
$template->param( is_an_edit => 1); |
99 |
$template->param( |
99 |
$template->param( additional_field_values => |
100 |
additional_field_values => { map { |
100 |
Koha::Acquisition::Baskets->find($basketno)->get_additional_field_values_for_template ); |
101 |
$_->field->id => $_->value |
|
|
102 |
} Koha::Acquisition::Baskets->find($basketno)->additional_field_values->as_list }, |
103 |
); |
104 |
} else { |
101 |
} else { |
105 |
#new basket |
102 |
#new basket |
106 |
my $basket; |
103 |
my $basket; |
Link Here
|
168 |
my @additional_fields; |
165 |
my @additional_fields; |
169 |
my $basket_fields = Koha::AdditionalFields->search({ tablename => 'aqbasket' }); |
166 |
my $basket_fields = Koha::AdditionalFields->search({ tablename => 'aqbasket' }); |
170 |
while ( my $field = $basket_fields->next ) { |
167 |
while ( my $field = $basket_fields->next ) { |
171 |
my $value = $input->param('additional_field_' . $field->id); |
168 |
my @field_values = $input->param( 'additional_field_' . $field->id ); |
172 |
push @additional_fields, { |
169 |
foreach my $value (@field_values) { |
173 |
id => $field->id, |
170 |
push @additional_fields, { |
174 |
value => $value, |
171 |
id => $field->id, |
175 |
}; |
172 |
value => $value, |
|
|
173 |
} if $value; |
174 |
} |
176 |
} |
175 |
} |
177 |
Koha::Acquisition::Baskets->find($basketno)->set_additional_fields(\@additional_fields); |
176 |
Koha::Acquisition::Baskets->find($basketno)->set_additional_fields(\@additional_fields); |
178 |
|
177 |
|