Lines 1318-1375
returns the number of rows affected
Link Here
|
1318 |
|
1318 |
|
1319 |
sub ModSubscription { |
1319 |
sub ModSubscription { |
1320 |
my ( |
1320 |
my ( |
1321 |
$auser, $branchcode, $aqbooksellerid, $cost, $aqbudgetid, $startdate, |
1321 |
$auser, $branchcode, $aqbooksellerid, $cost, $aqbudgetid, $startdate, |
1322 |
$periodicity, $firstacquidate, $irregularity, $numberpattern, $locale, |
1322 |
$periodicity, $firstacquidate, $irregularity, $numberpattern, $locale, |
1323 |
$numberlength, $weeklength, $monthlength, $lastvalue1, $innerloop1, |
1323 |
$numberlength, $weeklength, $monthlength, $lastvalue1, $innerloop1, |
1324 |
$lastvalue2, $innerloop2, $lastvalue3, $innerloop3, $status, |
1324 |
$lastvalue2, $innerloop2, $lastvalue3, $innerloop3, $status, |
1325 |
$biblionumber, $callnumber, $notes, $letter, $manualhistory, |
1325 |
$biblionumber, $callnumber, $notes, $letter, $manualhistory, |
1326 |
$internalnotes, $serialsadditems, $staffdisplaycount, $opacdisplaycount, |
1326 |
$internalnotes, $serialsadditems, $staffdisplaycount, $opacdisplaycount, |
1327 |
$graceperiod, $location, $enddate, $subscriptionid, $skip_serialseq, |
1327 |
$graceperiod, $location, $enddate, $subscriptionid, $skip_serialseq, |
1328 |
$itemtype, $previousitemtype, $mana_id, $ccode, $published_on_template |
1328 |
$itemtype, $previousitemtype, $mana_id, $ccode, $published_on_template, |
|
|
1329 |
$auto_claim_enabled |
1329 |
) = @_; |
1330 |
) = @_; |
1330 |
|
1331 |
|
1331 |
my $subscription = Koha::Subscriptions->find($subscriptionid); |
1332 |
my $subscription = Koha::Subscriptions->find($subscriptionid); |
1332 |
$subscription->set( |
1333 |
$subscription->set( |
1333 |
{ |
1334 |
{ |
1334 |
librarian => $auser, |
1335 |
librarian => $auser, |
1335 |
branchcode => $branchcode, |
1336 |
branchcode => $branchcode, |
1336 |
aqbooksellerid => $aqbooksellerid, |
1337 |
aqbooksellerid => $aqbooksellerid, |
1337 |
cost => $cost, |
1338 |
cost => $cost, |
1338 |
aqbudgetid => $aqbudgetid, |
1339 |
aqbudgetid => $aqbudgetid, |
1339 |
biblionumber => $biblionumber, |
1340 |
biblionumber => $biblionumber, |
1340 |
startdate => $startdate, |
1341 |
startdate => $startdate, |
1341 |
periodicity => $periodicity, |
1342 |
periodicity => $periodicity, |
1342 |
numberlength => $numberlength, |
1343 |
numberlength => $numberlength, |
1343 |
weeklength => $weeklength, |
1344 |
weeklength => $weeklength, |
1344 |
monthlength => $monthlength, |
1345 |
monthlength => $monthlength, |
1345 |
lastvalue1 => $lastvalue1, |
1346 |
lastvalue1 => $lastvalue1, |
1346 |
innerloop1 => $innerloop1, |
1347 |
innerloop1 => $innerloop1, |
1347 |
lastvalue2 => $lastvalue2, |
1348 |
lastvalue2 => $lastvalue2, |
1348 |
innerloop2 => $innerloop2, |
1349 |
innerloop2 => $innerloop2, |
1349 |
lastvalue3 => $lastvalue3, |
1350 |
lastvalue3 => $lastvalue3, |
1350 |
innerloop3 => $innerloop3, |
1351 |
innerloop3 => $innerloop3, |
1351 |
status => $status, |
1352 |
status => $status, |
1352 |
notes => $notes, |
1353 |
notes => $notes, |
1353 |
letter => $letter, |
1354 |
letter => $letter, |
1354 |
firstacquidate => $firstacquidate, |
1355 |
firstacquidate => $firstacquidate, |
1355 |
irregularity => $irregularity, |
1356 |
irregularity => $irregularity, |
1356 |
numberpattern => $numberpattern, |
1357 |
numberpattern => $numberpattern, |
1357 |
locale => $locale, |
1358 |
locale => $locale, |
1358 |
callnumber => $callnumber, |
1359 |
callnumber => $callnumber, |
1359 |
manualhistory => $manualhistory, |
1360 |
manualhistory => $manualhistory, |
1360 |
internalnotes => $internalnotes, |
1361 |
internalnotes => $internalnotes, |
1361 |
serialsadditems => $serialsadditems, |
1362 |
serialsadditems => $serialsadditems, |
1362 |
staffdisplaycount => $staffdisplaycount, |
1363 |
staffdisplaycount => $staffdisplaycount, |
1363 |
opacdisplaycount => $opacdisplaycount, |
1364 |
opacdisplaycount => $opacdisplaycount, |
1364 |
graceperiod => $graceperiod, |
1365 |
graceperiod => $graceperiod, |
1365 |
location => $location, |
1366 |
location => $location, |
1366 |
enddate => $enddate, |
1367 |
enddate => $enddate, |
1367 |
skip_serialseq => $skip_serialseq, |
1368 |
skip_serialseq => $skip_serialseq, |
1368 |
itemtype => $itemtype, |
1369 |
itemtype => $itemtype, |
1369 |
previousitemtype => $previousitemtype, |
1370 |
previousitemtype => $previousitemtype, |
1370 |
mana_id => $mana_id, |
1371 |
mana_id => $mana_id, |
1371 |
ccode => $ccode, |
1372 |
ccode => $ccode, |
1372 |
published_on_template => $published_on_template, |
1373 |
published_on_template => $published_on_template, |
|
|
1374 |
auto_claim_enabled => $auto_claim_enabled // 0, |
1373 |
} |
1375 |
} |
1374 |
)->store; |
1376 |
)->store; |
1375 |
# FIXME Must be $subscription->serials |
1377 |
# FIXME Must be $subscription->serials |
Lines 1401-1458
the id of this new subscription
Link Here
|
1401 |
|
1403 |
|
1402 |
sub NewSubscription { |
1404 |
sub NewSubscription { |
1403 |
my ( |
1405 |
my ( |
1404 |
$auser, $branchcode, $aqbooksellerid, $cost, $aqbudgetid, $biblionumber, |
1406 |
$auser, $branchcode, $aqbooksellerid, $cost, $aqbudgetid, $biblionumber, |
1405 |
$startdate, $periodicity, $numberlength, $weeklength, $monthlength, |
1407 |
$startdate, $periodicity, $numberlength, $weeklength, $monthlength, |
1406 |
$lastvalue1, $innerloop1, $lastvalue2, $innerloop2, $lastvalue3, |
1408 |
$lastvalue1, $innerloop1, $lastvalue2, $innerloop2, $lastvalue3, |
1407 |
$innerloop3, $status, $notes, $letter, $firstacquidate, $irregularity, |
1409 |
$innerloop3, $status, $notes, $letter, $firstacquidate, $irregularity, |
1408 |
$numberpattern, $locale, $callnumber, $manualhistory, $internalnotes, |
1410 |
$numberpattern, $locale, $callnumber, $manualhistory, $internalnotes, |
1409 |
$serialsadditems, $staffdisplaycount, $opacdisplaycount, $graceperiod, |
1411 |
$serialsadditems, $staffdisplaycount, $opacdisplaycount, $graceperiod, |
1410 |
$location, $enddate, $skip_serialseq, $itemtype, $previousitemtype, $mana_id, $ccode, |
1412 |
$location, $enddate, $skip_serialseq, $itemtype, $previousitemtype, $mana_id, $ccode, |
1411 |
$published_on_template, |
1413 |
$published_on_template, $auto_claim_enabled |
1412 |
) = @_; |
1414 |
) = @_; |
1413 |
my $dbh = C4::Context->dbh; |
1415 |
my $dbh = C4::Context->dbh; |
1414 |
|
1416 |
|
1415 |
my $subscription = Koha::Subscription->new( |
1417 |
my $subscription = Koha::Subscription->new( |
1416 |
{ |
1418 |
{ |
1417 |
librarian => $auser, |
1419 |
librarian => $auser, |
1418 |
branchcode => $branchcode, |
1420 |
branchcode => $branchcode, |
1419 |
aqbooksellerid => $aqbooksellerid, |
1421 |
aqbooksellerid => $aqbooksellerid, |
1420 |
cost => $cost, |
1422 |
cost => $cost, |
1421 |
aqbudgetid => $aqbudgetid, |
1423 |
aqbudgetid => $aqbudgetid, |
1422 |
biblionumber => $biblionumber, |
1424 |
biblionumber => $biblionumber, |
1423 |
startdate => $startdate, |
1425 |
startdate => $startdate, |
1424 |
periodicity => $periodicity, |
1426 |
periodicity => $periodicity, |
1425 |
numberlength => $numberlength, |
1427 |
numberlength => $numberlength, |
1426 |
weeklength => $weeklength, |
1428 |
weeklength => $weeklength, |
1427 |
monthlength => $monthlength, |
1429 |
monthlength => $monthlength, |
1428 |
lastvalue1 => $lastvalue1, |
1430 |
lastvalue1 => $lastvalue1, |
1429 |
innerloop1 => $innerloop1, |
1431 |
innerloop1 => $innerloop1, |
1430 |
lastvalue2 => $lastvalue2, |
1432 |
lastvalue2 => $lastvalue2, |
1431 |
innerloop2 => $innerloop2, |
1433 |
innerloop2 => $innerloop2, |
1432 |
lastvalue3 => $lastvalue3, |
1434 |
lastvalue3 => $lastvalue3, |
1433 |
innerloop3 => $innerloop3, |
1435 |
innerloop3 => $innerloop3, |
1434 |
status => $status, |
1436 |
status => $status, |
1435 |
notes => $notes, |
1437 |
notes => $notes, |
1436 |
letter => $letter, |
1438 |
letter => $letter, |
1437 |
firstacquidate => $firstacquidate, |
1439 |
firstacquidate => $firstacquidate, |
1438 |
irregularity => $irregularity, |
1440 |
irregularity => $irregularity, |
1439 |
numberpattern => $numberpattern, |
1441 |
numberpattern => $numberpattern, |
1440 |
locale => $locale, |
1442 |
locale => $locale, |
1441 |
callnumber => $callnumber, |
1443 |
callnumber => $callnumber, |
1442 |
manualhistory => $manualhistory, |
1444 |
manualhistory => $manualhistory, |
1443 |
internalnotes => $internalnotes, |
1445 |
internalnotes => $internalnotes, |
1444 |
serialsadditems => $serialsadditems, |
1446 |
serialsadditems => $serialsadditems, |
1445 |
staffdisplaycount => $staffdisplaycount, |
1447 |
staffdisplaycount => $staffdisplaycount, |
1446 |
opacdisplaycount => $opacdisplaycount, |
1448 |
opacdisplaycount => $opacdisplaycount, |
1447 |
graceperiod => $graceperiod, |
1449 |
graceperiod => $graceperiod, |
1448 |
location => $location, |
1450 |
location => $location, |
1449 |
enddate => $enddate, |
1451 |
enddate => $enddate, |
1450 |
skip_serialseq => $skip_serialseq, |
1452 |
skip_serialseq => $skip_serialseq, |
1451 |
itemtype => $itemtype, |
1453 |
itemtype => $itemtype, |
1452 |
previousitemtype => $previousitemtype, |
1454 |
previousitemtype => $previousitemtype, |
1453 |
mana_id => $mana_id, |
1455 |
mana_id => $mana_id, |
1454 |
ccode => $ccode, |
1456 |
ccode => $ccode, |
1455 |
published_on_template => $published_on_template, |
1457 |
published_on_template => $published_on_template, |
|
|
1458 |
auto_claim_enabled => $auto_claim_enabled // 0, |
1456 |
} |
1459 |
} |
1457 |
)->store; |
1460 |
)->store; |
1458 |
$subscription->discard_changes; |
1461 |
$subscription->discard_changes; |
Lines 1892-1898
sub GetLateOrMissingIssues {
Link Here
|
1892 |
if ($supplierid) { |
1895 |
if ($supplierid) { |
1893 |
$sth = $dbh->prepare( |
1896 |
$sth = $dbh->prepare( |
1894 |
"SELECT |
1897 |
"SELECT |
1895 |
serialid, aqbooksellerid, name, |
1898 |
serialid, serial.aqbooksellerid, name, |
1896 |
biblio.title, biblioitems.issn, planneddate, serialseq, |
1899 |
biblio.title, biblioitems.issn, planneddate, serialseq, |
1897 |
serial.status, serial.subscriptionid, claimdate, claims_count, |
1900 |
serial.status, serial.subscriptionid, claimdate, claims_count, |
1898 |
subscription.branchcode, serial.publisheddate |
1901 |
subscription.branchcode, serial.publisheddate |