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 (-3 / +12 lines)
Lines 251-256 sub redirect_add_subscription { Link Here
251
    my $missinglist       = $query->param('missinglist');
251
    my $missinglist       = $query->param('missinglist');
252
    my $opacnote          = $query->param('opacnote');
252
    my $opacnote          = $query->param('opacnote');
253
    my $librariannote     = $query->param('librariannote');
253
    my $librariannote     = $query->param('librariannote');
254
    my $x_label           = $query->param('x_label');
255
    my $y_label           = $query->param('y_label');
256
    my $z_label           = $query->param('z_label');
254
    my $subscriptionid    = NewSubscription(
257
    my $subscriptionid    = NewSubscription(
255
        $auser,         $branchcode,   $aqbooksellerid,  $cost,
258
        $auser,         $branchcode,   $aqbooksellerid,  $cost,
256
        $aqbudgetid,    $biblionumber, $startdate,       $periodicity,
259
        $aqbudgetid,    $biblionumber, $startdate,       $periodicity,
Lines 263-269 sub redirect_add_subscription { Link Here
263
        $notes, $letter, $firstacquidate, join( ",", @irregularity ),
266
        $notes, $letter, $firstacquidate, join( ",", @irregularity ),
264
        $numberpattern, $callnumber, $hemisphere, ( $manualhistory ? $manualhistory : 0 ),
267
        $numberpattern, $callnumber, $hemisphere, ( $manualhistory ? $manualhistory : 0 ),
265
        $internalnotes, $serialsadditems, $staffdisplaycount, $opacdisplaycount,
268
        $internalnotes, $serialsadditems, $staffdisplaycount, $opacdisplaycount,
266
        $graceperiod,   $location,        $enddate
269
        $graceperiod,   $location,        $enddate,           $x_label,
270
        $y_label,       $z_label
267
    );
271
    );
268
    ModSubscriptionHistory( $subscriptionid, $histstartdate, $histenddate, $recievedlist, $missinglist, $opacnote, $librariannote );
272
    ModSubscriptionHistory( $subscriptionid, $histstartdate, $histenddate, $recievedlist, $missinglist, $opacnote, $librariannote );
269
273
Lines 333-338 sub redirect_mod_subscription { Link Here
333
    my $location          = $query->param('location');
337
    my $location          = $query->param('location');
334
    my $nextexpected      = GetNextExpected($subscriptionid);
338
    my $nextexpected      = GetNextExpected($subscriptionid);
335
339
340
    # field labels
341
    my $x_label           = $query->param('x_label');
342
    my $y_label           = $query->param('y_label');
343
    my $z_label           = $query->param('z_label');
344
336
    #  If it's  a mod, we need to check the current 'expected' issue, and mod it in the serials table if necessary.
345
    #  If it's  a mod, we need to check the current 'expected' issue, and mod it in the serials table if necessary.
337
    if ( $nextacquidate ne $nextexpected->{planneddate}->output('iso') ) {
346
    if ( $nextacquidate ne $nextexpected->{planneddate}->output('iso') ) {
338
        ModNextExpected( $subscriptionid, C4::Dates->new( $nextacquidate, 'iso' ) );
347
        ModNextExpected( $subscriptionid, C4::Dates->new( $nextacquidate, 'iso' ) );
Lines 349-355 sub redirect_mod_subscription { Link Here
349
        $lastvalue2,        $innerloop2,       $add3,            $every3,        $whenmorethan3,  $setto3,
358
        $lastvalue2,        $innerloop2,       $add3,            $every3,        $whenmorethan3,  $setto3,
350
        $lastvalue3,        $innerloop3,       $numberingmethod, $status,        $biblionumber,   $callnumber,
359
        $lastvalue3,        $innerloop3,       $numberingmethod, $status,        $biblionumber,   $callnumber,
351
        $notes,             $letter,           $hemisphere,      $manualhistory, $internalnotes,  $serialsadditems,
360
        $notes,             $letter,           $hemisphere,      $manualhistory, $internalnotes,  $serialsadditems,
352
        $staffdisplaycount, $opacdisplaycount, $graceperiod,     $location,      $enddate,        $subscriptionid
361
        $staffdisplaycount, $opacdisplaycount, $graceperiod,     $location,      $enddate,        $subscriptionid,
362
        $x_label,           $y_label,          $z_label
353
    );
363
    );
354
    ModSubscriptionHistory( $subscriptionid, $histstartdate, $histenddate, $recievedlist, $missinglist, $opacnote, $librariannote );
364
    ModSubscriptionHistory( $subscriptionid, $histstartdate, $histenddate, $recievedlist, $missinglist, $opacnote, $librariannote );
355
    print $query->redirect("/cgi-bin/koha/serials/subscription-detail.pl?subscriptionid=$subscriptionid");
365
    print $query->redirect("/cgi-bin/koha/serials/subscription-detail.pl?subscriptionid=$subscriptionid");
356
- 

Return to bug 8956