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

(-)a/C4/Serials.pm (-9 / +8 lines)
Lines 772-778 sub GetSerials { Link Here
772
    my @serials;
772
    my @serials;
773
    my $query = "SELECT serialid,serialseq, status, publisheddate, planneddate,notes, routingnotes
773
    my $query = "SELECT serialid,serialseq, status, publisheddate, planneddate,notes, routingnotes
774
                        FROM   serial
774
                        FROM   serial
775
                        WHERE  subscriptionid = ? AND status NOT IN (2,4,5) 
775
                        WHERE  subscriptionid = ? AND status NOT IN (2, 4, 41, 42, 43, 44, 5)
776
                        ORDER BY IF(publisheddate<>'0000-00-00',publisheddate,planneddate) DESC";
776
                        ORDER BY IF(publisheddate<>'0000-00-00',publisheddate,planneddate) DESC";
777
    my $sth = $dbh->prepare($query);
777
    my $sth = $dbh->prepare($query);
778
    $sth->execute($subscriptionid);
778
    $sth->execute($subscriptionid);
Lines 793-799 sub GetSerials { Link Here
793
    $query = "SELECT   serialid,serialseq, status, planneddate, publisheddate,notes, routingnotes
793
    $query = "SELECT   serialid,serialseq, status, planneddate, publisheddate,notes, routingnotes
794
       FROM     serial
794
       FROM     serial
795
       WHERE    subscriptionid = ?
795
       WHERE    subscriptionid = ?
796
       AND      (status in (2,4,5))
796
       AND      (status in (2, 4, 41, 42, 43, 44, 5))
797
       ORDER BY IF(publisheddate<>'0000-00-00',publisheddate,planneddate) DESC
797
       ORDER BY IF(publisheddate<>'0000-00-00',publisheddate,planneddate) DESC
798
      ";
798
      ";
799
    $sth = $dbh->prepare($query);
799
    $sth = $dbh->prepare($query);
Lines 1164-1176 sub _update_missinglist { Link Here
1164
    my $subscriptionid = shift;
1164
    my $subscriptionid = shift;
1165
1165
1166
    my $dbh = C4::Context->dbh;
1166
    my $dbh = C4::Context->dbh;
1167
    my @missingserials = GetSerials2($subscriptionid, "4,5");
1167
    my @missingserials = GetSerials2($subscriptionid, "4,41,42,43,44,5");
1168
    my $missinglist;
1168
    my $missinglist;
1169
    foreach (@missingserials) {
1169
    foreach my $missingserial (@missingserials) {
1170
        if($_->{'status'} == 4) {
1170
        if ( grep { $_ == $missingserial->{status} } qw( 4 41 42 43 44 ) ) {
1171
            $missinglist .= $_->{'serialseq'} . "; ";
1171
            $missinglist .= $missingserial->{'serialseq'} . "; ";
1172
        } elsif($_->{'status'} == 5) {
1172
        } elsif($missingserial->{'status'} == 5) {
1173
            $missinglist .= "not issued " . $_->{'serialseq'} . "; ";
1173
            $missinglist .= "not issued " . $missingserial->{'serialseq'} . "; ";
1174
        }
1174
        }
1175
    }
1175
    }
1176
    $missinglist =~ s/; $//;
1176
    $missinglist =~ s/; $//;
1177
- 

Return to bug 11689