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 559-574 if ($StaffDetailItemSelection) { Link Here
559
559
560
$template->param(biblio => $biblio);
560
$template->param(biblio => $biblio);
561
561
562
my $orders =
563
  Koha::Acquisition::Orders->search( { biblionumber => $biblionumber } );
564
565
$template->param(
566
    countorders => $orders->search( {
567
        datecancellationprinted => [ undef, '0000-00-00' ]
568
    } )->count,
569
    countdeletedorders => $orders->search( {
570
        datecancellationprinted => [ { '!=' => [ -and => ( undef, '0000-00-00' ) ] } ]
571
    } )->count,
572
) if $orders->count;
573
574
output_html_with_http_headers $query, $cookie, $template->output;
562
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 266-296 $template->param( Link Here
266
    biblioitemnumber    => $bi,
266
    biblioitemnumber    => $bi,
267
    itemnumber          => $itemnumber,
267
    itemnumber          => $itemnumber,
268
    z3950_search_params => C4::Search::z3950_search_args(GetBiblioData($biblionumber)),
268
    z3950_search_params => C4::Search::z3950_search_args(GetBiblioData($biblionumber)),
269
    biblio              => $biblio->unblessed,
269
    biblio              => $biblio,
270
);
270
);
271
$template->param(ONLY_ONE => 1) if ( $itemnumber && $showncount != @items );
271
$template->param(ONLY_ONE => 1) if ( $itemnumber && $showncount != @items );
272
$template->{'VARS'}->{'searchid'} = $query->param('searchid');
272
$template->{'VARS'}->{'searchid'} = $query->param('searchid');
273
273
274
my @allorders_using_biblio = GetOrdersByBiblionumber ($biblionumber);
275
my @deletedorders_using_biblio;
276
my @orders_using_biblio;
277
278
foreach my $myorder (@allorders_using_biblio) {
279
    my $basket = $myorder->{'basketno'};
280
    if ((defined $myorder->{'datecancellationprinted'}) and  ($myorder->{'datecancellationprinted'} ne '0000-00-00') ){
281
        push @deletedorders_using_biblio, $myorder;
282
    }
283
    else {
284
        push @orders_using_biblio, $myorder;
285
    }
286
}
287
288
my $count_orders_using_biblio = scalar @orders_using_biblio ;
289
$template->param (countorders => $count_orders_using_biblio);
290
291
my $count_deletedorders_using_biblio = scalar @deletedorders_using_biblio ;
292
$template->param (countdeletedorders => $count_deletedorders_using_biblio);
293
294
my $holds = $biblio->holds;
274
my $holds = $biblio->holds;
295
$template->param( holdcount => $holds->count );
275
$template->param( holdcount => $holds->count );
296
276
297
- 

Return to bug 23166