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

(-)a/C4/Serials.pm (-8 / +13 lines)
Lines 2717-2740 sub _can_do_on_subscription { Link Here
2717
    }
2717
    }
2718
    return 0;
2718
    return 0;
2719
}
2719
}
2720
2720
=head1 GetSerialItemsInformations
2721
=head1 GetSerialItemsInformations
2722
2723
    @serialsitemsinformations = GetSerialItemsInformations (@serialid)
2724
2725
    return an array of specifique information of serials and serialitem a given array of serialid
2726
2721
=cut
2727
=cut
2728
2722
sub GetSerialItemsInformations{
2729
sub GetSerialItemsInformations{
2723
my (@serialid)=@_;
2730
    my (@serialid)=@_;
2724
my $i=0;
2731
    my @serialitemsinformation;
2725
my @serialitemsinformation;
2732
    my $dbh = C4::Context->dbh;
2726
my $dbh = C4::Context->dbh;
2733
    foreach my $sid(@serialid){
2727
foreach my $sid(@serialid){
2728
        my $sth = $dbh->prepare("select count(i.itemnumber) as countitems,s.itemnumber as itemnumber  from items i  natural join  serialitems s where s.serialid=?");
2734
        my $sth = $dbh->prepare("select count(i.itemnumber) as countitems,s.itemnumber as itemnumber  from items i  natural join  serialitems s where s.serialid=?");
2729
        $sth->execute($sid);
2735
        $sth->execute($sid);
2730
        my $line   = $sth->fetchrow_hashref;
2736
        my $line   = $sth->fetchrow_hashref;
2731
        if($line->{'countitems'}){
2737
        if($line->{'countitems'}){
2732
            push @serialitemsinformation,$line;
2738
            push @serialitemsinformation,$line;
2733
        }
2739
        }
2734
}
2740
    }
2735
    return @serialitemsinformation;
2741
    return @serialitemsinformation;
2736
2737
}
2742
}
2743
2738
=head2 findSerialsByStatus
2744
=head2 findSerialsByStatus
2739
2745
2740
    @serials = findSerialsByStatus($status, $subscriptionid);
2746
    @serials = findSerialsByStatus($status, $subscriptionid);
2741
- 

Return to bug 17674