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

(-)a/C4/Serials.pm (-9 / +20 lines)
Lines 941-946 sub GetNextSeq { Link Here
941
    $newlastvalue3 = $val->{setto3} if ( $newlastvalue3 > $val->{whenmorethan3} );    # reset counter if needed.
941
    $newlastvalue3 = $val->{setto3} if ( $newlastvalue3 > $val->{whenmorethan3} );    # reset counter if needed.
942
    $calculated =~ s/\{Z\}/$newlastvalue3/g;
942
    $calculated =~ s/\{Z\}/$newlastvalue3/g;
943
943
944
    my $x_label = $val->{'serialseq_x_label'};
945
    my $y_label = $val->{'serialseq_y_label'};
946
    my $z_label = $val->{'serialseq_z_label'};
947
    $calculated =~ s/\{XL\}/$x_label/g;
948
    $calculated =~ s/\{YL\}/$y_label/g;
949
    $calculated =~ s/\{ZL\}/$z_label/g;
950
944
    return ( $calculated, $newlastvalue1, $newlastvalue2, $newlastvalue3, $newinnerloop1, $newinnerloop2, $newinnerloop3 );
951
    return ( $calculated, $newlastvalue1, $newlastvalue2, $newlastvalue3, $newinnerloop1, $newinnerloop2, $newinnerloop3 );
945
}
952
}
946
953
Lines 1244-1250 sub ModSubscription { Link Here
1244
        $whenmorethan1,   $setto1,          $lastvalue1,        $innerloop1,       $add2,          $every2,      $whenmorethan2, $setto2,
1251
        $whenmorethan1,   $setto1,          $lastvalue1,        $innerloop1,       $add2,          $every2,      $whenmorethan2, $setto2,
1245
        $lastvalue2,      $innerloop2,      $add3,              $every3,           $whenmorethan3, $setto3,      $lastvalue3,    $innerloop3,
1252
        $lastvalue2,      $innerloop2,      $add3,              $every3,           $whenmorethan3, $setto3,      $lastvalue3,    $innerloop3,
1246
        $numberingmethod, $status,          $biblionumber,      $callnumber,       $notes,         $letter,      $hemisphere,    $manualhistory,
1253
        $numberingmethod, $status,          $biblionumber,      $callnumber,       $notes,         $letter,      $hemisphere,    $manualhistory,
1247
        $internalnotes,   $serialsadditems, $staffdisplaycount, $opacdisplaycount, $graceperiod,   $location,    $enddate,       $subscriptionid
1254
        $internalnotes,   $serialsadditems, $staffdisplaycount, $opacdisplaycount, $graceperiod,   $location,    $enddate,       $subscriptionid,
1255
        $x_label,         $y_label,         $z_label
1248
    ) = @_;
1256
    ) = @_;
1249
1257
1250
    #     warn $irregularity;
1258
    #     warn $irregularity;
Lines 1256-1264 sub ModSubscription { Link Here
1256
                        add2=?,every2=?,whenmorethan2=?,setto2=?,lastvalue2=?,innerloop2=?,
1264
                        add2=?,every2=?,whenmorethan2=?,setto2=?,lastvalue2=?,innerloop2=?,
1257
                        add3=?,every3=?,whenmorethan3=?,setto3=?,lastvalue3=?,innerloop3=?,
1265
                        add3=?,every3=?,whenmorethan3=?,setto3=?,lastvalue3=?,innerloop3=?,
1258
                        numberingmethod=?, status=?, biblionumber=?, callnumber=?, notes=?, 
1266
                        numberingmethod=?, status=?, biblionumber=?, callnumber=?, notes=?, 
1259
						letter=?, hemisphere=?,manualhistory=?,internalnotes=?,serialsadditems=?,
1267
                        letter=?, hemisphere=?,manualhistory=?,internalnotes=?,serialsadditems=?,
1260
						staffdisplaycount = ?,opacdisplaycount = ?, graceperiod = ?, location = ?
1268
                        staffdisplaycount = ?,opacdisplaycount = ?, graceperiod = ?, location = ?,
1261
						,enddate=?
1269
                        enddate=?, serialseq_x_label=?, serialseq_y_label=?, serialseq_z_label=?
1262
                    WHERE subscriptionid = ?";
1270
                    WHERE subscriptionid = ?";
1263
1271
1264
    #warn "query :".$query;
1272
    #warn "query :".$query;
Lines 1275-1281 sub ModSubscription { Link Here
1275
        $numberingmethod, $status,         $biblionumber,   $callnumber,
1283
        $numberingmethod, $status,         $biblionumber,   $callnumber,
1276
        $notes, $letter, $hemisphere, ( $manualhistory ? $manualhistory : 0 ),
1284
        $notes, $letter, $hemisphere, ( $manualhistory ? $manualhistory : 0 ),
1277
        $internalnotes, $serialsadditems, $staffdisplaycount, $opacdisplaycount,
1285
        $internalnotes, $serialsadditems, $staffdisplaycount, $opacdisplaycount,
1278
        $graceperiod,   $location,        $enddate,           $subscriptionid
1286
        $graceperiod,   $location,        $enddate,           $subscriptionid,
1287
        $x_label,       $y_label,         $z_label
1279
    );
1288
    );
1280
    my $rows = $sth->rows;
1289
    my $rows = $sth->rows;
1281
1290
Lines 1306-1312 sub NewSubscription { Link Here
1306
        $lastvalue1,    $innerloop1,      $add2,              $every2,           $whenmorethan2, $setto2,       $lastvalue2,      $innerloop2,
1315
        $lastvalue1,    $innerloop1,      $add2,              $every2,           $whenmorethan2, $setto2,       $lastvalue2,      $innerloop2,
1307
        $add3,          $every3,          $whenmorethan3,     $setto3,           $lastvalue3,    $innerloop3,   $numberingmethod, $status,
1316
        $add3,          $every3,          $whenmorethan3,     $setto3,           $lastvalue3,    $innerloop3,   $numberingmethod, $status,
1308
        $notes,         $letter,          $firstacquidate,    $irregularity,     $numberpattern, $callnumber,   $hemisphere,      $manualhistory,
1317
        $notes,         $letter,          $firstacquidate,    $irregularity,     $numberpattern, $callnumber,   $hemisphere,      $manualhistory,
1309
        $internalnotes, $serialsadditems, $staffdisplaycount, $opacdisplaycount, $graceperiod,   $location,     $enddate
1318
        $internalnotes, $serialsadditems, $staffdisplaycount, $opacdisplaycount, $graceperiod,   $location,     $enddate,         $x_label,
1319
        $y_label,       $z_label
1310
    ) = @_;
1320
    ) = @_;
1311
    my $dbh = C4::Context->dbh;
1321
    my $dbh = C4::Context->dbh;
1312
1322
Lines 1320-1327 sub NewSubscription { Link Here
1320
            add3,every3,whenmorethan3,setto3,lastvalue3,innerloop3,
1330
            add3,every3,whenmorethan3,setto3,lastvalue3,innerloop3,
1321
            numberingmethod, status, notes, letter,firstacquidate,irregularity,
1331
            numberingmethod, status, notes, letter,firstacquidate,irregularity,
1322
            numberpattern, callnumber, hemisphere,manualhistory,internalnotes,serialsadditems,
1332
            numberpattern, callnumber, hemisphere,manualhistory,internalnotes,serialsadditems,
1323
            staffdisplaycount,opacdisplaycount,graceperiod,location,enddate)
1333
            staffdisplaycount,opacdisplaycount,graceperiod,location,enddate,serialseq_x_label,serialseq_y_label,serialseq_z_label)
1324
        VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)
1334
        VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)
1325
        |;
1335
        |;
1326
    my $sth = $dbh->prepare($query);
1336
    my $sth = $dbh->prepare($query);
1327
    $sth->execute(
1337
    $sth->execute(
Lines 1330-1336 sub NewSubscription { Link Here
1330
        $lastvalue1,    $innerloop1,      $add2,              $every2,           $whenmorethan2, $setto2,       $lastvalue2,      $innerloop2,
1340
        $lastvalue1,    $innerloop1,      $add2,              $every2,           $whenmorethan2, $setto2,       $lastvalue2,      $innerloop2,
1331
        $add3,          $every3,          $whenmorethan3,     $setto3,           $lastvalue3,    $innerloop3,   $numberingmethod, "$status",
1341
        $add3,          $every3,          $whenmorethan3,     $setto3,           $lastvalue3,    $innerloop3,   $numberingmethod, "$status",
1332
        $notes,         $letter,          $firstacquidate,    $irregularity,     $numberpattern, $callnumber,   $hemisphere,      $manualhistory,
1342
        $notes,         $letter,          $firstacquidate,    $irregularity,     $numberpattern, $callnumber,   $hemisphere,      $manualhistory,
1333
        $internalnotes, $serialsadditems, $staffdisplaycount, $opacdisplaycount, $graceperiod,   $location,     $enddate
1343
        $internalnotes, $serialsadditems, $staffdisplaycount, $opacdisplaycount, $graceperiod,   $location,     $enddate,         $x_label,
1344
        $y_label,       $z_label
1334
    );
1345
    );
1335
1346
1336
    my $subscriptionid = $dbh->{'mysql_insertid'};
1347
    my $subscriptionid = $dbh->{'mysql_insertid'};
(-)a/serials/subscription-add.pl (-3 / +12 lines)
Lines 253-258 sub redirect_add_subscription { Link Here
253
    my $missinglist       = $query->param('missinglist');
253
    my $missinglist       = $query->param('missinglist');
254
    my $opacnote          = $query->param('opacnote');
254
    my $opacnote          = $query->param('opacnote');
255
    my $librariannote     = $query->param('librariannote');
255
    my $librariannote     = $query->param('librariannote');
256
    my $x_label           = $query->param('x_label');
257
    my $y_label           = $query->param('y_label');
258
    my $z_label           = $query->param('z_label');
256
    my $subscriptionid    = NewSubscription(
259
    my $subscriptionid    = NewSubscription(
257
        $auser,         $branchcode,   $aqbooksellerid,  $cost,
260
        $auser,         $branchcode,   $aqbooksellerid,  $cost,
258
        $aqbudgetid,    $biblionumber, $startdate,       $periodicity,
261
        $aqbudgetid,    $biblionumber, $startdate,       $periodicity,
Lines 265-271 sub redirect_add_subscription { Link Here
265
        $notes, $letter, $firstacquidate, join( ",", @irregularity ),
268
        $notes, $letter, $firstacquidate, join( ",", @irregularity ),
266
        $numberpattern, $callnumber, $hemisphere, ( $manualhistory ? $manualhistory : 0 ),
269
        $numberpattern, $callnumber, $hemisphere, ( $manualhistory ? $manualhistory : 0 ),
267
        $internalnotes, $serialsadditems, $staffdisplaycount, $opacdisplaycount,
270
        $internalnotes, $serialsadditems, $staffdisplaycount, $opacdisplaycount,
268
        $graceperiod,   $location,        $enddate
271
        $graceperiod,   $location,        $enddate,           $x_label,
272
        $y_label,       $z_label
269
    );
273
    );
270
    ModSubscriptionHistory( $subscriptionid, $histstartdate, $histenddate, $recievedlist, $missinglist, $opacnote, $librariannote );
274
    ModSubscriptionHistory( $subscriptionid, $histstartdate, $histenddate, $recievedlist, $missinglist, $opacnote, $librariannote );
271
275
Lines 335-340 sub redirect_mod_subscription { Link Here
335
    my $location          = $query->param('location');
339
    my $location          = $query->param('location');
336
    my $nextexpected      = GetNextExpected($subscriptionid);
340
    my $nextexpected      = GetNextExpected($subscriptionid);
337
341
342
    # field labels
343
    my $x_label           = $query->param('x_label');
344
    my $y_label           = $query->param('y_label');
345
    my $z_label           = $query->param('z_label');
346
338
    #  If it's  a mod, we need to check the current 'expected' issue, and mod it in the serials table if necessary.
347
    #  If it's  a mod, we need to check the current 'expected' issue, and mod it in the serials table if necessary.
339
    if ( $nextacquidate ne $nextexpected->{planneddate}->output('iso') ) {
348
    if ( $nextacquidate ne $nextexpected->{planneddate}->output('iso') ) {
340
        ModNextExpected( $subscriptionid, C4::Dates->new( $nextacquidate, 'iso' ) );
349
        ModNextExpected( $subscriptionid, C4::Dates->new( $nextacquidate, 'iso' ) );
Lines 351-357 sub redirect_mod_subscription { Link Here
351
        $lastvalue2,        $innerloop2,       $add3,            $every3,        $whenmorethan3,  $setto3,
360
        $lastvalue2,        $innerloop2,       $add3,            $every3,        $whenmorethan3,  $setto3,
352
        $lastvalue3,        $innerloop3,       $numberingmethod, $status,        $biblionumber,   $callnumber,
361
        $lastvalue3,        $innerloop3,       $numberingmethod, $status,        $biblionumber,   $callnumber,
353
        $notes,             $letter,           $hemisphere,      $manualhistory, $internalnotes,  $serialsadditems,
362
        $notes,             $letter,           $hemisphere,      $manualhistory, $internalnotes,  $serialsadditems,
354
        $staffdisplaycount, $opacdisplaycount, $graceperiod,     $location,      $enddate,        $subscriptionid
363
        $staffdisplaycount, $opacdisplaycount, $graceperiod,     $location,      $enddate,        $subscriptionid,
364
        $x_label,           $y_label,          $z_label
355
    );
365
    );
356
    ModSubscriptionHistory( $subscriptionid, $histstartdate, $histenddate, $recievedlist, $missinglist, $opacnote, $librariannote );
366
    ModSubscriptionHistory( $subscriptionid, $histstartdate, $histenddate, $recievedlist, $missinglist, $opacnote, $librariannote );
357
    print $query->redirect("/cgi-bin/koha/serials/subscription-detail.pl?subscriptionid=$subscriptionid");
367
    print $query->redirect("/cgi-bin/koha/serials/subscription-detail.pl?subscriptionid=$subscriptionid");
358
- 

Return to bug 8956