Bug 18782: Remove unused C4::Serials::getsupplierbyserialid

TEST PLAN
----------
git grep -i getsupplierby
-- only the code removed and the test tweaked
git bz apply 18782
sudo koha-shell -c bash kohadev
prove -v t/db_dependent/Serials.t
qa -v 2 c 1
exit
-- sign off

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
(cherry picked from commit c69e02c441)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This commit is contained in:
Julian Maurice 2017-06-12 12:28:31 +02:00 committed by Fridolin Somers
parent f4b6e5963f
commit 87cf7af3cd
2 changed files with 2 additions and 31 deletions

View File

@ -78,7 +78,7 @@ BEGIN {
&PrepareSerialsData &GetNextExpected &ModNextExpected
&GetPreviousSerialid
&GetSuppliersWithLateIssues &getsupplierbyserialid
&GetSuppliersWithLateIssues
&GetDistributedTo &SetDistributedTo
&getroutinglist &delroutingmember &addroutingmember
&reorder_members
@ -1920,33 +1920,6 @@ sub updateClaim {
{}, CLAIMED, @$serialids );
}
=head2 getsupplierbyserialid
$result = getsupplierbyserialid($serialid)
this function is used to find the supplier id given a serial id
return :
hashref containing serialid, subscriptionid, and aqbooksellerid
=cut
sub getsupplierbyserialid {
my ($serialid) = @_;
my $dbh = C4::Context->dbh;
my $sth = $dbh->prepare(
"SELECT serialid, serial.subscriptionid, aqbooksellerid
FROM serial
LEFT JOIN subscription ON serial.subscriptionid = subscription.subscriptionid
WHERE serialid = ?
"
);
$sth->execute($serialid);
my $line = $sth->fetchrow_hashref;
my $result = $line->{'aqbooksellerid'};
return $result;
}
=head2 check_routing
$result = &check_routing($subscriptionid)

View File

@ -18,7 +18,7 @@ use Koha::DateUtils;
use Koha::Acquisition::Booksellers;
use t::lib::Mocks;
use t::lib::TestBuilder;
use Test::More tests => 49;
use Test::More tests => 48;
BEGIN {
use_ok('C4::Serials');
@ -265,8 +265,6 @@ subtest 'test_updateClaim' => sub {
is($late_or_missing_issues_1_2[0]->{status}, 3, 'Got the expected unchanged claim status from update 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');