Lines 87-99
if ( $op eq "export" ) {
Link Here
|
87 |
my $export_remove_fields = $query->param("export_remove_fields") || q||; |
87 |
my $export_remove_fields = $query->param("export_remove_fields") || q||; |
88 |
my @biblionumbers = $query->multi_param("biblionumbers"); |
88 |
my @biblionumbers = $query->multi_param("biblionumbers"); |
89 |
my @itemnumbers = $query->multi_param("itemnumbers"); |
89 |
my @itemnumbers = $query->multi_param("itemnumbers"); |
|
|
90 |
my $strip_nonlocal_records = $query->param('strip_nonlocal_records'); |
90 |
my $strip_nonlocal_items = $query->param('strip_nonlocal_items'); |
91 |
my $strip_nonlocal_items = $query->param('strip_nonlocal_items'); |
91 |
my @sql_params; |
92 |
my @sql_params; |
92 |
my $sql_query; |
93 |
my $sql_query; |
93 |
|
94 |
|
94 |
my $libraries = $strip_nonlocal_items |
95 |
my $libraries = $strip_nonlocal_records |
95 |
? [ Koha::Libraries->find(C4::Context->userenv->{branch})->unblessed ] |
96 |
? [ Koha::Libraries->find(C4::Context->userenv->{branch})->unblessed ] |
96 |
: Koha::Libraries->search_filtered->unblessed; |
97 |
: Koha::Libraries->search_filtered->unblessed; |
|
|
98 |
my $only_export_items_for_branch = $strip_nonlocal_items ? Koha::Libraries->find(C4::Context->userenv->{branch})->branchcode : undef; |
97 |
my @branchcodes; |
99 |
my @branchcodes; |
98 |
for my $branchcode ( @branch ) { |
100 |
for my $branchcode ( @branch ) { |
99 |
if ( grep { $_->{branchcode} eq $branchcode } @$libraries ) { |
101 |
if ( grep { $_->{branchcode} eq $branchcode } @$libraries ) { |
Lines 209-214
if ( $op eq "export" ) {
Link Here
|
209 |
dont_export_fields => $export_remove_fields, |
211 |
dont_export_fields => $export_remove_fields, |
210 |
csv_profile_id => $csv_profile_id, |
212 |
csv_profile_id => $csv_profile_id, |
211 |
export_items => (not $dont_export_items), |
213 |
export_items => (not $dont_export_items), |
|
|
214 |
only_export_items_for_branch => $only_export_items_for_branch, |
212 |
} |
215 |
} |
213 |
); |
216 |
); |
214 |
} |
217 |
} |
215 |
- |
|
|