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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batch_delete_records.tt (+12 lines)
Lines 1-6 Link Here
1
[% USE raw %]
1
[% USE raw %]
2
[% USE Asset %]
2
[% USE Asset %]
3
[% USE Context %]
3
[% SET footerjs = 1 %]
4
[% SET footerjs = 1 %]
5
[% PROCESS 'i18n.inc' %]
4
[% PROCESS 'authorities-search-results.inc' %]
6
[% PROCESS 'authorities-search-results.inc' %]
5
[% INCLUDE 'doc-head-open.inc' %]
7
[% INCLUDE 'doc-head-open.inc' %]
6
<title>Koha &rsaquo; Tools &rsaquo; Batch record deletion</title>
8
<title>Koha &rsaquo; Tools &rsaquo; Batch record deletion</title>
Lines 143-148 Link Here
143
                <th>Items</th>
145
                <th>Items</th>
144
                <th>Holds</th>
146
                <th>Holds</th>
145
                <th>Checkouts</th>
147
                <th>Checkouts</th>
148
                <th>Orders</th>
146
              </tr>
149
              </tr>
147
            </thead>
150
            </thead>
148
            <tbody>
151
            <tbody>
Lines 154-159 Link Here
154
                  <td><a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% biblio.biblionumber | uri %]">[% biblio.itemnumbers.size | html %]</a></td>
157
                  <td><a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% biblio.biblionumber | uri %]">[% biblio.itemnumbers.size | html %]</a></td>
155
                  <td><a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% biblio.biblionumber | uri %]">[% biblio.holds_count | html %]</a></td>
158
                  <td><a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% biblio.biblionumber | uri %]">[% biblio.holds_count | html %]</a></td>
156
                  <td><a href="/cgi-bin/koha/catalogue/issuehistory.pl?biblionumber=[% biblio.biblionumber | uri %]">[% biblio.issues_count | html %]</a></td>
159
                  <td><a href="/cgi-bin/koha/catalogue/issuehistory.pl?biblionumber=[% biblio.biblionumber | uri %]">[% biblio.issues_count | html %]</a></td>
160
                  <td>
161
                    [% IF biblio.current_orders_count %]
162
                        [% tnpx('pluralization', '1 current order', '{count} current orders', biblio.current_orders_count, { count = biblio.current_orders_count }) | $raw  %]
163
                    [% END %]
164
                    [% IF biblio.current_orders_count && biblio.cancelled_orders_count %]<br/>[% END %]
165
                    [% IF biblio.cancelled_orders_count %]
166
                        [% tnpx('pluralization', '1 cancelled order', '{count} cancelled orders', biblio.cancelled_orders_count, { count = biblio.cancelled_orders_count }) | $raw  %]
167
                    [% END %]
168
                  </td>
157
                </tr>
169
                </tr>
158
              [% END %]
170
              [% END %]
159
            </tbody>
171
            </tbody>
(-)a/tools/batch_delete_records.pl (-5 / +6 lines)
Lines 81-88 if ( $op eq 'form' ) { Link Here
81
    for my $record_id ( uniq @record_ids ) {
81
    for my $record_id ( uniq @record_ids ) {
82
        if ( $recordtype eq 'biblio' ) {
82
        if ( $recordtype eq 'biblio' ) {
83
            # Retrieve biblio information
83
            # Retrieve biblio information
84
            my $biblio = Koha::Biblios->find( $record_id );
84
            my $biblio_object = Koha::Biblios->find( $record_id );
85
            unless ( $biblio ) {
85
            unless ( $biblio_object ) {
86
                push @messages, {
86
                push @messages, {
87
                    type => 'warning',
87
                    type => 'warning',
88
                    code => 'biblio_not_exists',
88
                    code => 'biblio_not_exists',
Lines 90-101 if ( $op eq 'form' ) { Link Here
90
                };
90
                };
91
                next;
91
                next;
92
            }
92
            }
93
            my $holds_count = $biblio->holds->count;
93
            my $holds_count = $biblio_object->holds->count;
94
            $biblio = $biblio->unblessed;
94
            my $biblio = $biblio_object->unblessed;
95
            my $record = &GetMarcBiblio({ biblionumber => $record_id });
95
            my $record = &GetMarcBiblio({ biblionumber => $record_id });
96
            $biblio->{itemnumbers} = [Koha::Items->search({ biblionumber => $record_id })->get_column('itemnumber')];
96
            $biblio->{itemnumbers} = [Koha::Items->search({ biblionumber => $record_id })->get_column('itemnumber')];
97
            $biblio->{holds_count} = $holds_count;
97
            $biblio->{holds_count} = $holds_count;
98
            $biblio->{issues_count} = C4::Biblio::CountItemsIssued( $record_id );
98
            $biblio->{issues_count} = C4::Biblio::CountItemsIssued( $record_id );
99
            $biblio->{current_orders_count}   = $biblio_object->orders->filter_by_current->count;
100
            $biblio->{cancelled_orders_count} = $biblio_object->orders->filter_by_cancelled->count;
99
            push @records, $biblio;
101
            push @records, $biblio;
100
        } else {
102
        } else {
101
            # Retrieve authority information
103
            # Retrieve authority information
102
- 

Return to bug 27893