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

(-)a/catalogue/ISBDdetail.pl (-21 lines)
Lines 45-51 use C4::Biblio; Link Here
45
use C4::Items;
45
use C4::Items;
46
use C4::Serials;    # CountSubscriptionFromBiblionumber
46
use C4::Serials;    # CountSubscriptionFromBiblionumber
47
use C4::Search;		# enabled_staff_search_views
47
use C4::Search;		# enabled_staff_search_views
48
use C4::Acquisition qw(GetOrdersByBiblionumber);
49
48
50
use Koha::Biblios;
49
use Koha::Biblios;
51
use Koha::Patrons;
50
use Koha::Patrons;
Lines 151-176 $template->param ( Link Here
151
    biblio              => $biblio,
150
    biblio              => $biblio,
152
);
151
);
153
152
154
my @allorders_using_biblio = GetOrdersByBiblionumber ($biblionumber);
155
my @deletedorders_using_biblio;
156
my @orders_using_biblio;
157
158
foreach my $myorder (@allorders_using_biblio) {
159
    my $basket = $myorder->{'basketno'};
160
    if ((defined $myorder->{'datecancellationprinted'}) and  ($myorder->{'datecancellationprinted'} ne '0000-00-00') ){
161
        push @deletedorders_using_biblio, $myorder;
162
    }
163
    else {
164
        push @orders_using_biblio, $myorder;
165
    }
166
}
167
168
my $count_orders_using_biblio = scalar @orders_using_biblio ;
169
$template->param (countorders => $count_orders_using_biblio);
170
171
my $count_deletedorders_using_biblio = scalar @deletedorders_using_biblio ;
172
$template->param (countdeletedorders => $count_deletedorders_using_biblio);
173
174
my $holds = $biblio->holds;
153
my $holds = $biblio->holds;
175
$template->param( holdcount => $holds->count );
154
$template->param( holdcount => $holds->count );
176
155
(-)a/catalogue/MARCdetail.pl (-24 / +2 lines)
Lines 341-371 $template->param ( Link Here
341
	z3950_search_params		=> C4::Search::z3950_search_args($biblio),
341
	z3950_search_params		=> C4::Search::z3950_search_args($biblio),
342
	C4::Search::enabled_staff_search_views,
342
	C4::Search::enabled_staff_search_views,
343
    searchid                => scalar $query->param('searchid'),
343
    searchid                => scalar $query->param('searchid'),
344
    biblio                  => $biblio_object->unblessed,
344
    biblio                  => $biblio_object,
345
);
345
);
346
346
347
my @allorders_using_biblio = GetOrdersByBiblionumber ($biblionumber);
347
$template->param( holdcount => $biblio_object->holds->count );
348
my @deletedorders_using_biblio;
349
my @orders_using_biblio;
350
351
foreach my $myorder (@allorders_using_biblio) {
352
    my $basket = $myorder->{'basketno'};
353
    if ((defined $myorder->{'datecancellationprinted'}) and  ($myorder->{'datecancellationprinted'} ne '0000-00-00') ){
354
        push @deletedorders_using_biblio, $myorder;
355
    }
356
    else {
357
        push @orders_using_biblio, $myorder;
358
    }
359
}
360
361
my $count_orders_using_biblio = scalar @orders_using_biblio ;
362
$template->param (countorders => $count_orders_using_biblio);
363
364
my $count_deletedorders_using_biblio = scalar @deletedorders_using_biblio ;
365
$template->param (countdeletedorders => $count_deletedorders_using_biblio);
366
367
$biblio = Koha::Biblios->find( $biblionumber );
368
my $holds = $biblio->holds;
369
$template->param( holdcount => $holds->count );
370
348
371
output_html_with_http_headers $query, $cookie, $template->output;
349
output_html_with_http_headers $query, $cookie, $template->output;
(-)a/catalogue/detail.pl (-12 lines)
Lines 554-569 if ($StaffDetailItemSelection) { Link Here
554
554
555
$template->param(biblio => $biblio);
555
$template->param(biblio => $biblio);
556
556
557
my $orders =
558
  Koha::Acquisition::Orders->search( { biblionumber => $biblionumber } );
559
560
$template->param(
561
    countorders => $orders->search( {
562
        datecancellationprinted => [ undef, '0000-00-00' ]
563
    } )->count,
564
    countdeletedorders => $orders->search( {
565
        datecancellationprinted => [ { '!=' => [ -and => ( undef, '0000-00-00' ) ] } ]
566
    } )->count,
567
) if $orders->count;
568
569
output_html_with_http_headers $query, $cookie, $template->output;
557
output_html_with_http_headers $query, $cookie, $template->output;
(-)a/catalogue/imageviewer.pl (-21 lines)
Lines 26-32 use C4::Items; Link Here
26
use C4::Output;
26
use C4::Output;
27
use C4::Images;
27
use C4::Images;
28
use C4::Search;
28
use C4::Search;
29
use C4::Acquisition qw(GetOrdersByBiblionumber);
30
29
31
use Koha::Biblios;
30
use Koha::Biblios;
32
use Koha::Patrons;
31
use Koha::Patrons;
Lines 87-112 $template->{VARS}->{'norequests'} = $norequests; Link Here
87
$template->param(C4::Search::enabled_staff_search_views);
86
$template->param(C4::Search::enabled_staff_search_views);
88
$template->{VARS}->{'biblio'} = $biblio;
87
$template->{VARS}->{'biblio'} = $biblio;
89
88
90
my @allorders_using_biblio = GetOrdersByBiblionumber ($biblionumber);
91
my @deletedorders_using_biblio;
92
my @orders_using_biblio;
93
94
foreach my $myorder (@allorders_using_biblio) {
95
    my $basket = $myorder->{'basketno'};
96
    if ((defined $myorder->{'datecancellationprinted'}) and  ($myorder->{'datecancellationprinted'} ne '0000-00-00') ){
97
        push @deletedorders_using_biblio, $myorder;
98
    }
99
    else {
100
        push @orders_using_biblio, $myorder;
101
    }
102
}
103
104
my $count_orders_using_biblio = scalar @orders_using_biblio ;
105
$template->param (countorders => $count_orders_using_biblio);
106
107
my $count_deletedorders_using_biblio = scalar @deletedorders_using_biblio ;
108
$template->param (countdeletedorders => $count_deletedorders_using_biblio);
109
110
my $hold_count = $biblio ? $biblio->holds->count : 0;
89
my $hold_count = $biblio ? $biblio->holds->count : 0;
111
$template->param( holdcount => $hold_count );
90
$template->param( holdcount => $hold_count );
112
91
(-)a/catalogue/labeledMARCdetail.pl (-22 / +1 lines)
Lines 28-34 use C4::Biblio; Link Here
28
use C4::Items;
28
use C4::Items;
29
use C4::Search;		# enabled_staff_search_views
29
use C4::Search;		# enabled_staff_search_views
30
use C4::Serials;
30
use C4::Serials;
31
use C4::Acquisition qw(GetOrdersByBiblionumber);
32
31
33
use Koha::Biblios;
32
use Koha::Biblios;
34
use Koha::BiblioFrameworks;
33
use Koha::BiblioFrameworks;
Lines 133-160 $template->param ( Link Here
133
    searchid            => scalar $query->param('searchid'),
132
    searchid            => scalar $query->param('searchid'),
134
);
133
);
135
134
136
my @allorders_using_biblio = GetOrdersByBiblionumber ($biblionumber);
137
my @deletedorders_using_biblio;
138
my @orders_using_biblio;
139
140
foreach my $myorder (@allorders_using_biblio) {
141
    my $basket = $myorder->{'basketno'};
142
    if ((defined $myorder->{'datecancellationprinted'}) and  ($myorder->{'datecancellationprinted'} ne '0000-00-00') ){
143
        push @deletedorders_using_biblio, $myorder;
144
    }
145
    else {
146
        push @orders_using_biblio, $myorder;
147
    }
148
}
149
150
my $count_orders_using_biblio = scalar @orders_using_biblio ;
151
$template->param (countorders => $count_orders_using_biblio);
152
153
my $count_deletedorders_using_biblio = scalar @deletedorders_using_biblio ;
154
$template->param (countdeletedorders => $count_deletedorders_using_biblio);
155
156
$biblio = Koha::Biblios->find( $biblionumber );
135
$biblio = Koha::Biblios->find( $biblionumber );
157
my $holds = $biblio->holds;
136
my $holds = $biblio->holds;
158
$template->param( holdcount => $holds->count );
137
$template->param( biblio => $biblio, holdcount => $holds->count );
159
138
160
output_html_with_http_headers $query, $cookie, $template->output;
139
output_html_with_http_headers $query, $cookie, $template->output;
(-)a/catalogue/moredetail.pl (-22 / +1 lines)
Lines 262-292 $template->param( Link Here
262
    biblioitemnumber    => $bi,
262
    biblioitemnumber    => $bi,
263
    itemnumber          => $itemnumber,
263
    itemnumber          => $itemnumber,
264
    z3950_search_params => C4::Search::z3950_search_args(GetBiblioData($biblionumber)),
264
    z3950_search_params => C4::Search::z3950_search_args(GetBiblioData($biblionumber)),
265
    biblio              => $biblio->unblessed,
265
    biblio              => $biblio,
266
);
266
);
267
$template->param(ONLY_ONE => 1) if ( $itemnumber && $showncount != @items );
267
$template->param(ONLY_ONE => 1) if ( $itemnumber && $showncount != @items );
268
$template->{'VARS'}->{'searchid'} = $query->param('searchid');
268
$template->{'VARS'}->{'searchid'} = $query->param('searchid');
269
269
270
my @allorders_using_biblio = GetOrdersByBiblionumber ($biblionumber);
271
my @deletedorders_using_biblio;
272
my @orders_using_biblio;
273
274
foreach my $myorder (@allorders_using_biblio) {
275
    my $basket = $myorder->{'basketno'};
276
    if ((defined $myorder->{'datecancellationprinted'}) and  ($myorder->{'datecancellationprinted'} ne '0000-00-00') ){
277
        push @deletedorders_using_biblio, $myorder;
278
    }
279
    else {
280
        push @orders_using_biblio, $myorder;
281
    }
282
}
283
284
my $count_orders_using_biblio = scalar @orders_using_biblio ;
285
$template->param (countorders => $count_orders_using_biblio);
286
287
my $count_deletedorders_using_biblio = scalar @deletedorders_using_biblio ;
288
$template->param (countdeletedorders => $count_deletedorders_using_biblio);
289
290
my $holds = $biblio->holds;
270
my $holds = $biblio->holds;
291
$template->param( holdcount => $holds->count );
271
$template->param( holdcount => $holds->count );
292
272
293
- 

Return to bug 23166