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 1942-1974 sub updateClaim { Link Here
1942
        {}, CLAIMED, @$serialids );
1942
        {}, CLAIMED, @$serialids );
1943
}
1943
}
1944
1944
1945
=head2 getsupplierbyserialid
1946
1947
$result = getsupplierbyserialid($serialid)
1948
1949
this function is used to find the supplier id given a serial id
1950
1951
return :
1952
hashref containing serialid, subscriptionid, and aqbooksellerid
1953
1954
=cut
1955
1956
sub getsupplierbyserialid {
1957
    my ($serialid) = @_;
1958
    my $dbh        = C4::Context->dbh;
1959
    my $sth        = $dbh->prepare(
1960
        "SELECT serialid, serial.subscriptionid, aqbooksellerid
1961
         FROM serial 
1962
            LEFT JOIN subscription ON serial.subscriptionid = subscription.subscriptionid
1963
            WHERE serialid = ?
1964
        "
1965
    );
1966
    $sth->execute($serialid);
1967
    my $line   = $sth->fetchrow_hashref;
1968
    my $result = $line->{'aqbooksellerid'};
1969
    return $result;
1970
}
1971
1972
=head2 check_routing
1945
=head2 check_routing
1973
1946
1974
$result = &check_routing($subscriptionid)
1947
$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