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

(-)a/Koha/Exporter/Record.pm (-1 / +1 lines)
Lines 132-138 sub _get_biblio_for_export { Link Here
132
                record       => $record,
132
                record       => $record,
133
                embed_items  => 1,
133
                embed_items  => 1,
134
                biblionumber => $biblionumber,
134
                biblionumber => $biblionumber,
135
                item_numbers => $itemnumbers,
135
                itemnumbers => $itemnumbers,
136
            }
136
            }
137
        );
137
        );
138
        if ($only_export_items_for_branches && @$only_export_items_for_branches) {
138
        if ($only_export_items_for_branches && @$only_export_items_for_branches) {
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/checkouts-table.inc (+1 lines)
Lines 77-82 Link Here
77
                                [% END %]
77
                                [% END %]
78
                            </select>
78
                            </select>
79
                        [% END %]
79
                        [% END %]
80
                        <label for="export_items_bundle_contents">Export items bundle contents</label> <input type="checkbox" name="export_items_bundle_contents" id="export_items_bundle_contents">
80
                       <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_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
                        <input type="hidden" name="op" value="export" />
82
                        <input type="hidden" name="op" value="export" />
82
                        <input type="hidden" id="output_format" name="output_format" value="iso2709" />
83
                        <input type="hidden" id="output_format" name="output_format" value="iso2709" />
(-)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 25503