Lines 29-34
use C4::Output qw( output_html_with_http_headers );
Link Here
|
29 |
use C4::Auth qw( get_template_and_user ); |
29 |
use C4::Auth qw( get_template_and_user ); |
30 |
use C4::Biblio; |
30 |
use C4::Biblio; |
31 |
use C4::AuthoritiesMarc; |
31 |
use C4::AuthoritiesMarc; |
|
|
32 |
use Koha::Acquisition::Orders; |
32 |
use Koha::Virtualshelves; |
33 |
use Koha::Virtualshelves; |
33 |
|
34 |
|
34 |
use Koha::Authorities; |
35 |
use Koha::Authorities; |
Lines 37-45
use Koha::Items;
Link Here
|
37 |
use Koha::BackgroundJob::BatchDeleteBiblio; |
38 |
use Koha::BackgroundJob::BatchDeleteBiblio; |
38 |
use Koha::BackgroundJob::BatchDeleteAuthority; |
39 |
use Koha::BackgroundJob::BatchDeleteAuthority; |
39 |
|
40 |
|
40 |
my $input = CGI->new; |
41 |
my $input = CGI->new; |
41 |
my $op = $input->param('op') // q|form|; |
42 |
my $op = $input->param('op') // q|form|; |
42 |
my $recordtype = $input->param('recordtype') // 'biblio'; |
43 |
my $recordtype = $input->param('recordtype') // 'biblio'; |
|
|
44 |
my $skip_open_orders = $input->param('skip_open_orders') // 0; |
43 |
|
45 |
|
44 |
my ($template, $loggedinuser, $cookie) = get_template_and_user({ |
46 |
my ($template, $loggedinuser, $cookie) = get_template_and_user({ |
45 |
template_name => 'tools/batch_delete_records.tt', |
47 |
template_name => 'tools/batch_delete_records.tt', |
Lines 106-111
if ( $op eq 'form' ) {
Link Here
|
106 |
$biblio->{holds_count} = $biblio_object->holds->count; |
108 |
$biblio->{holds_count} = $biblio_object->holds->count; |
107 |
$biblio->{issues_count} = C4::Biblio::CountItemsIssued( $record_id ); |
109 |
$biblio->{issues_count} = C4::Biblio::CountItemsIssued( $record_id ); |
108 |
$biblio->{subscriptions_count} = $biblio_object->subscriptions->count; |
110 |
$biblio->{subscriptions_count} = $biblio_object->subscriptions->count; |
|
|
111 |
|
112 |
# Respect skip_open_orders |
113 |
next |
114 |
if $skip_open_orders |
115 |
&& Koha::Acquisition::Orders->search( |
116 |
{ biblionumber => $record_id, orderstatus => [ 'new', 'ordered', 'partial' ] } )->count; |
117 |
|
109 |
push @records, $biblio; |
118 |
push @records, $biblio; |
110 |
} else { |
119 |
} else { |
111 |
# Retrieve authority information |
120 |
# Retrieve authority information |
112 |
- |
|
|