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

(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/checkouts-table.inc (-1 / +2 lines)
Lines 78-84 Link Here
78
                                [% END %]
78
                                [% END %]
79
                            </select>
79
                            </select>
80
                        [% END %]
80
                        [% END %]
81
                       <label for="export_remove_fields">Don't export fields:</label> <input type="text" id="export_remove_fields" name="export_remove_fields" value="[% Koha.Preference('ExportRemoveFields') | html %]" title="Use for MARC exports" />
81
                        <label for="export_items_bundle_contents">Export items bundle contents</label> <input type="checkbox" name="export_items_bundle_contents" id="export_items_bundle_contents">
82
                        <label for="export_remove_fields">Don't export fields:</label> <input type="text" id="export_remove_fields" name="export_remove_fields" value="[% Koha.Preference('ExportRemoveFields') | html %]" title="Use for MARC exports" />
82
                        <input type="hidden" name="op" value="export" />
83
                        <input type="hidden" name="op" value="export" />
83
                        <input type="hidden" id="output_format" name="output_format" value="iso2709" />
84
                        <input type="hidden" id="output_format" name="output_format" value="iso2709" />
84
                        <input type="hidden" id="dont_export_item" name="dont_export_item" value="0" />
85
                        <input type="hidden" id="dont_export_item" name="dont_export_item" value="0" />
(-)a/tools/export.pl (-1 / +16 lines)
Lines 196-201 if ( $op eq "export" ) { Link Here
196
            @record_ids = grep $record_ids{$_}, @filter_record_ids;
196
            @record_ids = grep $record_ids{$_}, @filter_record_ids;
197
        }
197
        }
198
198
199
        my $export_items_bundle_contents = $query->param('export_items_bundle_contents');
200
        if ($export_items_bundle_contents and $record_type eq 'bibs') {
201
            my $schema = Koha::Database->new->schema;
202
            my $items_bundle_rs = $schema->resultset('ItemBundle');
203
            foreach my $itemnumber (@itemnumbers) {
204
                my @item_bundle_items = $items_bundle_rs->search({ host => $itemnumber });
205
                foreach my $item_bundle_item (@item_bundle_items) {
206
                    my $biblionumber = $item_bundle_item->item->get_column('biblionumber');
207
                    my $itemnumber = $item_bundle_item->get_column('item');
208
                    push @record_ids, $biblionumber;
209
                    push @itemnumbers, $itemnumber;
210
                }
211
            }
212
            @record_ids = uniq @record_ids;
213
        }
214
199
        print CGI->new->header(
215
        print CGI->new->header(
200
            -type       => 'application/octet-stream',
216
            -type       => 'application/octet-stream',
201
            -charset    => 'utf-8',
217
            -charset    => 'utf-8',
202
- 

Return to bug 25508