Lines 1125-1132
sub ModSerialStatus {
Link Here
|
1125 |
} |
1125 |
} |
1126 |
} |
1126 |
} |
1127 |
|
1127 |
|
1128 |
# create new waited entry if needed (ie : was a "waited" and has changed) |
1128 |
# create new expected entry if needed (ie : was "expected" and has changed) |
1129 |
if ( $oldstatus == EXPECTED && $status != EXPECTED ) { |
1129 |
# BUG 12748: Check if there are no other expected issues. |
|
|
1130 |
my $otherIssueExpected = scalar findSerialByStatus(1, $subscriptionid); |
1131 |
if ( !$otherIssueExpected && $oldstatus == EXPECTED && $status != EXPECTED ) { |
1130 |
my $subscription = GetSubscription($subscriptionid); |
1132 |
my $subscription = GetSubscription($subscriptionid); |
1131 |
my $pattern = C4::Serials::Numberpattern::GetSubscriptionNumberpattern($subscription->{numberpattern}); |
1133 |
my $pattern = C4::Serials::Numberpattern::GetSubscriptionNumberpattern($subscription->{numberpattern}); |
1132 |
|
1134 |
|
Lines 2731-2736
sub _can_do_on_subscription {
Link Here
|
2731 |
return 0; |
2733 |
return 0; |
2732 |
} |
2734 |
} |
2733 |
|
2735 |
|
|
|
2736 |
=head2 findSerialByStatus |
2737 |
|
2738 |
@serials = findSerialByStatus($status, $subscriptionid); |
2739 |
|
2740 |
Returns an array of serials matching a given status and subscription id. |
2741 |
|
2742 |
=cut |
2743 |
sub findSerialByStatus{ |
2744 |
my($status, $subscriptionid) = @_; |
2745 |
my $dbh = C4::Context->dbh; |
2746 |
my $query = qq| SELECT * from serial |
2747 |
WHERE status = ? |
2748 |
AND subscriptionid = ? |
2749 |
|; |
2750 |
my $sth = $dbh->prepare($query); |
2751 |
$sth->execute($status, $subscriptionid); |
2752 |
return @{$sth->fetchall_arrayref({})}; |
2753 |
} |
2734 |
1; |
2754 |
1; |
2735 |
__END__ |
2755 |
__END__ |
2736 |
|
2756 |
|