Lines 343-349
sub GetFullSubscription {
Link Here
|
343 |
my $sth = $dbh->prepare($query); |
343 |
my $sth = $dbh->prepare($query); |
344 |
$sth->execute($subscriptionid); |
344 |
$sth->execute($subscriptionid); |
345 |
my $subscriptions = $sth->fetchall_arrayref( {} ); |
345 |
my $subscriptions = $sth->fetchall_arrayref( {} ); |
346 |
my $cannotedit = not can_edit_subscription( $subscriptions->[0] ) if scalar @$subscriptions; |
346 |
my $cannotedit; |
|
|
347 |
$cannotedit = not can_edit_subscription( $subscriptions->[0] ) if scalar @$subscriptions; |
347 |
for my $subscription ( @$subscriptions ) { |
348 |
for my $subscription ( @$subscriptions ) { |
348 |
$subscription->{cannotedit} = $cannotedit; |
349 |
$subscription->{cannotedit} = $cannotedit; |
349 |
} |
350 |
} |
Lines 366-374
sub PrepareSerialsData {
Link Here
|
366 |
my $year; |
367 |
my $year; |
367 |
my @res; |
368 |
my @res; |
368 |
my $startdate; |
369 |
my $startdate; |
369 |
my $aqbooksellername; |
|
|
370 |
my $bibliotitle; |
371 |
my @loopissues; |
372 |
my $first; |
370 |
my $first; |
373 |
my $previousnote = ""; |
371 |
my $previousnote = ""; |
374 |
|
372 |
|
Lines 503-509
sub GetFullSubscriptionsFromBiblionumber {
Link Here
|
503 |
my $sth = $dbh->prepare($query); |
501 |
my $sth = $dbh->prepare($query); |
504 |
$sth->execute($biblionumber); |
502 |
$sth->execute($biblionumber); |
505 |
my $subscriptions = $sth->fetchall_arrayref( {} ); |
503 |
my $subscriptions = $sth->fetchall_arrayref( {} ); |
506 |
my $cannotedit = not can_edit_subscription( $subscriptions->[0] ) if scalar @$subscriptions; |
504 |
my $cannotedit; |
|
|
505 |
$cannotedit = not can_edit_subscription( $subscriptions->[0] ) if scalar @$subscriptions; |
507 |
for my $subscription ( @$subscriptions ) { |
506 |
for my $subscription ( @$subscriptions ) { |
508 |
$subscription->{cannotedit} = $cannotedit; |
507 |
$subscription->{cannotedit} = $cannotedit; |
509 |
} |
508 |
} |
Lines 1348-1356
sub ModSubscription {
Link Here
|
1348 |
$biblionumber, $callnumber, $notes, $letter, $manualhistory, |
1347 |
$biblionumber, $callnumber, $notes, $letter, $manualhistory, |
1349 |
$internalnotes, $serialsadditems, $staffdisplaycount, $opacdisplaycount, |
1348 |
$internalnotes, $serialsadditems, $staffdisplaycount, $opacdisplaycount, |
1350 |
$graceperiod, $location, $enddate, $subscriptionid, $skip_serialseq, |
1349 |
$graceperiod, $location, $enddate, $subscriptionid, $skip_serialseq, |
1351 |
$itemtype, $previousitemtype |
1350 |
$itemtype, $previousitemtype, $auto_claim_enabled |
1352 |
) = @_; |
1351 |
) = @_; |
1353 |
|
1352 |
|
|
|
1353 |
$auto_claim_enabled //= 0; |
1354 |
|
1354 |
my $dbh = C4::Context->dbh; |
1355 |
my $dbh = C4::Context->dbh; |
1355 |
my $query = "UPDATE subscription |
1356 |
my $query = "UPDATE subscription |
1356 |
SET librarian=?, branchcode=?, aqbooksellerid=?, cost=?, aqbudgetid=?, |
1357 |
SET librarian=?, branchcode=?, aqbooksellerid=?, cost=?, aqbudgetid=?, |
Lines 1361-1367
sub ModSubscription {
Link Here
|
1361 |
callnumber=?, notes=?, letter=?, manualhistory=?, |
1362 |
callnumber=?, notes=?, letter=?, manualhistory=?, |
1362 |
internalnotes=?, serialsadditems=?, staffdisplaycount=?, |
1363 |
internalnotes=?, serialsadditems=?, staffdisplaycount=?, |
1363 |
opacdisplaycount=?, graceperiod=?, location = ?, enddate=?, |
1364 |
opacdisplaycount=?, graceperiod=?, location = ?, enddate=?, |
1364 |
skip_serialseq=?, itemtype=?, previousitemtype=? |
1365 |
skip_serialseq=?, itemtype=?, previousitemtype=?, |
|
|
1366 |
auto_claim_enabled=? |
1365 |
WHERE subscriptionid = ?"; |
1367 |
WHERE subscriptionid = ?"; |
1366 |
|
1368 |
|
1367 |
my $sth = $dbh->prepare($query); |
1369 |
my $sth = $dbh->prepare($query); |
Lines 1375-1381
sub ModSubscription {
Link Here
|
1375 |
$letter, ($manualhistory ? $manualhistory : 0), |
1377 |
$letter, ($manualhistory ? $manualhistory : 0), |
1376 |
$internalnotes, $serialsadditems, $staffdisplaycount, $opacdisplaycount, |
1378 |
$internalnotes, $serialsadditems, $staffdisplaycount, $opacdisplaycount, |
1377 |
$graceperiod, $location, $enddate, $skip_serialseq, |
1379 |
$graceperiod, $location, $enddate, $skip_serialseq, |
1378 |
$itemtype, $previousitemtype, |
1380 |
$itemtype, $previousitemtype, $auto_claim_enabled, |
1379 |
$subscriptionid |
1381 |
$subscriptionid |
1380 |
); |
1382 |
); |
1381 |
my $rows = $sth->rows; |
1383 |
my $rows = $sth->rows; |
Lines 1409-1416
sub NewSubscription {
Link Here
|
1409 |
$innerloop3, $status, $notes, $letter, $firstacquidate, $irregularity, |
1411 |
$innerloop3, $status, $notes, $letter, $firstacquidate, $irregularity, |
1410 |
$numberpattern, $locale, $callnumber, $manualhistory, $internalnotes, |
1412 |
$numberpattern, $locale, $callnumber, $manualhistory, $internalnotes, |
1411 |
$serialsadditems, $staffdisplaycount, $opacdisplaycount, $graceperiod, |
1413 |
$serialsadditems, $staffdisplaycount, $opacdisplaycount, $graceperiod, |
1412 |
$location, $enddate, $skip_serialseq, $itemtype, $previousitemtype |
1414 |
$location, $enddate, $skip_serialseq, $itemtype, $previousitemtype, |
|
|
1415 |
$auto_claim_enabled |
1413 |
) = @_; |
1416 |
) = @_; |
|
|
1417 |
|
1418 |
$auto_claim_enabled //= 0; |
1419 |
|
1414 |
my $dbh = C4::Context->dbh; |
1420 |
my $dbh = C4::Context->dbh; |
1415 |
|
1421 |
|
1416 |
#save subscription (insert into database) |
1422 |
#save subscription (insert into database) |
Lines 1423-1430
sub NewSubscription {
Link Here
|
1423 |
irregularity, numberpattern, locale, callnumber, |
1429 |
irregularity, numberpattern, locale, callnumber, |
1424 |
manualhistory, internalnotes, serialsadditems, staffdisplaycount, |
1430 |
manualhistory, internalnotes, serialsadditems, staffdisplaycount, |
1425 |
opacdisplaycount, graceperiod, location, enddate, skip_serialseq, |
1431 |
opacdisplaycount, graceperiod, location, enddate, skip_serialseq, |
1426 |
itemtype, previousitemtype) |
1432 |
itemtype, previousitemtype, auto_claim_enabled) |
1427 |
VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) |
1433 |
VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) |
1428 |
|; |
1434 |
|; |
1429 |
my $sth = $dbh->prepare($query); |
1435 |
my $sth = $dbh->prepare($query); |
1430 |
$sth->execute( |
1436 |
$sth->execute( |
Lines 1435-1441
sub NewSubscription {
Link Here
|
1435 |
$firstacquidate, $irregularity, $numberpattern, $locale, $callnumber, |
1441 |
$firstacquidate, $irregularity, $numberpattern, $locale, $callnumber, |
1436 |
$manualhistory, $internalnotes, $serialsadditems, $staffdisplaycount, |
1442 |
$manualhistory, $internalnotes, $serialsadditems, $staffdisplaycount, |
1437 |
$opacdisplaycount, $graceperiod, $location, $enddate, $skip_serialseq, |
1443 |
$opacdisplaycount, $graceperiod, $location, $enddate, $skip_serialseq, |
1438 |
$itemtype, $previousitemtype |
1444 |
$itemtype, $previousitemtype, $auto_claim_enabled |
1439 |
); |
1445 |
); |
1440 |
|
1446 |
|
1441 |
my $subscriptionid = $dbh->{'mysql_insertid'}; |
1447 |
my $subscriptionid = $dbh->{'mysql_insertid'}; |