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

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

Return to bug 8956