View | Details | Raw Unified | Return to bug 35044
Collapse All | Expand All

(-)a/acqui/basket.pl (-3 / +2 lines)
Lines 426-434 if ( $op eq 'list' ) { Link Here
426
        duplinbatch          => $duplinbatch,
426
        duplinbatch          => $duplinbatch,
427
        csv_profiles         => Koha::CsvProfiles->search({ type => 'sql', used_for => 'export_basket' }),
427
        csv_profiles         => Koha::CsvProfiles->search({ type => 'sql', used_for => 'export_basket' }),
428
        available_additional_fields => Koha::AdditionalFields->search( { tablename => 'aqbasket' } ),
428
        available_additional_fields => Koha::AdditionalFields->search( { tablename => 'aqbasket' } ),
429
        additional_field_values => { map {
429
        additional_field_values =>
430
            $_->field->name => $_->value
430
            Koha::Acquisition::Baskets->find($basketno)->get_additional_field_values_for_template,
431
        } Koha::Acquisition::Baskets->find($basketno)->additional_field_values->as_list },
432
    );
431
    );
433
}
432
}
434
433
(-)a/acqui/basketheader.pl (-10 / +9 lines)
Lines 96-106 if ( $op eq 'add_form' ) { 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;
Lines 168-178 if ( $op eq 'add_form' ) { 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
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basketheader.tt (-1 / +1 lines)
Lines 162-167 Link Here
162
[% MACRO jsinclude BLOCK %]
162
[% MACRO jsinclude BLOCK %]
163
    [% Asset.js("js/acquisitions-menu.js") | $raw %]
163
    [% Asset.js("js/acquisitions-menu.js") | $raw %]
164
    [% Asset.js("js/acq.js") | $raw %]
164
    [% Asset.js("js/acq.js") | $raw %]
165
    [% Asset.js("js/additional-fields-entry.js") | $raw %]
165
    [% INCLUDE 'select2.inc' %]
166
    [% INCLUDE 'select2.inc' %]
166
<script>
167
<script>
167
168
168
- 

Return to bug 35044