Lines 1134-1154
sub ModSerialStatus {
Link Here
|
1134 |
$sth->execute($subscriptionid); |
1134 |
$sth->execute($subscriptionid); |
1135 |
my ( $missinglist, $recievedlist ) = $sth->fetchrow; |
1135 |
my ( $missinglist, $recievedlist ) = $sth->fetchrow; |
1136 |
if ( $status == 2 ) { |
1136 |
if ( $status == 2 ) { |
1137 |
|
|
|
1138 |
$recievedlist .= "; $serialseq" |
1137 |
$recievedlist .= "; $serialseq" |
1139 |
unless ( index( "$recievedlist", "$serialseq" ) >= 0 ); |
1138 |
if $recievedlist!~/(^|;)\s*$serialseq(?=;|$)/; |
1140 |
} |
1139 |
} |
1141 |
# in case serial has been previously marked as missing |
1140 |
# in case serial has been previously marked as missing |
1142 |
if (grep /$status/, (1,2,3,7)) { |
1141 |
if (grep /$status/, (1,2,3,7)) { |
1143 |
$missinglist =~ s/[,;]?\s?$serialseq//g; |
1142 |
$missinglist=~ s/(^|;)\s*$serialseq(?=;|$)//g; |
1144 |
} |
1143 |
} |
1145 |
# warn "missinglist : $missinglist serialseq :$serialseq, ".index("$missinglist","$serialseq"); |
|
|
1146 |
$missinglist .= "; $serialseq" |
1144 |
$missinglist .= "; $serialseq" |
1147 |
if ( $status == 4 |
1145 |
if $status==4 && $missinglist!~/(^|;)\s*$serialseq(?=;|$)/; |
1148 |
and not index( "$missinglist", "$serialseq" ) >= 0 ); |
|
|
1149 |
$missinglist .= "; not issued $serialseq" |
1146 |
$missinglist .= "; not issued $serialseq" |
1150 |
if ( $status == 5 |
1147 |
if $status==5 && $missinglist!~/(^|;)\s*$serialseq(?=;|$)/; |
1151 |
and index( "$missinglist", "$serialseq" ) >= 0 ); |
1148 |
|
1152 |
$query = "UPDATE subscriptionhistory SET recievedlist=?, missinglist=? WHERE subscriptionid=?"; |
1149 |
$query = "UPDATE subscriptionhistory SET recievedlist=?, missinglist=? WHERE subscriptionid=?"; |
1153 |
$sth = $dbh->prepare($query); |
1150 |
$sth = $dbh->prepare($query); |
1154 |
$recievedlist =~ s/^; //; |
1151 |
$recievedlist =~ s/^; //; |
1155 |
- |
|
|