Lines 1306-1342
sub ModSubscription {
Link Here
|
1306 |
$itemtype, $previousitemtype, $mana_id |
1306 |
$itemtype, $previousitemtype, $mana_id |
1307 |
) = @_; |
1307 |
) = @_; |
1308 |
|
1308 |
|
1309 |
my $dbh = C4::Context->dbh; |
1309 |
my $subscription = Koha::Subscriptions->find( $subscriptionid ); |
1310 |
my $query = "UPDATE subscription |
1310 |
return unless $subscription; |
1311 |
SET librarian=?, branchcode=?, aqbooksellerid=?, cost=?, aqbudgetid=?, |
|
|
1312 |
startdate=?, periodicity=?, firstacquidate=?, irregularity=?, |
1313 |
numberpattern=?, locale=?, numberlength=?, weeklength=?, monthlength=?, |
1314 |
lastvalue1=?, innerloop1=?, lastvalue2=?, innerloop2=?, |
1315 |
lastvalue3=?, innerloop3=?, status=?, biblionumber=?, |
1316 |
callnumber=?, notes=?, letter=?, manualhistory=?, |
1317 |
internalnotes=?, serialsadditems=?, staffdisplaycount=?, |
1318 |
opacdisplaycount=?, graceperiod=?, location = ?, enddate=?, |
1319 |
skip_serialseq=?, itemtype=?, previousitemtype=?, mana_id=? |
1320 |
WHERE subscriptionid = ?"; |
1321 |
|
1311 |
|
1322 |
my $sth = $dbh->prepare($query); |
1312 |
$subscription->librarian($auser); |
1323 |
$sth->execute( |
1313 |
$subscription->branchcode($branchcode); |
1324 |
$auser, $branchcode, $aqbooksellerid, $cost, |
1314 |
$subscription->aqbooksellerid($aqbooksellerid); |
1325 |
$aqbudgetid, $startdate, $periodicity, $firstacquidate, |
1315 |
$subscription->cost($cost); |
1326 |
$irregularity, $numberpattern, $locale, $numberlength, |
1316 |
$subscription->aqbudgetid($aqbudgetid); |
1327 |
$weeklength, $monthlength, $lastvalue1, $innerloop1, |
1317 |
$subscription->biblionumber($biblionumber); |
1328 |
$lastvalue2, $innerloop2, $lastvalue3, $innerloop3, |
1318 |
$subscription->startdate($startdate); |
1329 |
$status, $biblionumber, $callnumber, $notes, |
1319 |
$subscription->periodicity($periodicity); |
1330 |
$letter, ($manualhistory ? $manualhistory : 0), |
1320 |
$subscription->numberlength($numberlength); |
1331 |
$internalnotes, $serialsadditems, $staffdisplaycount, $opacdisplaycount, |
1321 |
$subscription->weeklength($weeklength); |
1332 |
$graceperiod, $location, $enddate, $skip_serialseq, |
1322 |
$subscription->monthlength($monthlength); |
1333 |
$itemtype, $previousitemtype, $mana_id, |
1323 |
$subscription->lastvalue1($lastvalue1); |
1334 |
$subscriptionid |
1324 |
$subscription->innerloop1($innerloop1); |
1335 |
); |
1325 |
$subscription->lastvalue2($lastvalue2); |
1336 |
my $rows = $sth->rows; |
1326 |
$subscription->lastvalue3($lastvalue3); |
|
|
1327 |
$subscription->innerloop3($innerloop3); |
1328 |
$subscription->status($status); |
1329 |
$subscription->notes($notes); |
1330 |
$subscription->letter($letter); |
1331 |
$subscription->firstacquidate($firstacquidate); |
1332 |
$subscription->irregularity($irregularity); |
1333 |
$subscription->numberpattern($numberpattern); |
1334 |
$subscription->locale($locale); |
1335 |
$subscription->callnumber($callnumber); |
1336 |
$subscription->manualhistory($manualhistory || 0); |
1337 |
$subscription->internalnotes($internalnotes); |
1338 |
$subscription->serialsadditems($serialsadditems); |
1339 |
$subscription->staffdisplaycount($staffdisplaycount); |
1340 |
$subscription->opacdisplaycount($opacdisplaycount); |
1341 |
$subscription->graceperiod($graceperiod); |
1342 |
$subscription->location($location); |
1343 |
$subscription->enddate($enddate); |
1344 |
$subscription->skip_serialseq($skip_serialseq); |
1345 |
$subscription->itemtype($itemtype); |
1346 |
$subscription->previousitemtype($previousitemtype); |
1347 |
$subscription->mana_id($mana_id); |
1348 |
my $modified = $subscription->store; |
1337 |
|
1349 |
|
1338 |
logaction( "SERIAL", "MODIFY", $subscriptionid, "" ) if C4::Context->preference("SubscriptionLog"); |
1350 |
logaction( "SERIAL", "MODIFY", $subscriptionid, "" ) if C4::Context->preference("SubscriptionLog"); |
1339 |
return $rows; |
1351 |
return $modified; |
1340 |
} |
1352 |
} |
1341 |
|
1353 |
|
1342 |
=head2 NewSubscription |
1354 |
=head2 NewSubscription |