From cb087cd37109194a6adae3bbe1e6989582b8f517 Mon Sep 17 00:00:00 2001 From: Julian Maurice Date: Tue, 10 Feb 2015 16:35:19 +0100 Subject: [PATCH] Bug 7957: Remove uses of check_routing which doesn't exist anymore Also remove a unit tests about C4::Serials::addroutingmember which also no longer exists --- acqui/newordersubscription.pl | 3 ++- serials/serials-collection.pl | 2 +- serials/serials-recieve.pl | 3 ++- t/db_dependent/Serials.t | 6 +----- 4 files changed, 6 insertions(+), 8 deletions(-) diff --git a/acqui/newordersubscription.pl b/acqui/newordersubscription.pl index cb04c64..a8f5393 100755 --- a/acqui/newordersubscription.pl +++ b/acqui/newordersubscription.pl @@ -25,6 +25,7 @@ use C4::Branch; use C4::Context; use C4::Output; use C4::Serials; +use C4::Serials::RoutingLists qw( GetRoutingListsCount ); use Koha::Acquisition::Bookseller; @@ -72,7 +73,7 @@ foreach my $sub (@subscriptions) { # to toggle between create or edit routing list options if ($routing) { - $sub->{routingedit} = check_routing( $sub->{subscriptionid} ); + $sub->{routingedit} = GetRoutingListsCount( $sub->{subscriptionid} ); } } diff --git a/serials/serials-collection.pl b/serials/serials-collection.pl index e3f5ab3..ce03ff4 100755 --- a/serials/serials-collection.pl +++ b/serials/serials-collection.pl @@ -129,7 +129,7 @@ if (@subscriptionid){ my $numberpattern = C4::Serials::Numberpattern::GetSubscriptionNumberpattern($subs->{numberpattern}); $subs->{frequency} = $frequency; $subs->{numberpattern} = $numberpattern; - $subs->{'hasRouting'} = check_routing($subscriptionid); + $subs->{'hasRouting'} = GetRoutingListsCount($subscriptionid); push @$subscriptiondescs,$subs; my $tmpsubscription= GetFullSubscription($subscriptionid); @subscriptioninformation=(@$tmpsubscription,@subscriptioninformation); diff --git a/serials/serials-recieve.pl b/serials/serials-recieve.pl index 9fbce35..1c8aeaf 100755 --- a/serials/serials-recieve.pl +++ b/serials/serials-recieve.pl @@ -73,6 +73,7 @@ use C4::Koha; use C4::Output; use C4::Context; use C4::Serials; +use C4::Serials::RoutingLists qw/GetRoutingListsCount/; use C4::Branch; # GetBranches my $query = new CGI; @@ -104,7 +105,7 @@ my $subscription=GetSubscription($subscriptionid); my $auser = $subscription->{'librarian'}; # bob -my $routing = check_routing($subscriptionid); # to see if routing list exists +my $routing = GetRoutingListsCount($subscriptionid); # to see if routing list exists my $manualdate =''; my $manualissue =''; my $manualstatus =0; diff --git a/t/db_dependent/Serials.t b/t/db_dependent/Serials.t index c255b9e..1e44ef8 100644 --- a/t/db_dependent/Serials.t +++ b/t/db_dependent/Serials.t @@ -15,7 +15,7 @@ use C4::Bookseller; use C4::Biblio; use C4::Budgets; use Koha::DateUtils; -use Test::More tests => 43; +use Test::More tests => 41; BEGIN { use_ok('C4::Serials'); @@ -179,10 +179,6 @@ is(C4::Serials::updateClaim(),undef, 'test updating claim'); is(C4::Serials::getsupplierbyserialid(),undef, 'test getting supplier idea'); -is(C4::Serials::check_routing(), undef, 'test checking route'); - -is(C4::Serials::addroutingmember(),undef, 'test adding route member'); - # Unit tests for statuses management (Bug 11689) $subscriptionid = NewSubscription( -- 1.9.1