View | Details | Raw Unified | Return to bug 23064
Collapse All | Expand All

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

Return to bug 23064