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

(-)a/C4/Items.pm (-2 / +43 lines)
Lines 2335-2341 The $frameworkcode returns the item for the given frameworkcode, ONLY if bibnum Link Here
2335
sub PrepareItemrecordDisplay {
2335
sub PrepareItemrecordDisplay {
2336
2336
2337
    my ( $bibnum, $itemnum, $defaultvalues, $frameworkcode ) = @_;
2337
    my ( $bibnum, $itemnum, $defaultvalues, $frameworkcode ) = @_;
2338
2339
    my $dbh = C4::Context->dbh;
2338
    my $dbh = C4::Context->dbh;
2340
    $frameworkcode = C4::Biblio::GetFrameworkCode($bibnum) if $bibnum;
2339
    $frameworkcode = C4::Biblio::GetFrameworkCode($bibnum) if $bibnum;
2341
    my ( $itemtagfield, $itemtagsubfield ) = C4::Biblio::GetMarcFromKohaField( "items.itemnumber" );
2340
    my ( $itemtagfield, $itemtagsubfield ) = C4::Biblio::GetMarcFromKohaField( "items.itemnumber" );
Lines 2353-2358 sub PrepareItemrecordDisplay { Link Here
2353
    }
2352
    }
2354
    my @loop_data;
2353
    my @loop_data;
2355
2354
2355
    my $unitprice;
2356
    my $replacementprice;
2357
    my @orders = C4::Acquisition::GetOrdersByBiblionumber($bibnum);
2358
    foreach my $order (@orders) {
2359
        $unitprice = $order->{'unitprice'};
2360
        $replacementprice = $order->{'replacementprice'};
2361
    }
2362
2356
    my $branch_limit = C4::Context->userenv ? C4::Context->userenv->{"branch"} : "";
2363
    my $branch_limit = C4::Context->userenv ? C4::Context->userenv->{"branch"} : "";
2357
    my $query = qq{
2364
    my $query = qq{
2358
        SELECT authorised_value,lib FROM authorised_values
2365
        SELECT authorised_value,lib FROM authorised_values
Lines 2422-2428 sub PrepareItemrecordDisplay { Link Here
2422
                        $defaultvalue = $defaultvalues->{callnumber};
2429
                        $defaultvalue = $defaultvalues->{callnumber};
2423
                    }
2430
                    }
2424
                }
2431
                }
2425
                if (   ( $tagslib->{$tag}->{$subfield}->{kohafield} eq 'items.holdingbranch' || $tagslib->{$tag}->{$subfield}->{kohafield} eq 'items.homebranch' )
2432
2433
                       if (   ( $tagslib->{$tag}->{$subfield}->{kohafield} eq 'items.holdingbranch' || $tagslib->{$tag}->{$subfield}->{kohafield} eq 'items.homebranch' )
2426
                    && $defaultvalues
2434
                    && $defaultvalues
2427
                    && $defaultvalues->{'branchcode'} ) {
2435
                    && $defaultvalues->{'branchcode'} ) {
2428
                    if ( $itemrecord and $defaultvalues and not $itemrecord->subfield($tag,$subfield) ) {
2436
                    if ( $itemrecord and $defaultvalues and not $itemrecord->subfield($tag,$subfield) ) {
Lines 2441-2446 sub PrepareItemrecordDisplay { Link Here
2441
                        $defaultvalue = $defaultvalues->{location};
2449
                        $defaultvalue = $defaultvalues->{location};
2442
                    }
2450
                    }
2443
                }
2451
                }
2452
                if ( $unitprice && $tagslib->{$tag}->{$subfield}->{kohafield} eq 'items.price' ) {
2453
                    $defaultvalue = $unitprice;
2454
                }
2455
                if ( $replacementprice && $tagslib->{$tag}->{$subfield}->{kohafield} eq 'items.replacementprice' ) {
2456
                    $defaultvalue = $replacementprice;
2457
                }
2458
                if (  $tagslib->{$tag}->{$subfield}->{kohafield} eq 'items.dateaccessioned' ) {
2459
                    my $date = DateTime->now;
2460
                    $date = $date->ymd;
2461
                    $defaultvalue = $date;
2462
                }
2444
                if ( $tagslib->{$tag}->{$subfield}->{authorised_value} ) {
2463
                if ( $tagslib->{$tag}->{$subfield}->{authorised_value} ) {
2445
                    my @authorised_values;
2464
                    my @authorised_values;
2446
                    my %authorised_lib;
2465
                    my %authorised_lib;
Lines 2503-2508 sub PrepareItemrecordDisplay { Link Here
2503
2522
2504
                        $defaultvalue = $default_source;
2523
                        $defaultvalue = $default_source;
2505
2524
2525
                        #---- collection code CCODE
2526
                    } elsif ( $tagslib->{$tag}->{$subfield}->{authorised_value} eq "CCODE") {
2527
                        $authorised_values_sth->execute(
2528
                           $tagslib->{$tag}->{$subfield}->{authorised_value},
2529
                           $branch_limit ? $branch_limit : ()
2530
                        );
2531
                        push @authorised_values, ""
2532
                        unless ( $tagslib->{$tag}->{$subfield}->{mandatory} );
2533
                        while ( my ( $value, $lib ) = $authorised_values_sth->fetchrow_array ) {
2534
                            push @authorised_values, $value;
2535
                            $authorised_lib{$value} = $lib;
2536
                        }
2537
2538
                        # Set the default CCODE to what was set in subscription.ccode
2539
                        if ($itemrecord and $defaultvalues) {
2540
                            $defaultvalue = $defaultvalues->{'ccode'};
2541
                        } elsif (!$itemrecord and $defaultvalues) {
2542
                            $defaultvalue = $defaultvalues->{'ccode'};
2543
                        }
2544
2506
                        #---- "true" authorised value
2545
                        #---- "true" authorised value
2507
                    } else {
2546
                    } else {
2508
                        $authorised_values_sth->execute(
2547
                        $authorised_values_sth->execute(
Lines 2516-2521 sub PrepareItemrecordDisplay { Link Here
2516
                            $authorised_lib{$value} = $lib;
2555
                            $authorised_lib{$value} = $lib;
2517
                        }
2556
                        }
2518
                    }
2557
                    }
2558
2519
                    $subfield_data{marc_value} = {
2559
                    $subfield_data{marc_value} = {
2520
                        type    => 'select',
2560
                        type    => 'select',
2521
                        values  => \@authorised_values,
2561
                        values  => \@authorised_values,
Lines 2534-2539 sub PrepareItemrecordDisplay { Link Here
2534
                    if ( $itemrecord and my $field = $itemrecord->field($tag) ) {
2574
                    if ( $itemrecord and my $field = $itemrecord->field($tag) ) {
2535
                        $defaultvalue = $field->subfield($subfield);
2575
                        $defaultvalue = $field->subfield($subfield);
2536
                    }
2576
                    }
2577
2537
                    if( !$plugin->errstr ) {
2578
                    if( !$plugin->errstr ) {
2538
                        #TODO Move html to template; see report 12176/13397
2579
                        #TODO Move html to template; see report 12176/13397
2539
                        my $tab= $plugin->noclick? '-1': '';
2580
                        my $tab= $plugin->noclick? '-1': '';
(-)a/C4/Serials.pm (-5 / +6 lines)
Lines 1301-1307 sub ModSubscription { Link Here
1301
    $biblionumber, $callnumber, $notes, $letter, $manualhistory,
1301
    $biblionumber, $callnumber, $notes, $letter, $manualhistory,
1302
    $internalnotes, $serialsadditems, $staffdisplaycount, $opacdisplaycount,
1302
    $internalnotes, $serialsadditems, $staffdisplaycount, $opacdisplaycount,
1303
    $graceperiod, $location, $enddate, $subscriptionid, $skip_serialseq,
1303
    $graceperiod, $location, $enddate, $subscriptionid, $skip_serialseq,
1304
    $itemtype, $previousitemtype, $mana_id
1304
    $itemtype, $previousitemtype, $mana_id, $ccode
1305
    ) = @_;
1305
    ) = @_;
1306
1306
1307
    my $dbh   = C4::Context->dbh;
1307
    my $dbh   = C4::Context->dbh;
Lines 1314-1320 sub ModSubscription { Link Here
1314
            callnumber=?, notes=?, letter=?, manualhistory=?,
1314
            callnumber=?, notes=?, letter=?, manualhistory=?,
1315
            internalnotes=?, serialsadditems=?, staffdisplaycount=?,
1315
            internalnotes=?, serialsadditems=?, staffdisplaycount=?,
1316
            opacdisplaycount=?, graceperiod=?, location = ?, enddate=?,
1316
            opacdisplaycount=?, graceperiod=?, location = ?, enddate=?,
1317
            skip_serialseq=?, itemtype=?, previousitemtype=?, mana_id=?
1317
            skip_serialseq=?, itemtype=?, previousitemtype=?, mana_id=?, ccode=?
1318
        WHERE subscriptionid = ?";
1318
        WHERE subscriptionid = ?";
1319
1319
1320
    my $sth = $dbh->prepare($query);
1320
    my $sth = $dbh->prepare($query);
Lines 1328-1334 sub ModSubscription { Link Here
1328
        $letter,          ($manualhistory ? $manualhistory : 0),
1328
        $letter,          ($manualhistory ? $manualhistory : 0),
1329
        $internalnotes, $serialsadditems, $staffdisplaycount, $opacdisplaycount,
1329
        $internalnotes, $serialsadditems, $staffdisplaycount, $opacdisplaycount,
1330
        $graceperiod,     $location,       $enddate,        $skip_serialseq,
1330
        $graceperiod,     $location,       $enddate,        $skip_serialseq,
1331
        $itemtype,        $previousitemtype, $mana_id,
1331
        $itemtype,        $previousitemtype, $mana_id, $ccode,
1332
        $subscriptionid
1332
        $subscriptionid
1333
    );
1333
    );
1334
    my $rows = $sth->rows;
1334
    my $rows = $sth->rows;
Lines 1345-1351 $subscriptionid = &NewSubscription($auser,branchcode,$aqbooksellerid,$cost,$aqbu Link Here
1345
    $status, $notes, $letter, $firstacquidate, $irregularity, $numberpattern,
1345
    $status, $notes, $letter, $firstacquidate, $irregularity, $numberpattern,
1346
    $locale, $callnumber, $manualhistory, $internalnotes, $serialsadditems,
1346
    $locale, $callnumber, $manualhistory, $internalnotes, $serialsadditems,
1347
    $staffdisplaycount, $opacdisplaycount, $graceperiod, $location, $enddate,
1347
    $staffdisplaycount, $opacdisplaycount, $graceperiod, $location, $enddate,
1348
    $skip_serialseq, $itemtype, $previousitemtype);
1348
    $skip_serialseq, $itemtype, $previousitemtype, $mana_id, $ccode);
1349
1349
1350
Create a new subscription with value given on input args.
1350
Create a new subscription with value given on input args.
1351
1351
Lines 1362-1368 sub NewSubscription { Link Here
1362
    $innerloop3, $status, $notes, $letter, $firstacquidate, $irregularity,
1362
    $innerloop3, $status, $notes, $letter, $firstacquidate, $irregularity,
1363
    $numberpattern, $locale, $callnumber, $manualhistory, $internalnotes,
1363
    $numberpattern, $locale, $callnumber, $manualhistory, $internalnotes,
1364
    $serialsadditems, $staffdisplaycount, $opacdisplaycount, $graceperiod,
1364
    $serialsadditems, $staffdisplaycount, $opacdisplaycount, $graceperiod,
1365
    $location, $enddate, $skip_serialseq, $itemtype, $previousitemtype, $mana_id
1365
    $location, $enddate, $skip_serialseq, $itemtype, $previousitemtype, $mana_id, $ccode
1366
    ) = @_;
1366
    ) = @_;
1367
    my $dbh = C4::Context->dbh;
1367
    my $dbh = C4::Context->dbh;
1368
1368
Lines 1405-1410 sub NewSubscription { Link Here
1405
            itemtype          => $itemtype,
1405
            itemtype          => $itemtype,
1406
            previousitemtype  => $previousitemtype,
1406
            previousitemtype  => $previousitemtype,
1407
            mana_id           => $mana_id,
1407
            mana_id           => $mana_id,
1408
            ccode             => $ccode,
1408
        }
1409
        }
1409
    )->store;
1410
    )->store;
1410
    $subscription->discard_changes;
1411
    $subscription->discard_changes;
(-)a/Koha/Schema/Result/Subscription.pm (-2 / +10 lines)
Lines 276-281 __PACKAGE__->table("subscription"); Link Here
276
  data_type: 'integer'
276
  data_type: 'integer'
277
  is_nullable: 1
277
  is_nullable: 1
278
278
279
=head2 ccode
280
281
  data_type: 'varchar'
282
  is_nullable: 1
283
  size: 80
284
279
=cut
285
=cut
280
286
281
__PACKAGE__->add_columns(
287
__PACKAGE__->add_columns(
Lines 365-370 __PACKAGE__->add_columns( Link Here
365
  { data_type => "varchar", is_nullable => 1, size => 10 },
371
  { data_type => "varchar", is_nullable => 1, size => 10 },
366
  "mana_id",
372
  "mana_id",
367
  { data_type => "integer", is_nullable => 1 },
373
  { data_type => "integer", is_nullable => 1 },
374
  "ccode",
375
  { data_type => "varchar", is_nullable => 1, size => 80 },
368
);
376
);
369
377
370
=head1 PRIMARY KEY
378
=head1 PRIMARY KEY
Lines 452-459 __PACKAGE__->has_many( Link Here
452
);
460
);
453
461
454
462
455
# Created by DBIx::Class::Schema::Loader v0.07046 @ 2019-01-23 12:56:39
463
# Created by DBIx::Class::Schema::Loader v0.07042 @ 2019-07-21 22:34:06
456
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:dTb/JOO3KQ3NZGypFbRiEw
464
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:TS3fIO7Y11bAkj73Ak8ouA
457
465
458
__PACKAGE__->has_many(
466
__PACKAGE__->has_many(
459
  "additional_field_values",
467
  "additional_field_values",
(-)a/installer/data/mysql/atomicupdate/bug_23352-add_DefaultToCreatingSerialIssuesOnReceival_syspref.sql (+1 lines)
Line 0 Link Here
1
INSERT IGNORE INTO systempreferences (`variable`, `value`, `options`, `explanation`, `type`) VALUES ('DefaultToCreatingSerialIssuesOnReceival', 0, NULL, "If enabled the 'Create an item record when receiving this serial' checkbox will be checked by default", "YesNo");
(-)a/installer/data/mysql/atomicupdate/bug_23352-add_ccode_column_to_subscriptions_table.perl (+7 lines)
Line 0 Link Here
1
2
unless ( column_exists('subscription', 'ccode')) {
3
    $dbh->do(q{
4
        ALTER TABLE `subscription`
5
        ADD `ccode` varchar (80) default NULL AFTER `mana_id`
6
    });
7
}
(-)a/installer/data/mysql/kohastructure.sql (+1 lines)
Lines 2021-2026 CREATE TABLE `subscription` ( -- information related to the subscription Link Here
2021
  `itemtype` VARCHAR( 10 ) NULL,
2021
  `itemtype` VARCHAR( 10 ) NULL,
2022
  `previousitemtype` VARCHAR( 10 ) NULL,
2022
  `previousitemtype` VARCHAR( 10 ) NULL,
2023
  `mana_id` int(11) NULL DEFAULT NULL,
2023
  `mana_id` int(11) NULL DEFAULT NULL,
2024
  `ccode` varchar(80) DEFAULT NULL, -- authorized value for the collection code associated with this item (MARC21 952$8)
2024
  PRIMARY KEY  (`subscriptionid`),
2025
  PRIMARY KEY  (`subscriptionid`),
2025
  KEY `by_biblionumber` (`biblionumber`),
2026
  KEY `by_biblionumber` (`biblionumber`),
2026
  CONSTRAINT subscription_ibfk_1 FOREIGN KEY (periodicity) REFERENCES subscription_frequencies (id) ON DELETE SET NULL ON UPDATE CASCADE,
2027
  CONSTRAINT subscription_ibfk_1 FOREIGN KEY (periodicity) REFERENCES subscription_frequencies (id) ON DELETE SET NULL ON UPDATE CASCADE,
(-)a/installer/data/mysql/sysprefs.sql (+1 lines)
Lines 143-148 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
143
('DefaultPatronSearchFields',    'surname,firstname,othernames,cardnumber,userid',NULL,'Comma separated list defining the default fields to be used during a patron search','free'),
143
('DefaultPatronSearchFields',    'surname,firstname,othernames,cardnumber,userid',NULL,'Comma separated list defining the default fields to be used during a patron search','free'),
144
('defaultSortField','relevance','relevance|popularity|call_number|pubdate|acqdate|title|author','Specify the default field used for sorting','Choice'),
144
('defaultSortField','relevance','relevance|popularity|call_number|pubdate|acqdate|title|author','Specify the default field used for sorting','Choice'),
145
('defaultSortOrder','dsc','asc|dsc|az|za','Specify the default sort order','Choice'),
145
('defaultSortOrder','dsc','asc|dsc|az|za','Specify the default sort order','Choice'),
146
('DefaultToCreatingSerialIssuesOnReceival', 0, NULL, "If enabled the 'Create an item record when receiving this serial' checkbox will be checked by default", "YesNo"),
146
('DefaultToLoggedInLibraryCircRules',  '0', NULL ,  'If enabled, circ rules editor will default to the logged in library''s rules, rather than the ''all libraries'' rules.',  'YesNo'),
147
('DefaultToLoggedInLibraryCircRules',  '0', NULL ,  'If enabled, circ rules editor will default to the logged in library''s rules, rather than the ''all libraries'' rules.',  'YesNo'),
147
('DefaultToLoggedInLibraryNoticesSlips',  '0', NULL ,  'If enabled,slips and notices editor will default to the logged in library''s rules, rather than the ''all libraries'' rules.',  'YesNo'),
148
('DefaultToLoggedInLibraryNoticesSlips',  '0', NULL ,  'If enabled,slips and notices editor will default to the logged in library''s rules, rather than the ''all libraries'' rules.',  'YesNo'),
148
('DefaultToLoggedInLibraryOverdueTriggers',  '0', NULL ,  'If enabled, overdue status triggers editor will default to the logged in library''s rules, rather than the ''default'' rules.',  'YesNo'),
149
('DefaultToLoggedInLibraryOverdueTriggers',  '0', NULL ,  'If enabled, overdue status triggers editor will default to the logged in library''s rules, rather than the ''default'' rules.',  'YesNo'),
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/serials.pref (+6 lines)
Lines 56-58 Serials: Link Here
56
            yes: Make
56
            yes: Make
57
            no: Do not make
57
            no: Do not make
58
        - previous serial automatically available when receiving a new serial issue. The previous issue can also be set to another item type when receiving a new one. Please note that the item-level_itypes syspref must be set to specific item.
58
        - previous serial automatically available when receiving a new serial issue. The previous issue can also be set to another item type when receiving a new one. Please note that the item-level_itypes syspref must be set to specific item.
59
    -
60
        - pref: DefaultToCreatingSerialIssuesOnReceival
61
          choices:
62
            yes: Enable
63
            no: Disable
64
        - If enabled the 'Create an item record when receiving this serial' checkbox in serials/subscription-add.pl will be ticked by default
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-add.tt (-2 / +25 lines)
Lines 78-85 fieldset.rows table { clear: none; margin: 0; } Link Here
78
                                        <p><input type="radio" id="serialsadditems-yes" name="serialsadditems" value="1" checked="checked" /><label class="widelabel" for="serialsadditems-yes"> Create an item record when receiving this serial</label></p>
78
                                        <p><input type="radio" id="serialsadditems-yes" name="serialsadditems" value="1" checked="checked" /><label class="widelabel" for="serialsadditems-yes"> Create an item record when receiving this serial</label></p>
79
                                        <p><input type="radio" id="serialsadditems-no" name="serialsadditems" value="0" /><label class="widelabel" for="serialsadditems-no"> Do not create an item record when receiving this serial </label></p>
79
                                        <p><input type="radio" id="serialsadditems-no" name="serialsadditems" value="0" /><label class="widelabel" for="serialsadditems-no"> Do not create an item record when receiving this serial </label></p>
80
                                    [% ELSE %]
80
                                    [% ELSE %]
81
                                        <p><input type="radio" id="serialsadditems-yes" name="serialsadditems" value="1"/><label class="widelabel" for="serialsadditems-yes"> Create an item record when receiving this serial</label></p>
81
                                        [% IF Koha.Preference('DefaultToCreatingSerialIssuesOnReceival') %]
82
                                        <p><input type="radio" id="serialsadditems-no" name="serialsadditems" value="0" checked="checked" /><label class="widelabel" for="serialsadditems-no"> Do not create an item record when receiving this serial</label></p>
82
                                            <p><input type="radio" id="serialsadditems-yes" name="serialsadditems" value="1" checked="checked"/><label class="widelabel" for="serialsadditems-yes"> Create an item record when receiving this serial</label></p>
83
                                            <p><input type="radio" id="serialsadditems-no" name="serialsadditems" value="0" /><label class="widelabel" for="serialsadditems-no"> Do not create an item record when receiving this serial</label></p>
84
                                        [% ELSE %]
85
                                            <p><input type="radio" id="serialsadditems-yes" name="serialsadditems" value="1"/><label class="widelabel" for="serialsadditems-yes"> Create an item record when receiving this serial</label></p>
86
                                            <p><input type="radio" id="serialsadditems-no" name="serialsadditems" value="0" checked="checked" /><label class="widelabel" for="serialsadditems-no"> Do not create an item record when receiving this serial</label></p>
87
                                        [% END %]
83
                                    [% END %]
88
                                    [% END %]
84
                                </li>
89
                                </li>
85
                                <li class="radio">
90
                                <li class="radio">
Lines 319-324 fieldset.rows table { clear: none; margin: 0; } Link Here
319
                                        </select>
324
                                        </select>
320
                                        <span class="required">Required</span>
325
                                        <span class="required">Required</span>
321
                                    </li>
326
                                    </li>
327
                                    <ul>
328
                                        <li>
329
                                            <label for="ccode" class="required">Serial issue Collection code:</label>
330
                                            <select name="ccode" id="ccode">
331
                                                [% FOREACH ccode_value IN ccode_loop %]
332
                                                   [% IF (ccode_value.selected) %]
333
                                                        <option value="[% ccode_value.authorised_value | html %]" selected="selected">
334
                                                    [% ELSE %]
335
                                                        <option value="[% ccode_value.authorised_value | html %]">
336
                                                    [% END %]
337
                                                        [% ccode_value.lib | html %]
338
                                                        </option>
339
                                                [% END %]
340
                                            </select>
341
                                            <span class="required">Required</span>
342
                                        </li>
343
344
                                    </ul>
322
                                    <li>
345
                                    <li>
323
                                        <label for="locale">Locale:</label>
346
                                        <label for="locale">Locale:</label>
324
                                        <select id="locale" name="locale">
347
                                        <select id="locale" name="locale">
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-detail.tt (-6 / +6 lines)
Lines 73-83 Link Here
73
    <li><a href="#subscription_planning">Planning</a></li>
73
    <li><a href="#subscription_planning">Planning</a></li>
74
    <li><a href="#subscription_issues">Issues</a></li>
74
    <li><a href="#subscription_issues">Issues</a></li>
75
    <li><a href="#subscription_summary">Summary</a></li>
75
    <li><a href="#subscription_summary">Summary</a></li>
76
    [% IF orders_grouped.size %]
76
    <li><a href="#acquisition_details">Acquisition details</a></li>
77
        <li>
78
            <a href="#acquisition_details">Acquisition details</a>
79
        </li>
80
    [% END %]
81
</ul>
77
</ul>
82
78
83
<div id="subscription_info">
79
<div id="subscription_info">
Lines 451-458 Link Here
451
                </tbody>
447
                </tbody>
452
            </table>
448
            </table>
453
          </div>
449
          </div>
450
      [% ELSE %]
451
          <div id="acquisition_details">
452
            <h2>Acquisition details</h2>
453
            Create an order for the new subscription: <a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions Home Page</a>
454
          </div>
454
      [% END %]
455
      [% END %]
455
456
            </main>
456
            </main>
457
        </div> <!-- /.col-sm-10.col-sm-push-2 -->
457
        </div> <!-- /.col-sm-10.col-sm-push-2 -->
458
458
(-)a/serials/subscription-add.pl (-3 / +7 lines)
Lines 139-147 if ($op eq 'modify' || $op eq 'dup' || $op eq 'modsubscription') { Link Here
139
139
140
my $locations_loop = GetAuthorisedValues("LOC");
140
my $locations_loop = GetAuthorisedValues("LOC");
141
141
142
my $ccode_loop = GetAuthorisedValues("CCODE");
143
142
$template->param(
144
$template->param(
143
    branchcode => $subs->{branchcode},
145
    branchcode => $subs->{branchcode},
144
    locations_loop=>$locations_loop,
146
    locations_loop=>$locations_loop,
147
    ccode_loop => $ccode_loop,
145
);
148
);
146
149
147
my @additional_fields = Koha::AdditionalFields->search({ tablename => 'subscription' });
150
my @additional_fields = Koha::AdditionalFields->search({ tablename => 'subscription' });
Lines 349-354 sub redirect_add_subscription { Link Here
349
    my $itemtype          = $query->param('itemtype');
352
    my $itemtype          = $query->param('itemtype');
350
    my $previousitemtype  = $query->param('previousitemtype');
353
    my $previousitemtype  = $query->param('previousitemtype');
351
    my $skip_serialseq    = $query->param('skip_serialseq');
354
    my $skip_serialseq    = $query->param('skip_serialseq');
355
    my $ccode             = $query->param('ccode');
352
356
353
    my $mana_id;
357
    my $mana_id;
354
    if ( $query->param('mana_id') ne "" ) {
358
    if ( $query->param('mana_id') ne "" ) {
Lines 375-381 sub redirect_add_subscription { Link Here
375
        join(";",@irregularity), $numberpattern, $locale, $callnumber,
379
        join(";",@irregularity), $numberpattern, $locale, $callnumber,
376
        $manualhistory, $internalnotes, $serialsadditems,
380
        $manualhistory, $internalnotes, $serialsadditems,
377
        $staffdisplaycount, $opacdisplaycount, $graceperiod, $location, $enddate,
381
        $staffdisplaycount, $opacdisplaycount, $graceperiod, $location, $enddate,
378
        $skip_serialseq, $itemtype, $previousitemtype, $mana_id
382
        $skip_serialseq, $itemtype, $previousitemtype, $mana_id, $ccode
379
    );
383
    );
380
    if ( (C4::Context->preference('Mana') == 1) and ( grep { $_ eq "subscription" } split(/,/, C4::Context->preference('AutoShareWithMana'))) ){
384
    if ( (C4::Context->preference('Mana') == 1) and ( grep { $_ eq "subscription" } split(/,/, C4::Context->preference('AutoShareWithMana'))) ){
381
        my $result = Koha::SharedContent::send_entity( $query->param('mana_language') || '', $loggedinuser, $subscriptionid, 'subscription');
385
        my $result = Koha::SharedContent::send_entity( $query->param('mana_language') || '', $loggedinuser, $subscriptionid, 'subscription');
Lines 463-468 sub redirect_mod_subscription { Link Here
463
    my $itemtype          = $query->param('itemtype');
467
    my $itemtype          = $query->param('itemtype');
464
    my $previousitemtype  = $query->param('previousitemtype');
468
    my $previousitemtype  = $query->param('previousitemtype');
465
    my $skip_serialseq    = $query->param('skip_serialseq');
469
    my $skip_serialseq    = $query->param('skip_serialseq');
470
    my $ccode             = $query->param('ccode');
466
471
467
    my $mana_id;
472
    my $mana_id;
468
    if ( $query->param('mana_id') ne "" ) {
473
    if ( $query->param('mana_id') ne "" ) {
Lines 498-504 sub redirect_mod_subscription { Link Here
498
        $status, $biblionumber, $callnumber, $notes, $letter,
503
        $status, $biblionumber, $callnumber, $notes, $letter,
499
        $manualhistory, $internalnotes, $serialsadditems, $staffdisplaycount,
504
        $manualhistory, $internalnotes, $serialsadditems, $staffdisplaycount,
500
        $opacdisplaycount, $graceperiod, $location, $enddate, $subscriptionid,
505
        $opacdisplaycount, $graceperiod, $location, $enddate, $subscriptionid,
501
        $skip_serialseq, $itemtype, $previousitemtype, $mana_id
506
        $skip_serialseq, $itemtype, $previousitemtype, $mana_id, $ccode
502
    );
507
    );
503
508
504
    my @additional_fields;
509
    my @additional_fields;
505
- 

Return to bug 23352