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

(-)a/C4/Serials.pm (-28 / +1 lines)
Lines 78-84 BEGIN { Link Here
78
      &PrepareSerialsData &GetNextExpected    &ModNextExpected
78
      &PrepareSerialsData &GetNextExpected    &ModNextExpected
79
      &GetPreviousSerialid
79
      &GetPreviousSerialid
80
80
81
      &GetSuppliersWithLateIssues             &getsupplierbyserialid
81
      &GetSuppliersWithLateIssues
82
      &GetDistributedTo   &SetDistributedTo
82
      &GetDistributedTo   &SetDistributedTo
83
      &getroutinglist     &delroutingmember   &addroutingmember
83
      &getroutinglist     &delroutingmember   &addroutingmember
84
      &reorder_members
84
      &reorder_members
Lines 1920-1952 sub updateClaim { Link Here
1920
        {}, CLAIMED, @$serialids );
1920
        {}, CLAIMED, @$serialids );
1921
}
1921
}
1922
1922
1923
=head2 getsupplierbyserialid
1924
1925
$result = getsupplierbyserialid($serialid)
1926
1927
this function is used to find the supplier id given a serial id
1928
1929
return :
1930
hashref containing serialid, subscriptionid, and aqbooksellerid
1931
1932
=cut
1933
1934
sub getsupplierbyserialid {
1935
    my ($serialid) = @_;
1936
    my $dbh        = C4::Context->dbh;
1937
    my $sth        = $dbh->prepare(
1938
        "SELECT serialid, serial.subscriptionid, aqbooksellerid
1939
         FROM serial 
1940
            LEFT JOIN subscription ON serial.subscriptionid = subscription.subscriptionid
1941
            WHERE serialid = ?
1942
        "
1943
    );
1944
    $sth->execute($serialid);
1945
    my $line   = $sth->fetchrow_hashref;
1946
    my $result = $line->{'aqbooksellerid'};
1947
    return $result;
1948
}
1949
1950
=head2 check_routing
1923
=head2 check_routing
1951
1924
1952
$result = &check_routing($subscriptionid)
1925
$result = &check_routing($subscriptionid)
(-)a/t/db_dependent/Serials.t (-4 / +1 lines)
Lines 18-24 use Koha::DateUtils; Link Here
18
use Koha::Acquisition::Booksellers;
18
use Koha::Acquisition::Booksellers;
19
use t::lib::Mocks;
19
use t::lib::Mocks;
20
use t::lib::TestBuilder;
20
use t::lib::TestBuilder;
21
use Test::More tests => 49;
21
use Test::More tests => 48;
22
22
23
BEGIN {
23
BEGIN {
24
    use_ok('C4::Serials');
24
    use_ok('C4::Serials');
Lines 265-272 subtest 'test_updateClaim' => sub { Link Here
265
    is($late_or_missing_issues_1_2[0]->{status}, 3, 'Got the expected unchanged claim status from update claim');
265
    is($late_or_missing_issues_1_2[0]->{status}, 3, 'Got the expected unchanged claim status from update claim');
266
};
266
};
267
267
268
is(C4::Serials::getsupplierbyserialid(),undef, 'test getting supplier idea');
269
270
is(C4::Serials::check_routing(), undef, 'test checking route');
268
is(C4::Serials::check_routing(), undef, 'test checking route');
271
269
272
is(C4::Serials::addroutingmember(),undef, 'test adding route member');
270
is(C4::Serials::addroutingmember(),undef, 'test adding route member');
273
- 

Return to bug 18782