|
Lines 244-261
is( C4::Serials::can_show_subscription($subscription_from_another_branch), 1,
Link Here
|
| 244 |
"Without IndependentBranches, renew_subscription cannot show a subscription from another branch" |
244 |
"Without IndependentBranches, renew_subscription cannot show a subscription from another branch" |
| 245 |
); |
245 |
); |
| 246 |
|
246 |
|
| 247 |
$schema->storage->txn_rollback; |
|
|
| 248 |
|
| 249 |
# GetPreviousSerialid |
247 |
# GetPreviousSerialid |
| 250 |
my $serialid1 = NewIssue( 1, $subscriptionid_from_my_branch, $biblionumber, 2 ); |
248 |
my $serialid1 = NewIssue( 1, $subscriptionid_from_my_branch, $biblionumber, 2 ); |
| 251 |
my $serialid2 = NewIssue( 2, $subscriptionid_from_my_branch, $biblionumber, 2 ); |
249 |
my $serialid2 = NewIssue( 2, $subscriptionid_from_my_branch, $biblionumber, 2 ); |
| 252 |
my $serialid3 = NewIssue( 3, $subscriptionid_from_my_branch, $biblionumber, 2 ); |
250 |
my $serialid3 = NewIssue( 3, $subscriptionid_from_my_branch, $biblionumber, 2 ); |
| 253 |
|
|
|
| 254 |
is( GetPreviousSerialid( $subscriptionid_from_my_branch ), $serialid2, "get previous serialid without parameter"); |
251 |
is( GetPreviousSerialid( $subscriptionid_from_my_branch ), $serialid2, "get previous serialid without parameter"); |
| 255 |
is( GetPreviousSerialid( $subscriptionid_from_my_branch, 1 ), $serialid2, "get previous serialid with 1" ); |
252 |
is( GetPreviousSerialid( $subscriptionid_from_my_branch, 1 ), $serialid2, "get previous serialid with 1" ); |
| 256 |
is( GetPreviousSerialid( $subscriptionid_from_my_branch, 2 ), $serialid1, "get previous serialid with 2" ); |
253 |
is( GetPreviousSerialid( $subscriptionid_from_my_branch, 2 ), $serialid1, "get previous serialid with 2" ); |
| 257 |
is( GetPreviousSerialid( $subscriptionid_from_my_branch, 3 ), undef, "get previous serialid with 3, does not exist" ); |
254 |
is( GetPreviousSerialid( $subscriptionid_from_my_branch, 3 ), undef, "get previous serialid with 3, does not exist" ); |
| 258 |
|
255 |
|
|
|
256 |
$schema->storage->txn_rollback; |
| 259 |
$dbh->rollback; |
257 |
$dbh->rollback; |
| 260 |
|
258 |
|
| 261 |
# C4::Context->userenv |
259 |
# C4::Context->userenv |
| 262 |
- |
|
|