@@ -, +, @@ --- catalogue/ISBDdetail.pl | 21 --------------------- catalogue/MARCdetail.pl | 26 ++------------------------ catalogue/detail.pl | 12 ------------ catalogue/imageviewer.pl | 21 --------------------- catalogue/labeledMARCdetail.pl | 23 +---------------------- catalogue/moredetail.pl | 22 +--------------------- 6 files changed, 4 insertions(+), 121 deletions(-) --- a/catalogue/ISBDdetail.pl +++ a/catalogue/ISBDdetail.pl @@ -45,7 +45,6 @@ use C4::Biblio; use C4::Items; use C4::Serials; # CountSubscriptionFromBiblionumber use C4::Search; # enabled_staff_search_views -use C4::Acquisition qw(GetOrdersByBiblionumber); use Koha::Biblios; use Koha::Patrons; @@ -151,26 +150,6 @@ $template->param ( biblio => $biblio, ); -my @allorders_using_biblio = GetOrdersByBiblionumber ($biblionumber); -my @deletedorders_using_biblio; -my @orders_using_biblio; - -foreach my $myorder (@allorders_using_biblio) { - my $basket = $myorder->{'basketno'}; - if ((defined $myorder->{'datecancellationprinted'}) and ($myorder->{'datecancellationprinted'} ne '0000-00-00') ){ - push @deletedorders_using_biblio, $myorder; - } - else { - push @orders_using_biblio, $myorder; - } -} - -my $count_orders_using_biblio = scalar @orders_using_biblio ; -$template->param (countorders => $count_orders_using_biblio); - -my $count_deletedorders_using_biblio = scalar @deletedorders_using_biblio ; -$template->param (countdeletedorders => $count_deletedorders_using_biblio); - my $holds = $biblio->holds; $template->param( holdcount => $holds->count ); --- a/catalogue/MARCdetail.pl +++ a/catalogue/MARCdetail.pl @@ -341,31 +341,9 @@ $template->param ( z3950_search_params => C4::Search::z3950_search_args($biblio), C4::Search::enabled_staff_search_views, searchid => scalar $query->param('searchid'), - biblio => $biblio_object->unblessed, + biblio => $biblio_object, ); -my @allorders_using_biblio = GetOrdersByBiblionumber ($biblionumber); -my @deletedorders_using_biblio; -my @orders_using_biblio; - -foreach my $myorder (@allorders_using_biblio) { - my $basket = $myorder->{'basketno'}; - if ((defined $myorder->{'datecancellationprinted'}) and ($myorder->{'datecancellationprinted'} ne '0000-00-00') ){ - push @deletedorders_using_biblio, $myorder; - } - else { - push @orders_using_biblio, $myorder; - } -} - -my $count_orders_using_biblio = scalar @orders_using_biblio ; -$template->param (countorders => $count_orders_using_biblio); - -my $count_deletedorders_using_biblio = scalar @deletedorders_using_biblio ; -$template->param (countdeletedorders => $count_deletedorders_using_biblio); - -$biblio = Koha::Biblios->find( $biblionumber ); -my $holds = $biblio->holds; -$template->param( holdcount => $holds->count ); +$template->param( holdcount => $biblio_object->holds->count ); output_html_with_http_headers $query, $cookie, $template->output; --- a/catalogue/detail.pl +++ a/catalogue/detail.pl @@ -559,16 +559,4 @@ if ($StaffDetailItemSelection) { $template->param(biblio => $biblio); -my $orders = - Koha::Acquisition::Orders->search( { biblionumber => $biblionumber } ); - -$template->param( - countorders => $orders->search( { - datecancellationprinted => [ undef, '0000-00-00' ] - } )->count, - countdeletedorders => $orders->search( { - datecancellationprinted => [ { '!=' => [ -and => ( undef, '0000-00-00' ) ] } ] - } )->count, -) if $orders->count; - output_html_with_http_headers $query, $cookie, $template->output; --- a/catalogue/imageviewer.pl +++ a/catalogue/imageviewer.pl @@ -26,7 +26,6 @@ use C4::Items; use C4::Output; use C4::Images; use C4::Search; -use C4::Acquisition qw(GetOrdersByBiblionumber); use Koha::Biblios; use Koha::Patrons; @@ -87,26 +86,6 @@ $template->{VARS}->{'norequests'} = $norequests; $template->param(C4::Search::enabled_staff_search_views); $template->{VARS}->{'biblio'} = $biblio; -my @allorders_using_biblio = GetOrdersByBiblionumber ($biblionumber); -my @deletedorders_using_biblio; -my @orders_using_biblio; - -foreach my $myorder (@allorders_using_biblio) { - my $basket = $myorder->{'basketno'}; - if ((defined $myorder->{'datecancellationprinted'}) and ($myorder->{'datecancellationprinted'} ne '0000-00-00') ){ - push @deletedorders_using_biblio, $myorder; - } - else { - push @orders_using_biblio, $myorder; - } -} - -my $count_orders_using_biblio = scalar @orders_using_biblio ; -$template->param (countorders => $count_orders_using_biblio); - -my $count_deletedorders_using_biblio = scalar @deletedorders_using_biblio ; -$template->param (countdeletedorders => $count_deletedorders_using_biblio); - my $hold_count = $biblio ? $biblio->holds->count : 0; $template->param( holdcount => $hold_count ); --- a/catalogue/labeledMARCdetail.pl +++ a/catalogue/labeledMARCdetail.pl @@ -28,7 +28,6 @@ use C4::Biblio; use C4::Items; use C4::Search; # enabled_staff_search_views use C4::Serials; -use C4::Acquisition qw(GetOrdersByBiblionumber); use Koha::Biblios; use Koha::BiblioFrameworks; @@ -133,28 +132,8 @@ $template->param ( searchid => scalar $query->param('searchid'), ); -my @allorders_using_biblio = GetOrdersByBiblionumber ($biblionumber); -my @deletedorders_using_biblio; -my @orders_using_biblio; - -foreach my $myorder (@allorders_using_biblio) { - my $basket = $myorder->{'basketno'}; - if ((defined $myorder->{'datecancellationprinted'}) and ($myorder->{'datecancellationprinted'} ne '0000-00-00') ){ - push @deletedorders_using_biblio, $myorder; - } - else { - push @orders_using_biblio, $myorder; - } -} - -my $count_orders_using_biblio = scalar @orders_using_biblio ; -$template->param (countorders => $count_orders_using_biblio); - -my $count_deletedorders_using_biblio = scalar @deletedorders_using_biblio ; -$template->param (countdeletedorders => $count_deletedorders_using_biblio); - $biblio = Koha::Biblios->find( $biblionumber ); my $holds = $biblio->holds; -$template->param( holdcount => $holds->count ); +$template->param( biblio => $biblio, holdcount => $holds->count ); output_html_with_http_headers $query, $cookie, $template->output; --- a/catalogue/moredetail.pl +++ a/catalogue/moredetail.pl @@ -266,31 +266,11 @@ $template->param( biblioitemnumber => $bi, itemnumber => $itemnumber, z3950_search_params => C4::Search::z3950_search_args(GetBiblioData($biblionumber)), - biblio => $biblio->unblessed, + biblio => $biblio, ); $template->param(ONLY_ONE => 1) if ( $itemnumber && $showncount != @items ); $template->{'VARS'}->{'searchid'} = $query->param('searchid'); -my @allorders_using_biblio = GetOrdersByBiblionumber ($biblionumber); -my @deletedorders_using_biblio; -my @orders_using_biblio; - -foreach my $myorder (@allorders_using_biblio) { - my $basket = $myorder->{'basketno'}; - if ((defined $myorder->{'datecancellationprinted'}) and ($myorder->{'datecancellationprinted'} ne '0000-00-00') ){ - push @deletedorders_using_biblio, $myorder; - } - else { - push @orders_using_biblio, $myorder; - } -} - -my $count_orders_using_biblio = scalar @orders_using_biblio ; -$template->param (countorders => $count_orders_using_biblio); - -my $count_deletedorders_using_biblio = scalar @deletedorders_using_biblio ; -$template->param (countdeletedorders => $count_deletedorders_using_biblio); - my $holds = $biblio->holds; $template->param( holdcount => $holds->count ); --