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