Lines 1285-1342
returns the number of rows affected
Link Here
|
1285 |
|
1285 |
|
1286 |
sub ModSubscription { |
1286 |
sub ModSubscription { |
1287 |
my ( |
1287 |
my ( |
1288 |
$auser, $branchcode, $aqbooksellerid, $cost, $aqbudgetid, $startdate, |
1288 |
$auser, $branchcode, $aqbooksellerid, $cost, $aqbudgetid, $startdate, |
1289 |
$periodicity, $firstacquidate, $irregularity, $numberpattern, $locale, |
1289 |
$periodicity, $firstacquidate, $irregularity, $numberpattern, $locale, |
1290 |
$numberlength, $weeklength, $monthlength, $lastvalue1, $innerloop1, |
1290 |
$numberlength, $weeklength, $monthlength, $lastvalue1, $innerloop1, |
1291 |
$lastvalue2, $innerloop2, $lastvalue3, $innerloop3, $status, |
1291 |
$lastvalue2, $innerloop2, $lastvalue3, $innerloop3, $status, |
1292 |
$biblionumber, $callnumber, $notes, $letter, $manualhistory, |
1292 |
$biblionumber, $callnumber, $notes, $letter, $manualhistory, |
1293 |
$internalnotes, $serialsadditems, $staffdisplaycount, $opacdisplaycount, |
1293 |
$internalnotes, $serialsadditems, $staffdisplaycount, $opacdisplaycount, |
1294 |
$graceperiod, $location, $enddate, $subscriptionid, $skip_serialseq, |
1294 |
$graceperiod, $location, $enddate, $subscriptionid, $skip_serialseq, |
1295 |
$itemtype, $previousitemtype, $mana_id, $ccode, $published_on_template |
1295 |
$itemtype, $previousitemtype, $mana_id, $ccode, $published_on_template, |
|
|
1296 |
$auto_claim_enabled |
1296 |
) = @_; |
1297 |
) = @_; |
1297 |
|
1298 |
|
1298 |
my $subscription = Koha::Subscriptions->find($subscriptionid); |
1299 |
my $subscription = Koha::Subscriptions->find($subscriptionid); |
1299 |
$subscription->set( |
1300 |
$subscription->set( |
1300 |
{ |
1301 |
{ |
1301 |
librarian => $auser, |
1302 |
librarian => $auser, |
1302 |
branchcode => $branchcode, |
1303 |
branchcode => $branchcode, |
1303 |
aqbooksellerid => $aqbooksellerid, |
1304 |
aqbooksellerid => $aqbooksellerid, |
1304 |
cost => $cost, |
1305 |
cost => $cost, |
1305 |
aqbudgetid => $aqbudgetid, |
1306 |
aqbudgetid => $aqbudgetid, |
1306 |
biblionumber => $biblionumber, |
1307 |
biblionumber => $biblionumber, |
1307 |
startdate => $startdate, |
1308 |
startdate => $startdate, |
1308 |
periodicity => $periodicity, |
1309 |
periodicity => $periodicity, |
1309 |
numberlength => $numberlength, |
1310 |
numberlength => $numberlength, |
1310 |
weeklength => $weeklength, |
1311 |
weeklength => $weeklength, |
1311 |
monthlength => $monthlength, |
1312 |
monthlength => $monthlength, |
1312 |
lastvalue1 => $lastvalue1, |
1313 |
lastvalue1 => $lastvalue1, |
1313 |
innerloop1 => $innerloop1, |
1314 |
innerloop1 => $innerloop1, |
1314 |
lastvalue2 => $lastvalue2, |
1315 |
lastvalue2 => $lastvalue2, |
1315 |
innerloop2 => $innerloop2, |
1316 |
innerloop2 => $innerloop2, |
1316 |
lastvalue3 => $lastvalue3, |
1317 |
lastvalue3 => $lastvalue3, |
1317 |
innerloop3 => $innerloop3, |
1318 |
innerloop3 => $innerloop3, |
1318 |
status => $status, |
1319 |
status => $status, |
1319 |
notes => $notes, |
1320 |
notes => $notes, |
1320 |
letter => $letter, |
1321 |
letter => $letter, |
1321 |
firstacquidate => $firstacquidate, |
1322 |
firstacquidate => $firstacquidate, |
1322 |
irregularity => $irregularity, |
1323 |
irregularity => $irregularity, |
1323 |
numberpattern => $numberpattern, |
1324 |
numberpattern => $numberpattern, |
1324 |
locale => $locale, |
1325 |
locale => $locale, |
1325 |
callnumber => $callnumber, |
1326 |
callnumber => $callnumber, |
1326 |
manualhistory => $manualhistory, |
1327 |
manualhistory => $manualhistory, |
1327 |
internalnotes => $internalnotes, |
1328 |
internalnotes => $internalnotes, |
1328 |
serialsadditems => $serialsadditems, |
1329 |
serialsadditems => $serialsadditems, |
1329 |
staffdisplaycount => $staffdisplaycount, |
1330 |
staffdisplaycount => $staffdisplaycount, |
1330 |
opacdisplaycount => $opacdisplaycount, |
1331 |
opacdisplaycount => $opacdisplaycount, |
1331 |
graceperiod => $graceperiod, |
1332 |
graceperiod => $graceperiod, |
1332 |
location => $location, |
1333 |
location => $location, |
1333 |
enddate => $enddate, |
1334 |
enddate => $enddate, |
1334 |
skip_serialseq => $skip_serialseq, |
1335 |
skip_serialseq => $skip_serialseq, |
1335 |
itemtype => $itemtype, |
1336 |
itemtype => $itemtype, |
1336 |
previousitemtype => $previousitemtype, |
1337 |
previousitemtype => $previousitemtype, |
1337 |
mana_id => $mana_id, |
1338 |
mana_id => $mana_id, |
1338 |
ccode => $ccode, |
1339 |
ccode => $ccode, |
1339 |
published_on_template => $published_on_template, |
1340 |
published_on_template => $published_on_template, |
|
|
1341 |
auto_claim_enabled => $auto_claim_enabled // 0, |
1340 |
} |
1342 |
} |
1341 |
)->store; |
1343 |
)->store; |
1342 |
# FIXME Must be $subscription->serials |
1344 |
# FIXME Must be $subscription->serials |
Lines 1368-1425
the id of this new subscription
Link Here
|
1368 |
|
1370 |
|
1369 |
sub NewSubscription { |
1371 |
sub NewSubscription { |
1370 |
my ( |
1372 |
my ( |
1371 |
$auser, $branchcode, $aqbooksellerid, $cost, $aqbudgetid, $biblionumber, |
1373 |
$auser, $branchcode, $aqbooksellerid, $cost, $aqbudgetid, $biblionumber, |
1372 |
$startdate, $periodicity, $numberlength, $weeklength, $monthlength, |
1374 |
$startdate, $periodicity, $numberlength, $weeklength, $monthlength, |
1373 |
$lastvalue1, $innerloop1, $lastvalue2, $innerloop2, $lastvalue3, |
1375 |
$lastvalue1, $innerloop1, $lastvalue2, $innerloop2, $lastvalue3, |
1374 |
$innerloop3, $status, $notes, $letter, $firstacquidate, $irregularity, |
1376 |
$innerloop3, $status, $notes, $letter, $firstacquidate, $irregularity, |
1375 |
$numberpattern, $locale, $callnumber, $manualhistory, $internalnotes, |
1377 |
$numberpattern, $locale, $callnumber, $manualhistory, $internalnotes, |
1376 |
$serialsadditems, $staffdisplaycount, $opacdisplaycount, $graceperiod, |
1378 |
$serialsadditems, $staffdisplaycount, $opacdisplaycount, $graceperiod, |
1377 |
$location, $enddate, $skip_serialseq, $itemtype, $previousitemtype, $mana_id, $ccode, |
1379 |
$location, $enddate, $skip_serialseq, $itemtype, $previousitemtype, $mana_id, $ccode, |
1378 |
$published_on_template, |
1380 |
$published_on_template, $auto_claim_enabled |
1379 |
) = @_; |
1381 |
) = @_; |
1380 |
my $dbh = C4::Context->dbh; |
1382 |
my $dbh = C4::Context->dbh; |
1381 |
|
1383 |
|
1382 |
my $subscription = Koha::Subscription->new( |
1384 |
my $subscription = Koha::Subscription->new( |
1383 |
{ |
1385 |
{ |
1384 |
librarian => $auser, |
1386 |
librarian => $auser, |
1385 |
branchcode => $branchcode, |
1387 |
branchcode => $branchcode, |
1386 |
aqbooksellerid => $aqbooksellerid, |
1388 |
aqbooksellerid => $aqbooksellerid, |
1387 |
cost => $cost, |
1389 |
cost => $cost, |
1388 |
aqbudgetid => $aqbudgetid, |
1390 |
aqbudgetid => $aqbudgetid, |
1389 |
biblionumber => $biblionumber, |
1391 |
biblionumber => $biblionumber, |
1390 |
startdate => $startdate, |
1392 |
startdate => $startdate, |
1391 |
periodicity => $periodicity, |
1393 |
periodicity => $periodicity, |
1392 |
numberlength => $numberlength, |
1394 |
numberlength => $numberlength, |
1393 |
weeklength => $weeklength, |
1395 |
weeklength => $weeklength, |
1394 |
monthlength => $monthlength, |
1396 |
monthlength => $monthlength, |
1395 |
lastvalue1 => $lastvalue1, |
1397 |
lastvalue1 => $lastvalue1, |
1396 |
innerloop1 => $innerloop1, |
1398 |
innerloop1 => $innerloop1, |
1397 |
lastvalue2 => $lastvalue2, |
1399 |
lastvalue2 => $lastvalue2, |
1398 |
innerloop2 => $innerloop2, |
1400 |
innerloop2 => $innerloop2, |
1399 |
lastvalue3 => $lastvalue3, |
1401 |
lastvalue3 => $lastvalue3, |
1400 |
innerloop3 => $innerloop3, |
1402 |
innerloop3 => $innerloop3, |
1401 |
status => $status, |
1403 |
status => $status, |
1402 |
notes => $notes, |
1404 |
notes => $notes, |
1403 |
letter => $letter, |
1405 |
letter => $letter, |
1404 |
firstacquidate => $firstacquidate, |
1406 |
firstacquidate => $firstacquidate, |
1405 |
irregularity => $irregularity, |
1407 |
irregularity => $irregularity, |
1406 |
numberpattern => $numberpattern, |
1408 |
numberpattern => $numberpattern, |
1407 |
locale => $locale, |
1409 |
locale => $locale, |
1408 |
callnumber => $callnumber, |
1410 |
callnumber => $callnumber, |
1409 |
manualhistory => $manualhistory, |
1411 |
manualhistory => $manualhistory, |
1410 |
internalnotes => $internalnotes, |
1412 |
internalnotes => $internalnotes, |
1411 |
serialsadditems => $serialsadditems, |
1413 |
serialsadditems => $serialsadditems, |
1412 |
staffdisplaycount => $staffdisplaycount, |
1414 |
staffdisplaycount => $staffdisplaycount, |
1413 |
opacdisplaycount => $opacdisplaycount, |
1415 |
opacdisplaycount => $opacdisplaycount, |
1414 |
graceperiod => $graceperiod, |
1416 |
graceperiod => $graceperiod, |
1415 |
location => $location, |
1417 |
location => $location, |
1416 |
enddate => $enddate, |
1418 |
enddate => $enddate, |
1417 |
skip_serialseq => $skip_serialseq, |
1419 |
skip_serialseq => $skip_serialseq, |
1418 |
itemtype => $itemtype, |
1420 |
itemtype => $itemtype, |
1419 |
previousitemtype => $previousitemtype, |
1421 |
previousitemtype => $previousitemtype, |
1420 |
mana_id => $mana_id, |
1422 |
mana_id => $mana_id, |
1421 |
ccode => $ccode, |
1423 |
ccode => $ccode, |
1422 |
published_on_template => $published_on_template, |
1424 |
published_on_template => $published_on_template, |
|
|
1425 |
auto_claim_enabled => $auto_claim_enabled // 0, |
1423 |
} |
1426 |
} |
1424 |
)->store; |
1427 |
)->store; |
1425 |
$subscription->discard_changes; |
1428 |
$subscription->discard_changes; |
Lines 1859-1865
sub GetLateOrMissingIssues {
Link Here
|
1859 |
if ($supplierid) { |
1862 |
if ($supplierid) { |
1860 |
$sth = $dbh->prepare( |
1863 |
$sth = $dbh->prepare( |
1861 |
"SELECT |
1864 |
"SELECT |
1862 |
serialid, aqbooksellerid, name, |
1865 |
serialid, serial.aqbooksellerid, name, |
1863 |
biblio.title, biblioitems.issn, planneddate, serialseq, |
1866 |
biblio.title, biblioitems.issn, planneddate, serialseq, |
1864 |
serial.status, serial.subscriptionid, claimdate, claims_count, |
1867 |
serial.status, serial.subscriptionid, claimdate, claims_count, |
1865 |
subscription.branchcode, serial.publisheddate |
1868 |
subscription.branchcode, serial.publisheddate |