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

(-)a/C4/Serials.pm (-96 / +105 lines)
Lines 328-334 sub GetFullSubscription { Link Here
328
            aqbooksellers.name as aqbooksellername,
328
            aqbooksellers.name as aqbooksellername,
329
            biblio.title as bibliotitle,
329
            biblio.title as bibliotitle,
330
            subscription.branchcode AS branchcode,
330
            subscription.branchcode AS branchcode,
331
            subscription.subscriptionid AS subscriptionid
331
            subscription.subscriptionid AS subscriptionid,
332
            subscription.preselect_issues_in_collections_table AS preselect_issues_in_collections_table
332
  FROM      serial 
333
  FROM      serial 
333
  LEFT JOIN subscription ON 
334
  LEFT JOIN subscription ON 
334
          (serial.subscriptionid=subscription.subscriptionid )
335
          (serial.subscriptionid=subscription.subscriptionid )
Lines 373-378 sub PrepareSerialsData { Link Here
373
374
374
    foreach my $subs ( @{$lines} ) {
375
    foreach my $subs ( @{$lines} ) {
375
        $subs->{ "status" . $subs->{'status'} } = 1;
376
        $subs->{ "status" . $subs->{'status'} } = 1;
377
        if ( $subs->{preselect_issues_in_collections_table} && grep { $_ == $subs->{status} }
378
            ( EXPECTED, LATE, MISSING_STATUSES, CLAIMED ) )
379
        {
380
            $subs->{"checked"} = 1;
381
        }
376
        if ($add_itemnumbers) {
382
        if ($add_itemnumbers) {
377
            my $serialitem = Koha::Serial::Items->find( { serialid => $subs->{'serialid'} } );
383
            my $serialitem = Koha::Serial::Items->find( { serialid => $subs->{'serialid'} } );
378
            $subs->{"itemnumber"} = $serialitem->itemnumber if $serialitem;
384
            $subs->{"itemnumber"} = $serialitem->itemnumber if $serialitem;
Lines 470-476 sub GetFullSubscriptionsFromBiblionumber { Link Here
470
            biblio.title as bibliotitle,
476
            biblio.title as bibliotitle,
471
            subscription.branchcode AS branchcode,
477
            subscription.branchcode AS branchcode,
472
            subscription.subscriptionid AS subscriptionid,
478
            subscription.subscriptionid AS subscriptionid,
473
            subscription.location AS location
479
            subscription.location AS location,
480
            subscription.preselect_issues_in_collections_table AS preselect_issues_in_collections_table
474
  FROM      serial 
481
  FROM      serial 
475
  LEFT JOIN subscription ON 
482
  LEFT JOIN subscription ON 
476
          (serial.subscriptionid=subscription.subscriptionid)
483
          (serial.subscriptionid=subscription.subscriptionid)
Lines 1341-1398 returns the number of rows affected Link Here
1341
1348
1342
sub ModSubscription {
1349
sub ModSubscription {
1343
    my (
1350
    my (
1344
        $auser,         $branchcode,       $aqbooksellerid,    $cost,          $aqbudgetid, $startdate,
1351
        $auser,         $branchcode,      $aqbooksellerid,    $cost,          $aqbudgetid, $startdate,
1345
        $periodicity,   $firstacquidate,   $irregularity,      $numberpattern, $locale,
1352
        $periodicity,   $firstacquidate,  $irregularity,      $numberpattern, $locale,
1346
        $numberlength,  $weeklength,       $monthlength,       $lastvalue1,    $innerloop1,
1353
        $numberlength,  $weeklength,      $monthlength,       $lastvalue1,    $innerloop1,
1347
        $lastvalue2,    $innerloop2,       $lastvalue3,        $innerloop3,    $status,
1354
        $lastvalue2,    $innerloop2,      $lastvalue3,        $innerloop3,    $status,
1348
        $biblionumber,  $callnumber,       $notes,             $letter,        $manualhistory,
1355
        $biblionumber,  $callnumber,      $notes,             $letter,        $manualhistory,
1349
        $internalnotes, $serialsadditems,  $staffdisplaycount, $opacdisplaycount,
1356
        $internalnotes, $serialsadditems, $staffdisplaycount, $opacdisplaycount,
1350
        $graceperiod,   $location,         $enddate,           $subscriptionid, $skip_serialseq,
1357
        $graceperiod,   $location,        $enddate,           $subscriptionid, $skip_serialseq,
1351
        $itemtype,      $previousitemtype, $mana_id,           $ccode,          $published_on_template
1358
        $itemtype, $previousitemtype, $mana_id, $ccode, $published_on_template, $preselect_issues_in_collections_table
1352
    ) = @_;
1359
    ) = @_;
1353
1360
1354
    my $subscription = Koha::Subscriptions->find($subscriptionid);
1361
    my $subscription = Koha::Subscriptions->find($subscriptionid);
1355
    $subscription->set(
1362
    $subscription->set(
1356
        {
1363
        {
1357
            librarian             => $auser,
1364
            librarian                             => $auser,
1358
            branchcode            => $branchcode,
1365
            branchcode                            => $branchcode,
1359
            aqbooksellerid        => $aqbooksellerid,
1366
            aqbooksellerid                        => $aqbooksellerid,
1360
            cost                  => $cost,
1367
            cost                                  => $cost,
1361
            aqbudgetid            => $aqbudgetid,
1368
            aqbudgetid                            => $aqbudgetid,
1362
            biblionumber          => $biblionumber,
1369
            biblionumber                          => $biblionumber,
1363
            startdate             => $startdate,
1370
            startdate                             => $startdate,
1364
            periodicity           => $periodicity,
1371
            periodicity                           => $periodicity,
1365
            numberlength          => $numberlength,
1372
            numberlength                          => $numberlength,
1366
            weeklength            => $weeklength,
1373
            weeklength                            => $weeklength,
1367
            monthlength           => $monthlength,
1374
            monthlength                           => $monthlength,
1368
            lastvalue1            => $lastvalue1,
1375
            lastvalue1                            => $lastvalue1,
1369
            innerloop1            => $innerloop1,
1376
            innerloop1                            => $innerloop1,
1370
            lastvalue2            => $lastvalue2,
1377
            lastvalue2                            => $lastvalue2,
1371
            innerloop2            => $innerloop2,
1378
            innerloop2                            => $innerloop2,
1372
            lastvalue3            => $lastvalue3,
1379
            lastvalue3                            => $lastvalue3,
1373
            innerloop3            => $innerloop3,
1380
            innerloop3                            => $innerloop3,
1374
            status                => $status,
1381
            status                                => $status,
1375
            notes                 => $notes,
1382
            notes                                 => $notes,
1376
            letter                => $letter,
1383
            letter                                => $letter,
1377
            firstacquidate        => $firstacquidate,
1384
            firstacquidate                        => $firstacquidate,
1378
            irregularity          => $irregularity,
1385
            irregularity                          => $irregularity,
1379
            numberpattern         => $numberpattern,
1386
            numberpattern                         => $numberpattern,
1380
            locale                => $locale,
1387
            locale                                => $locale,
1381
            callnumber            => $callnumber,
1388
            callnumber                            => $callnumber,
1382
            manualhistory         => $manualhistory,
1389
            manualhistory                         => $manualhistory,
1383
            internalnotes         => $internalnotes,
1390
            internalnotes                         => $internalnotes,
1384
            serialsadditems       => $serialsadditems,
1391
            serialsadditems                       => $serialsadditems,
1385
            staffdisplaycount     => $staffdisplaycount,
1392
            staffdisplaycount                     => $staffdisplaycount,
1386
            opacdisplaycount      => $opacdisplaycount,
1393
            opacdisplaycount                      => $opacdisplaycount,
1387
            graceperiod           => $graceperiod,
1394
            graceperiod                           => $graceperiod,
1388
            location              => $location,
1395
            location                              => $location,
1389
            enddate               => $enddate,
1396
            enddate                               => $enddate,
1390
            skip_serialseq        => $skip_serialseq,
1397
            skip_serialseq                        => $skip_serialseq,
1391
            itemtype              => $itemtype,
1398
            itemtype                              => $itemtype,
1392
            previousitemtype      => $previousitemtype,
1399
            previousitemtype                      => $previousitemtype,
1393
            mana_id               => $mana_id,
1400
            mana_id                               => $mana_id,
1394
            ccode                 => $ccode,
1401
            ccode                                 => $ccode,
1395
            published_on_template => $published_on_template,
1402
            published_on_template                 => $published_on_template,
1403
            preselect_issues_in_collections_table => $preselect_issues_in_collections_table,
1396
        }
1404
        }
1397
    )->store;
1405
    )->store;
1398
1406
Lines 1425-1482 the id of this new subscription Link Here
1425
1433
1426
sub NewSubscription {
1434
sub NewSubscription {
1427
    my (
1435
    my (
1428
        $auser,           $branchcode,        $aqbooksellerid,   $cost,          $aqbudgetid, $biblionumber,
1436
        $auser,                 $branchcode,        $aqbooksellerid,   $cost,          $aqbudgetid, $biblionumber,
1429
        $startdate,       $periodicity,       $numberlength,     $weeklength,    $monthlength,
1437
        $startdate,             $periodicity,       $numberlength,     $weeklength,    $monthlength,
1430
        $lastvalue1,      $innerloop1,        $lastvalue2,       $innerloop2,    $lastvalue3,
1438
        $lastvalue1,            $innerloop1,        $lastvalue2,       $innerloop2,    $lastvalue3,
1431
        $innerloop3,      $status,            $notes,            $letter,        $firstacquidate, $irregularity,
1439
        $innerloop3,            $status,            $notes,            $letter,        $firstacquidate, $irregularity,
1432
        $numberpattern,   $locale,            $callnumber,       $manualhistory, $internalnotes,
1440
        $numberpattern,         $locale,            $callnumber,       $manualhistory, $internalnotes,
1433
        $serialsadditems, $staffdisplaycount, $opacdisplaycount, $graceperiod,
1441
        $serialsadditems,       $staffdisplaycount, $opacdisplaycount, $graceperiod,
1434
        $location,        $enddate,           $skip_serialseq,   $itemtype, $previousitemtype, $mana_id, $ccode,
1442
        $location,              $enddate,           $skip_serialseq,   $itemtype, $previousitemtype, $mana_id, $ccode,
1435
        $published_on_template,
1443
        $published_on_template, $preselect_issues_in_collections_table
1436
    ) = @_;
1444
    ) = @_;
1437
    my $dbh = C4::Context->dbh;
1445
    my $dbh = C4::Context->dbh;
1438
1446
1439
    my $subscription = Koha::Subscription->new(
1447
    my $subscription = Koha::Subscription->new(
1440
        {
1448
        {
1441
            librarian             => $auser,
1449
            librarian                             => $auser,
1442
            branchcode            => $branchcode,
1450
            branchcode                            => $branchcode,
1443
            aqbooksellerid        => $aqbooksellerid,
1451
            aqbooksellerid                        => $aqbooksellerid,
1444
            cost                  => $cost,
1452
            cost                                  => $cost,
1445
            aqbudgetid            => $aqbudgetid,
1453
            aqbudgetid                            => $aqbudgetid,
1446
            biblionumber          => $biblionumber,
1454
            biblionumber                          => $biblionumber,
1447
            startdate             => $startdate,
1455
            startdate                             => $startdate,
1448
            periodicity           => $periodicity,
1456
            periodicity                           => $periodicity,
1449
            numberlength          => $numberlength,
1457
            numberlength                          => $numberlength,
1450
            weeklength            => $weeklength,
1458
            weeklength                            => $weeklength,
1451
            monthlength           => $monthlength,
1459
            monthlength                           => $monthlength,
1452
            lastvalue1            => $lastvalue1,
1460
            lastvalue1                            => $lastvalue1,
1453
            innerloop1            => $innerloop1,
1461
            innerloop1                            => $innerloop1,
1454
            lastvalue2            => $lastvalue2,
1462
            lastvalue2                            => $lastvalue2,
1455
            innerloop2            => $innerloop2,
1463
            innerloop2                            => $innerloop2,
1456
            lastvalue3            => $lastvalue3,
1464
            lastvalue3                            => $lastvalue3,
1457
            innerloop3            => $innerloop3,
1465
            innerloop3                            => $innerloop3,
1458
            status                => $status,
1466
            status                                => $status,
1459
            notes                 => $notes,
1467
            notes                                 => $notes,
1460
            letter                => $letter,
1468
            letter                                => $letter,
1461
            firstacquidate        => $firstacquidate,
1469
            firstacquidate                        => $firstacquidate,
1462
            irregularity          => $irregularity,
1470
            irregularity                          => $irregularity,
1463
            numberpattern         => $numberpattern,
1471
            numberpattern                         => $numberpattern,
1464
            locale                => $locale,
1472
            locale                                => $locale,
1465
            callnumber            => $callnumber,
1473
            callnumber                            => $callnumber,
1466
            manualhistory         => $manualhistory,
1474
            manualhistory                         => $manualhistory,
1467
            internalnotes         => $internalnotes,
1475
            internalnotes                         => $internalnotes,
1468
            serialsadditems       => $serialsadditems,
1476
            serialsadditems                       => $serialsadditems,
1469
            staffdisplaycount     => $staffdisplaycount,
1477
            staffdisplaycount                     => $staffdisplaycount,
1470
            opacdisplaycount      => $opacdisplaycount,
1478
            opacdisplaycount                      => $opacdisplaycount,
1471
            graceperiod           => $graceperiod,
1479
            graceperiod                           => $graceperiod,
1472
            location              => $location,
1480
            location                              => $location,
1473
            enddate               => $enddate,
1481
            enddate                               => $enddate,
1474
            skip_serialseq        => $skip_serialseq,
1482
            skip_serialseq                        => $skip_serialseq,
1475
            itemtype              => $itemtype,
1483
            itemtype                              => $itemtype,
1476
            previousitemtype      => $previousitemtype,
1484
            previousitemtype                      => $previousitemtype,
1477
            mana_id               => $mana_id,
1485
            mana_id                               => $mana_id,
1478
            ccode                 => $ccode,
1486
            ccode                                 => $ccode,
1479
            published_on_template => $published_on_template,
1487
            published_on_template                 => $published_on_template,
1488
            preselect_issues_in_collections_table => $preselect_issues_in_collections_table,
1480
        }
1489
        }
1481
    )->store;
1490
    )->store;
1482
    $subscription->discard_changes;
1491
    $subscription->discard_changes;
(-)a/Koha/Schema/Result/Subscription.pm (-6 / +17 lines)
Lines 341-346 collection code to assign to serial items Link Here
341
341
342
Template Toolkit syntax to generate the default "Published on (text)" field when receiving an issue this serial
342
Template Toolkit syntax to generate the default "Published on (text)" field when receiving an issue this serial
343
343
344
=head2 preselect_issues_in_collections_table
345
346
  data_type: 'tinyint'
347
  default_value: 0
348
  is_nullable: 0
349
350
yes / no if the subscription should preselect issues in the collections table
351
344
=cut
352
=cut
345
353
346
__PACKAGE__->add_columns(
354
__PACKAGE__->add_columns(
Lines 434-439 __PACKAGE__->add_columns( Link Here
434
  { data_type => "varchar", is_nullable => 1, size => 80 },
442
  { data_type => "varchar", is_nullable => 1, size => 80 },
435
  "published_on_template",
443
  "published_on_template",
436
  { data_type => "text", is_nullable => 1 },
444
  { data_type => "text", is_nullable => 1 },
445
  "preselect_issues_in_collections_table",
446
  { data_type => "tinyint", default_value => 0, is_nullable => 0 },
437
);
447
);
438
448
439
=head1 PRIMARY KEY
449
=head1 PRIMARY KEY
Lines 586-593 __PACKAGE__->has_many( Link Here
586
);
596
);
587
597
588
598
589
# Created by DBIx::Class::Schema::Loader v0.07051 @ 2024-11-11 14:57:59
599
# Created by DBIx::Class::Schema::Loader v0.07051 @ 2025-05-09 08:07:54
590
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:1Ht7Nfl870dv1NOs4vr04g
600
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:TZz+AyW1pPFbUMdo2mneuw
591
601
592
__PACKAGE__->has_many(
602
__PACKAGE__->has_many(
593
  "additional_field_values",
603
  "additional_field_values",
Lines 606-615 __PACKAGE__->has_many( Link Here
606
);
616
);
607
617
608
__PACKAGE__->add_columns(
618
__PACKAGE__->add_columns(
609
    '+closed'          => { is_boolean => 1 },
619
    '+closed'                                => { is_boolean => 1 },
610
    '+manualhistory'   => { is_boolean => 1 },
620
    '+manualhistory'                         => { is_boolean => 1 },
611
    '+serialsadditems' => { is_boolean => 1 },
621
    '+serialsadditems'                       => { is_boolean => 1 },
612
    '+skip_serialseq'  => { is_boolean => 1 },
622
    '+skip_serialseq'                        => { is_boolean => 1 },
623
    '+preselect_issues_in_collections_table' => { is_boolean => 1 },
613
);
624
);
614
625
615
1;
626
1;
(-)a/installer/data/mysql/atomicupdate/bug_38061-collections_preselect_column.pl (+19 lines)
Line 0 Link Here
1
use Modern::Perl;
2
use Koha::Installer::Output qw(say_warning say_success say_info);
3
4
return {
5
    bug_number  => "38061",
6
    description =>
7
        "Add a column to determine whether a subscription's issues should be preselected in the collections table",
8
    up => sub {
9
        my ($args) = @_;
10
        my ( $dbh, $out ) = @$args{qw(dbh out)};
11
12
        if ( !column_exists( 'subscription', 'preselect_issues_in_collections_table' ) ) {
13
            $dbh->do(
14
                q{ ALTER TABLE subscription ADD COLUMN `preselect_issues_in_collections_table` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'yes / no if the subscription should preselect issues in the collections table' AFTER published_on_template}
15
            );
16
            say_success( $out, "Added column 'subscription.preselect_issues_in_collections_table'" );
17
        }
18
    },
19
};
(-)a/installer/data/mysql/kohastructure.sql (+1 lines)
Lines 6187-6192 CREATE TABLE `subscription` ( Link Here
6187
  `mana_id` int(11) DEFAULT NULL,
6187
  `mana_id` int(11) DEFAULT NULL,
6188
  `ccode` varchar(80) DEFAULT NULL COMMENT 'collection code to assign to serial items',
6188
  `ccode` varchar(80) DEFAULT NULL COMMENT 'collection code to assign to serial items',
6189
  `published_on_template` text DEFAULT NULL COMMENT 'Template Toolkit syntax to generate the default "Published on (text)" field when receiving an issue this serial',
6189
  `published_on_template` text DEFAULT NULL COMMENT 'Template Toolkit syntax to generate the default "Published on (text)" field when receiving an issue this serial',
6190
  `preselect_issues_in_collections_table` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'yes / no if the subscription should preselect issues in the collections table',
6190
  PRIMARY KEY (`subscriptionid`),
6191
  PRIMARY KEY (`subscriptionid`),
6191
  KEY `subscription_ibfk_1` (`periodicity`),
6192
  KEY `subscription_ibfk_1` (`periodicity`),
6192
  KEY `subscription_ibfk_2` (`numberpattern`),
6193
  KEY `subscription_ibfk_2` (`numberpattern`),
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-add.tt (+9 lines)
Lines 286-291 Link Here
286
                                [% END %]
286
                                [% END %]
287
                            </div>
287
                            </div>
288
                        </li>
288
                        </li>
289
                        <li>
290
                            <label for="preselect_issues_in_collections_table">Pre-select issues in the collections table:</label>
291
                            [% IF (preselect_issues_in_collections_table) %]
292
                                <input type="checkbox" id="preselect_issues_in_collections_table" name="preselect_issues_in_collections_table" checked="checked" />
293
                            [% ELSE %]
294
                                <input type="checkbox" id="preselect_issues_in_collections_table" name="preselect_issues_in_collections_table" />
295
                            [% END %]
296
                            <div class="hint">Determines whether the checkboxes in the left hand column of the collections table will be automatically checked based on the issue's status.</div>
297
                        </li>
289
                    </ol>
298
                    </ol>
290
                </fieldset>
299
                </fieldset>
291
                <fieldset class="action">
300
                <fieldset class="action">
(-)a/serials/subscription-add.pl (-49 / +52 lines)
Lines 326-354 sub redirect_add_subscription { Link Here
326
    my $subtype   = $query->param('subtype');
326
    my $subtype   = $query->param('subtype');
327
    my $sublength = $query->param('sublength');
327
    my $sublength = $query->param('sublength');
328
    my ( $numberlength, $weeklength, $monthlength ) = GetSubscriptionLength( $subtype, $sublength );
328
    my ( $numberlength, $weeklength, $monthlength ) = GetSubscriptionLength( $subtype, $sublength );
329
    my $add1                  = $query->param('add1');
329
    my $add1                                  = $query->param('add1');
330
    my $lastvalue1            = $query->param('lastvalue1');
330
    my $lastvalue1                            = $query->param('lastvalue1');
331
    my $innerloop1            = $query->param('innerloop1');
331
    my $innerloop1                            = $query->param('innerloop1');
332
    my $innerloop2            = $query->param('innerloop2');
332
    my $innerloop2                            = $query->param('innerloop2');
333
    my $lastvalue2            = $query->param('lastvalue2');
333
    my $lastvalue2                            = $query->param('lastvalue2');
334
    my $lastvalue3            = $query->param('lastvalue3');
334
    my $lastvalue3                            = $query->param('lastvalue3');
335
    my $innerloop3            = $query->param('innerloop3');
335
    my $innerloop3                            = $query->param('innerloop3');
336
    my $status                = 1;
336
    my $status                                = 1;
337
    my $biblionumber          = $query->param('biblionumber');
337
    my $biblionumber                          = $query->param('biblionumber');
338
    my $callnumber            = $query->param('callnumber');
338
    my $callnumber                            = $query->param('callnumber');
339
    my $notes                 = $query->param('notes');
339
    my $notes                                 = $query->param('notes');
340
    my $internalnotes         = $query->param('internalnotes');
340
    my $internalnotes                         = $query->param('internalnotes');
341
    my $letter                = $query->param('letter');
341
    my $letter                                = $query->param('letter');
342
    my $manualhistory         = $query->param('manualhist') ? 1 : 0;
342
    my $manualhistory                         = $query->param('manualhist') ? 1 : 0;
343
    my $serialsadditems       = $query->param('serialsadditems');
343
    my $serialsadditems                       = $query->param('serialsadditems');
344
    my $staffdisplaycount     = $query->param('staffdisplaycount');
344
    my $staffdisplaycount                     = $query->param('staffdisplaycount');
345
    my $opacdisplaycount      = $query->param('opacdisplaycount');
345
    my $opacdisplaycount                      = $query->param('opacdisplaycount');
346
    my $location              = $query->param('location');
346
    my $location                              = $query->param('location');
347
    my $itemtype              = $query->param('itemtype');
347
    my $itemtype                              = $query->param('itemtype');
348
    my $previousitemtype      = $query->param('previousitemtype');
348
    my $previousitemtype                      = $query->param('previousitemtype');
349
    my $skip_serialseq        = $query->param('skip_serialseq');
349
    my $skip_serialseq                        = $query->param('skip_serialseq');
350
    my $ccode                 = $query->param('ccode');
350
    my $ccode                                 = $query->param('ccode');
351
    my $published_on_template = $query->param('published_on_template');
351
    my $published_on_template                 = $query->param('published_on_template');
352
    my $preselect_issues_in_collections_table = $query->param('preselect_issues_in_collections_table') ? 1 : 0;
352
353
353
    my $mana_id;
354
    my $mana_id;
354
    if ( $query->param('mana_id') ne "" ) {
355
    if ( $query->param('mana_id') ne "" ) {
Lines 376-382 sub redirect_add_subscription { Link Here
376
        join( ";", @irregularity ), $numberpattern,    $locale,         $callnumber,
377
        join( ";", @irregularity ), $numberpattern,    $locale,         $callnumber,
377
        $manualhistory,             $internalnotes,    $serialsadditems,
378
        $manualhistory,             $internalnotes,    $serialsadditems,
378
        $staffdisplaycount,         $opacdisplaycount, $graceperiod, $location, $enddate,
379
        $staffdisplaycount,         $opacdisplaycount, $graceperiod, $location, $enddate,
379
        $skip_serialseq,            $itemtype,         $previousitemtype, $mana_id, $ccode, $published_on_template
380
        $skip_serialseq,            $itemtype,         $previousitemtype, $mana_id, $ccode, $published_on_template,
381
        $preselect_issues_in_collections_table
380
    );
382
    );
381
    if (    ( C4::Context->preference('Mana') == 1 )
383
    if (    ( C4::Context->preference('Mana') == 1 )
382
        and ( grep { $_ eq "subscription" } split( /,/, C4::Context->preference('AutoShareWithMana') ) ) )
384
        and ( grep { $_ eq "subscription" } split( /,/, C4::Context->preference('AutoShareWithMana') ) ) )
Lines 435-463 sub redirect_mod_subscription { Link Here
435
    my $subtype   = $query->param('subtype');
437
    my $subtype   = $query->param('subtype');
436
    my $sublength = $query->param('sublength');
438
    my $sublength = $query->param('sublength');
437
    my ( $numberlength, $weeklength, $monthlength ) = GetSubscriptionLength( $subtype, $sublength );
439
    my ( $numberlength, $weeklength, $monthlength ) = GetSubscriptionLength( $subtype, $sublength );
438
    my $locale                = $query->param('locale');
440
    my $locale                                = $query->param('locale');
439
    my $lastvalue1            = $query->param('lastvalue1');
441
    my $lastvalue1                            = $query->param('lastvalue1');
440
    my $innerloop1            = $query->param('innerloop1');
442
    my $innerloop1                            = $query->param('innerloop1');
441
    my $lastvalue2            = $query->param('lastvalue2');
443
    my $lastvalue2                            = $query->param('lastvalue2');
442
    my $innerloop2            = $query->param('innerloop2');
444
    my $innerloop2                            = $query->param('innerloop2');
443
    my $lastvalue3            = $query->param('lastvalue3');
445
    my $lastvalue3                            = $query->param('lastvalue3');
444
    my $innerloop3            = $query->param('innerloop3');
446
    my $innerloop3                            = $query->param('innerloop3');
445
    my $status                = 1;
447
    my $status                                = 1;
446
    my $callnumber            = $query->param('callnumber');
448
    my $callnumber                            = $query->param('callnumber');
447
    my $notes                 = $query->param('notes');
449
    my $notes                                 = $query->param('notes');
448
    my $internalnotes         = $query->param('internalnotes');
450
    my $internalnotes                         = $query->param('internalnotes');
449
    my $letter                = $query->param('letter');
451
    my $letter                                = $query->param('letter');
450
    my $manualhistory         = $query->param('manualhist') ? 1 : 0;
452
    my $manualhistory                         = $query->param('manualhist') ? 1 : 0;
451
    my $serialsadditems       = $query->param('serialsadditems');
453
    my $serialsadditems                       = $query->param('serialsadditems');
452
    my $staffdisplaycount     = $query->param('staffdisplaycount');
454
    my $staffdisplaycount                     = $query->param('staffdisplaycount');
453
    my $opacdisplaycount      = $query->param('opacdisplaycount');
455
    my $opacdisplaycount                      = $query->param('opacdisplaycount');
454
    my $graceperiod           = $query->param('graceperiod') || 0;
456
    my $graceperiod                           = $query->param('graceperiod') || 0;
455
    my $location              = $query->param('location');
457
    my $location                              = $query->param('location');
456
    my $itemtype              = $query->param('itemtype');
458
    my $itemtype                              = $query->param('itemtype');
457
    my $previousitemtype      = $query->param('previousitemtype');
459
    my $previousitemtype                      = $query->param('previousitemtype');
458
    my $skip_serialseq        = $query->param('skip_serialseq');
460
    my $skip_serialseq                        = $query->param('skip_serialseq');
459
    my $ccode                 = $query->param('ccode');
461
    my $ccode                                 = $query->param('ccode');
460
    my $published_on_template = $query->param('published_on_template');
462
    my $published_on_template                 = $query->param('published_on_template');
463
    my $preselect_issues_in_collections_table = $query->param('preselect_issues_in_collections_table') ? 1 : 0;
461
464
462
    my $mana_id;
465
    my $mana_id;
463
    if ( $query->param('mana_id') ne "" ) {
466
    if ( $query->param('mana_id') ne "" ) {
Lines 494-500 sub redirect_mod_subscription { Link Here
494
        $status,           $biblionumber,   $callnumber,       $notes,      $letter,
497
        $status,           $biblionumber,   $callnumber,       $notes,      $letter,
495
        $manualhistory,    $internalnotes,  $serialsadditems,  $staffdisplaycount,
498
        $manualhistory,    $internalnotes,  $serialsadditems,  $staffdisplaycount,
496
        $opacdisplaycount, $graceperiod,    $location,         $enddate, $subscriptionid,
499
        $opacdisplaycount, $graceperiod,    $location,         $enddate, $subscriptionid,
497
        $skip_serialseq,   $itemtype,       $previousitemtype, $mana_id, $ccode, $published_on_template
500
        $skip_serialseq,   $itemtype,       $previousitemtype, $mana_id, $ccode, $published_on_template,
501
        $preselect_issues_in_collections_table
498
    );
502
    );
499
503
500
    my @additional_fields =
504
    my @additional_fields =
501
- 

Return to bug 38061