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

(-)a/tools/batch_delete_records.pl (-8 / +5 lines)
Lines 28-34 use C4::Auth qw( get_template_and_user ); Link Here
28
use C4::Output qw( output_html_with_http_headers );
28
use C4::Output qw( output_html_with_http_headers );
29
use C4::Auth qw( get_template_and_user );
29
use C4::Auth qw( get_template_and_user );
30
use C4::Biblio qw( GetMarcBiblio );
30
use C4::Biblio qw( GetMarcBiblio );
31
use C4::Serials qw( CountSubscriptionFromBiblionumber);
32
use C4::AuthoritiesMarc;
31
use C4::AuthoritiesMarc;
33
use Koha::Virtualshelves;
32
use Koha::Virtualshelves;
34
33
Lines 92-99 if ( $op eq 'form' ) { Link Here
92
    for my $record_id ( uniq @record_ids ) {
91
    for my $record_id ( uniq @record_ids ) {
93
        if ( $recordtype eq 'biblio' ) {
92
        if ( $recordtype eq 'biblio' ) {
94
            # Retrieve biblio information
93
            # Retrieve biblio information
95
            my $biblio = Koha::Biblios->find( $record_id );
94
            my $biblio_object = Koha::Biblios->find( $record_id );
96
            unless ( $biblio ) {
95
            unless ( $biblio_object ) {
97
                push @messages, {
96
                push @messages, {
98
                    type => 'warning',
97
                    type => 'warning',
99
                    code => 'biblio_not_exists',
98
                    code => 'biblio_not_exists',
Lines 101-113 if ( $op eq 'form' ) { Link Here
101
                };
100
                };
102
                next;
101
                next;
103
            }
102
            }
104
            my $holds_count = $biblio->holds->count;
103
            my $biblio = $biblio_object->unblessed;
105
            $biblio = $biblio->unblessed;
106
            my $record = &GetMarcBiblio({ biblionumber => $record_id });
104
            my $record = &GetMarcBiblio({ biblionumber => $record_id });
107
            $biblio->{itemnumbers} = [Koha::Items->search({ biblionumber => $record_id })->get_column('itemnumber')];
105
            $biblio->{itemnumbers} = [Koha::Items->search({ biblionumber => $record_id })->get_column('itemnumber')];
108
            $biblio->{holds_count} = $holds_count;
106
            $biblio->{holds_count} = $biblio_object->holds->count;
109
            $biblio->{issues_count} = C4::Biblio::CountItemsIssued( $record_id );
107
            $biblio->{issues_count} = C4::Biblio::CountItemsIssued( $record_id );
110
            $biblio->{subscriptions_count} = CountSubscriptionFromBiblionumber( $record_id );
108
            $biblio->{subscriptions_count} = $biblio_object->subscriptions->count;
111
            push @records, $biblio;
109
            push @records, $biblio;
112
        } else {
110
        } else {
113
            # Retrieve authority information
111
            # Retrieve authority information
114
- 

Return to bug 9565