Lines 1119-1136
sub ModSerialStatus {
Link Here
|
1119 |
|
1119 |
|
1120 |
if ( $status == ARRIVED || ($oldstatus == ARRIVED && $status != ARRIVED) ) { |
1120 |
if ( $status == ARRIVED || ($oldstatus == ARRIVED && $status != ARRIVED) ) { |
1121 |
$recievedlist .= "; $serialseq" |
1121 |
$recievedlist .= "; $serialseq" |
1122 |
if ($recievedlist !~ /(^|;)\s*$serialseq(?=;|$)/); |
1122 |
if ($recievedlist !~ /(^|;)\s*\Q$serialseq\E(?=;|$)/); |
1123 |
} |
1123 |
} |
1124 |
|
1124 |
|
1125 |
# in case serial has been previously marked as missing |
1125 |
# in case serial has been previously marked as missing |
1126 |
if (grep /$status/, (EXPECTED, ARRIVED, LATE, CLAIMED)) { |
1126 |
if (grep /$status/, (EXPECTED, ARRIVED, LATE, CLAIMED)) { |
1127 |
$missinglist=~ s/(^|;)\s*$serialseq(?=;|$)//g; |
1127 |
$missinglist=~ s/(^|;)\s*\Q$serialseq\E(?=;|$)//g; |
1128 |
} |
1128 |
} |
1129 |
|
1129 |
|
1130 |
$missinglist .= "; $serialseq" |
1130 |
$missinglist .= "; $serialseq" |
1131 |
if ( ( grep { $_ == $status } ( MISSING_STATUSES ) ) && ( $missinglist !~/(^|;)\s*$serialseq(?=;|$)/ ) ); |
1131 |
if ( ( grep { $_ == $status } ( MISSING_STATUSES ) ) && ( $missinglist !~/(^|;)\s*\Q$serialseq\E(?=;|$)/ ) ); |
1132 |
$missinglist .= "; not issued $serialseq" |
1132 |
$missinglist .= "; not issued $serialseq" |
1133 |
if ( $status == NOT_ISSUED && $missinglist !~ /(^|;)\s*$serialseq(?=;|$)/ ); |
1133 |
if ( $status == NOT_ISSUED && $missinglist !~ /(^|;)\s*\Q$serialseq\E(?=;|$)/ ); |
1134 |
|
1134 |
|
1135 |
$query = "UPDATE subscriptionhistory SET recievedlist=?, missinglist=? WHERE subscriptionid=?"; |
1135 |
$query = "UPDATE subscriptionhistory SET recievedlist=?, missinglist=? WHERE subscriptionid=?"; |
1136 |
$sth = $dbh->prepare($query); |
1136 |
$sth = $dbh->prepare($query); |
Lines 1750-1757
sub DelIssue {
Link Here
|
1750 |
$sth->execute( $dataissue->{'subscriptionid'} ); |
1750 |
$sth->execute( $dataissue->{'subscriptionid'} ); |
1751 |
my $data = $sth->fetchrow_hashref; |
1751 |
my $data = $sth->fetchrow_hashref; |
1752 |
my $serialseq = $dataissue->{'serialseq'}; |
1752 |
my $serialseq = $dataissue->{'serialseq'}; |
1753 |
$data->{'missinglist'} =~ s/\b$serialseq\b//; |
1753 |
$data->{'missinglist'} =~ s/(^|;)\s*\Q$serialseq\E(?=;|$)//g; |
1754 |
$data->{'recievedlist'} =~ s/\b$serialseq\b//; |
1754 |
$data->{'recievedlist'} =~ s/(^|;)\s*\Q$serialseq\E(?=;|$)//g; |
1755 |
my $strsth = "UPDATE subscriptionhistory SET " . join( ",", map { join( "=", $_, $dbh->quote( $data->{$_} ) ) } keys %$data ) . " WHERE subscriptionid=?"; |
1755 |
my $strsth = "UPDATE subscriptionhistory SET " . join( ",", map { join( "=", $_, $dbh->quote( $data->{$_} ) ) } keys %$data ) . " WHERE subscriptionid=?"; |
1756 |
$sth = $dbh->prepare($strsth); |
1756 |
$sth = $dbh->prepare($strsth); |
1757 |
$sth->execute( $dataissue->{'subscriptionid'} ); |
1757 |
$sth->execute( $dataissue->{'subscriptionid'} ); |
1758 |
- |
|
|