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

(-)a/C4/Serials.pm (-9 / +20 lines)
Lines 961-966 sub GetNextSeq { Link Here
961
    $newlastvalue3 = $val->{setto3} if ( $newlastvalue3 > $val->{whenmorethan3} );    # reset counter if needed.
961
    $newlastvalue3 = $val->{setto3} if ( $newlastvalue3 > $val->{whenmorethan3} );    # reset counter if needed.
962
    $calculated =~ s/\{Z\}/$newlastvalue3/g;
962
    $calculated =~ s/\{Z\}/$newlastvalue3/g;
963
963
964
    my $x_label = $val->{'serialseq_x_label'};
965
    my $y_label = $val->{'serialseq_y_label'};
966
    my $z_label = $val->{'serialseq_z_label'};
967
    $calculated =~ s/\{XL\}/$x_label/g;
968
    $calculated =~ s/\{YL\}/$y_label/g;
969
    $calculated =~ s/\{ZL\}/$z_label/g;
970
964
    return ( $calculated, $newlastvalue1, $newlastvalue2, $newlastvalue3, $newinnerloop1, $newinnerloop2, $newinnerloop3 );
971
    return ( $calculated, $newlastvalue1, $newlastvalue2, $newlastvalue3, $newinnerloop1, $newinnerloop2, $newinnerloop3 );
965
}
972
}
966
973
Lines 1264-1270 sub ModSubscription { Link Here
1264
        $whenmorethan1,   $setto1,          $lastvalue1,        $innerloop1,       $add2,          $every2,      $whenmorethan2, $setto2,
1271
        $whenmorethan1,   $setto1,          $lastvalue1,        $innerloop1,       $add2,          $every2,      $whenmorethan2, $setto2,
1265
        $lastvalue2,      $innerloop2,      $add3,              $every3,           $whenmorethan3, $setto3,      $lastvalue3,    $innerloop3,
1272
        $lastvalue2,      $innerloop2,      $add3,              $every3,           $whenmorethan3, $setto3,      $lastvalue3,    $innerloop3,
1266
        $numberingmethod, $status,          $biblionumber,      $callnumber,       $notes,         $letter,      $hemisphere,    $manualhistory,
1273
        $numberingmethod, $status,          $biblionumber,      $callnumber,       $notes,         $letter,      $hemisphere,    $manualhistory,
1267
        $internalnotes,   $serialsadditems, $staffdisplaycount, $opacdisplaycount, $graceperiod,   $location,    $enddate,       $subscriptionid
1274
        $internalnotes,   $serialsadditems, $staffdisplaycount, $opacdisplaycount, $graceperiod,   $location,    $enddate,       $subscriptionid,
1275
        $x_label,         $y_label,         $z_label
1268
    ) = @_;
1276
    ) = @_;
1269
1277
1270
    #     warn $irregularity;
1278
    #     warn $irregularity;
Lines 1276-1284 sub ModSubscription { Link Here
1276
                        add2=?,every2=?,whenmorethan2=?,setto2=?,lastvalue2=?,innerloop2=?,
1284
                        add2=?,every2=?,whenmorethan2=?,setto2=?,lastvalue2=?,innerloop2=?,
1277
                        add3=?,every3=?,whenmorethan3=?,setto3=?,lastvalue3=?,innerloop3=?,
1285
                        add3=?,every3=?,whenmorethan3=?,setto3=?,lastvalue3=?,innerloop3=?,
1278
                        numberingmethod=?, status=?, biblionumber=?, callnumber=?, notes=?, 
1286
                        numberingmethod=?, status=?, biblionumber=?, callnumber=?, notes=?, 
1279
						letter=?, hemisphere=?,manualhistory=?,internalnotes=?,serialsadditems=?,
1287
                        letter=?, hemisphere=?,manualhistory=?,internalnotes=?,serialsadditems=?,
1280
						staffdisplaycount = ?,opacdisplaycount = ?, graceperiod = ?, location = ?
1288
                        staffdisplaycount = ?,opacdisplaycount = ?, graceperiod = ?, location = ?,
1281
						,enddate=?
1289
                        enddate=?, serialseq_x_label=?, serialseq_y_label=?, serialseq_z_label=?
1282
                    WHERE subscriptionid = ?";
1290
                    WHERE subscriptionid = ?";
1283
1291
1284
    #warn "query :".$query;
1292
    #warn "query :".$query;
Lines 1295-1301 sub ModSubscription { Link Here
1295
        $numberingmethod, $status,         $biblionumber,   $callnumber,
1303
        $numberingmethod, $status,         $biblionumber,   $callnumber,
1296
        $notes, $letter, $hemisphere, ( $manualhistory ? $manualhistory : 0 ),
1304
        $notes, $letter, $hemisphere, ( $manualhistory ? $manualhistory : 0 ),
1297
        $internalnotes, $serialsadditems, $staffdisplaycount, $opacdisplaycount,
1305
        $internalnotes, $serialsadditems, $staffdisplaycount, $opacdisplaycount,
1298
        $graceperiod,   $location,        $enddate,           $subscriptionid
1306
        $graceperiod,   $location,        $enddate,           $subscriptionid,
1307
        $x_label,       $y_label,         $z_label
1299
    );
1308
    );
1300
    my $rows = $sth->rows;
1309
    my $rows = $sth->rows;
1301
1310
Lines 1326-1332 sub NewSubscription { Link Here
1326
        $lastvalue1,    $innerloop1,      $add2,              $every2,           $whenmorethan2, $setto2,       $lastvalue2,      $innerloop2,
1335
        $lastvalue1,    $innerloop1,      $add2,              $every2,           $whenmorethan2, $setto2,       $lastvalue2,      $innerloop2,
1327
        $add3,          $every3,          $whenmorethan3,     $setto3,           $lastvalue3,    $innerloop3,   $numberingmethod, $status,
1336
        $add3,          $every3,          $whenmorethan3,     $setto3,           $lastvalue3,    $innerloop3,   $numberingmethod, $status,
1328
        $notes,         $letter,          $firstacquidate,    $irregularity,     $numberpattern, $callnumber,   $hemisphere,      $manualhistory,
1337
        $notes,         $letter,          $firstacquidate,    $irregularity,     $numberpattern, $callnumber,   $hemisphere,      $manualhistory,
1329
        $internalnotes, $serialsadditems, $staffdisplaycount, $opacdisplaycount, $graceperiod,   $location,     $enddate
1338
        $internalnotes, $serialsadditems, $staffdisplaycount, $opacdisplaycount, $graceperiod,   $location,     $enddate,         $x_label,
1339
        $y_label,       $z_label
1330
    ) = @_;
1340
    ) = @_;
1331
    my $dbh = C4::Context->dbh;
1341
    my $dbh = C4::Context->dbh;
1332
1342
Lines 1340-1347 sub NewSubscription { Link Here
1340
            add3,every3,whenmorethan3,setto3,lastvalue3,innerloop3,
1350
            add3,every3,whenmorethan3,setto3,lastvalue3,innerloop3,
1341
            numberingmethod, status, notes, letter,firstacquidate,irregularity,
1351
            numberingmethod, status, notes, letter,firstacquidate,irregularity,
1342
            numberpattern, callnumber, hemisphere,manualhistory,internalnotes,serialsadditems,
1352
            numberpattern, callnumber, hemisphere,manualhistory,internalnotes,serialsadditems,
1343
            staffdisplaycount,opacdisplaycount,graceperiod,location,enddate)
1353
            staffdisplaycount,opacdisplaycount,graceperiod,location,enddate,serialseq_x_label,serialseq_y_label,serialseq_z_label)
1344
        VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)
1354
        VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)
1345
        |;
1355
        |;
1346
    my $sth = $dbh->prepare($query);
1356
    my $sth = $dbh->prepare($query);
1347
    $sth->execute(
1357
    $sth->execute(
Lines 1350-1356 sub NewSubscription { Link Here
1350
        $lastvalue1,    $innerloop1,      $add2,              $every2,           $whenmorethan2, $setto2,       $lastvalue2,      $innerloop2,
1360
        $lastvalue1,    $innerloop1,      $add2,              $every2,           $whenmorethan2, $setto2,       $lastvalue2,      $innerloop2,
1351
        $add3,          $every3,          $whenmorethan3,     $setto3,           $lastvalue3,    $innerloop3,   $numberingmethod, "$status",
1361
        $add3,          $every3,          $whenmorethan3,     $setto3,           $lastvalue3,    $innerloop3,   $numberingmethod, "$status",
1352
        $notes,         $letter,          $firstacquidate,    $irregularity,     $numberpattern, $callnumber,   $hemisphere,      $manualhistory,
1362
        $notes,         $letter,          $firstacquidate,    $irregularity,     $numberpattern, $callnumber,   $hemisphere,      $manualhistory,
1353
        $internalnotes, $serialsadditems, $staffdisplaycount, $opacdisplaycount, $graceperiod,   $location,     $enddate
1363
        $internalnotes, $serialsadditems, $staffdisplaycount, $opacdisplaycount, $graceperiod,   $location,     $enddate,         $x_label,
1364
        $y_label,       $z_label
1354
    );
1365
    );
1355
1366
1356
    my $subscriptionid = $dbh->{'mysql_insertid'};
1367
    my $subscriptionid = $dbh->{'mysql_insertid'};
(-)a/serials/subscription-add.pl (-4 / +13 lines)
Lines 275-280 sub redirect_add_subscription { Link Here
275
    my $missinglist    = $query->param('missinglist');
275
    my $missinglist    = $query->param('missinglist');
276
    my $opacnote       = $query->param('opacnote');
276
    my $opacnote       = $query->param('opacnote');
277
    my $librariannote  = $query->param('librariannote');
277
    my $librariannote  = $query->param('librariannote');
278
    my $x_label           = $query->param('x_label');
279
    my $y_label           = $query->param('y_label');
280
    my $z_label           = $query->param('z_label');
278
    my $subscriptionid = NewSubscription(
281
    my $subscriptionid = NewSubscription(
279
        $auser,           $branchcode,
282
        $auser,           $branchcode,
280
        $aqbooksellerid,  $cost,
283
        $aqbooksellerid,  $cost,
Lines 299-305 sub redirect_add_subscription { Link Here
299
        $internalnotes,     $serialsadditems,
302
        $internalnotes,     $serialsadditems,
300
        $staffdisplaycount, $opacdisplaycount,
303
        $staffdisplaycount, $opacdisplaycount,
301
        $graceperiod,       $location,
304
        $graceperiod,       $location,
302
        $enddate
305
        $enddate,
306
        $x_label, $y_label, $z_label,
303
    );
307
    );
304
    ModSubscriptionHistory(
308
    ModSubscriptionHistory(
305
        $subscriptionid, $histstartdate, $histenddate, $recievedlist,
309
        $subscriptionid, $histstartdate, $histenddate, $recievedlist,
Lines 375-381 sub redirect_mod_subscription { Link Here
375
    my $location          = $query->param('location');
379
    my $location          = $query->param('location');
376
    my $nextexpected      = GetNextExpected($subscriptionid);
380
    my $nextexpected      = GetNextExpected($subscriptionid);
377
381
378
#  If it's  a mod, we need to check the current 'expected' issue, and mod it in the serials table if necessary.
382
    # field labels
383
    my $x_label           = $query->param('x_label');
384
    my $y_label           = $query->param('y_label');
385
    my $z_label           = $query->param('z_label');
386
387
    #  If it's  a mod, we need to check the current 'expected' issue, and mod it in the serials table if necessary.
379
    if ( $nextacquidate ne $nextexpected->{planneddate}->output('iso') ) {
388
    if ( $nextacquidate ne $nextexpected->{planneddate}->output('iso') ) {
380
        ModNextExpected( $subscriptionid,
389
        ModNextExpected( $subscriptionid,
381
            C4::Dates->new( $nextacquidate, 'iso' ) );
390
            C4::Dates->new( $nextacquidate, 'iso' ) );
Lines 408-414 sub redirect_mod_subscription { Link Here
408
        $internalnotes,     $serialsadditems,
417
        $internalnotes,     $serialsadditems,
409
        $staffdisplaycount, $opacdisplaycount,
418
        $staffdisplaycount, $opacdisplaycount,
410
        $graceperiod,       $location,
419
        $graceperiod,       $location,
411
        $enddate,           $subscriptionid
420
        $enddate,           $subscriptionid,
421
        $x_label,           $y_label,          $z_label
412
    );
422
    );
413
    ModSubscriptionHistory(
423
    ModSubscriptionHistory(
414
        $subscriptionid, $histstartdate, $histenddate, $recievedlist,
424
        $subscriptionid, $histstartdate, $histenddate, $recievedlist,
415
- 

Return to bug 8956