Lines 192-197
the field values 'value' for that field. Example where field_id = 2 is the only
Link Here
|
192 |
sub get_additional_field_values_for_template { |
192 |
sub get_additional_field_values_for_template { |
193 |
my ($self) = @_; |
193 |
my ($self) = @_; |
194 |
|
194 |
|
|
|
195 |
$self->_update_marc_get_fields(); |
195 |
my $additional_field_ids = $self->additional_field_values->search( |
196 |
my $additional_field_ids = $self->additional_field_values->search( |
196 |
{}, |
197 |
{}, |
197 |
{ |
198 |
{ |
Lines 210-215
sub get_additional_field_values_for_template {
Link Here
|
210 |
return \%fields; |
211 |
return \%fields; |
211 |
} |
212 |
} |
212 |
|
213 |
|
|
|
214 |
=head3 _update_marc_get_fields |
215 |
|
216 |
Update additional field in db according to their marc value |
217 |
|
218 |
$self->_update_marc_get_fields() |
219 |
|
220 |
=cut |
221 |
|
222 |
sub _update_marc_get_fields { |
223 |
my ($self) = @_; |
224 |
my $tablename = $self->_result->table; |
225 |
my @additional_fields = Koha::AdditionalFields->search( |
226 |
{ |
227 |
tablename => $tablename, |
228 |
marcfield_mode => 'get', |
229 |
-not => { marcfield => undef }, |
230 |
-not => { marcfield => '' } |
231 |
} |
232 |
)->get_column('id'); |
233 |
my @additional_get_fields = map { { id => $_ } } @additional_fields; |
234 |
$self->set_additional_fields( \@additional_get_fields ); |
235 |
} |
236 |
|
213 |
=head3 additional_field_values |
237 |
=head3 additional_field_values |
214 |
|
238 |
|
215 |
Returns additional field values |
239 |
Returns additional field values |
216 |
- |
|
|