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

(-)a/C4/Items.pm (-2 / +56 lines)
Lines 56-61 use Koha::DateUtils; Link Here
56
use MARC::Record;
56
use MARC::Record;
57
use C4::ClassSource;
57
use C4::ClassSource;
58
use C4::Log;
58
use C4::Log;
59
use C4::Serials;
60
use C4::Acquisition;
59
use List::MoreUtils qw(any);
61
use List::MoreUtils qw(any);
60
use YAML qw(Load);
62
use YAML qw(Load);
61
use DateTime::Format::MySQL;
63
use DateTime::Format::MySQL;
Lines 665-670 sub GetItemsInfo { Link Here
665
           borrowers.surname,
667
           borrowers.surname,
666
           borrowers.firstname,
668
           borrowers.firstname,
667
           borrowers.branchcode as bcode,
669
           borrowers.branchcode as bcode,
670
           serial.serialid,
668
           serial.serialseq,
671
           serial.serialseq,
669
           serial.publisheddate,
672
           serial.publisheddate,
670
           itemtypes.description,
673
           itemtypes.description,
Lines 1363-1369 sub _SearchItems_build_where_fragment { Link Here
1363
1366
1364
    my ($items, $total) = SearchItems($filter, $params);
1367
    my ($items, $total) = SearchItems($filter, $params);
1365
1368
1366
Perform a search among items
1369
Perform ubscriptionCurrentlyOnOrder search among items
1367
1370
1368
$filter is a reference to a hash which can be a filter, or a combination of filters.
1371
$filter is a reference to a hash which can be a filter, or a combination of filters.
1369
1372
Lines 1542-1547 sub PrepareItemrecordDisplay { Link Here
1542
    }
1545
    }
1543
    my @loop_data;
1546
    my @loop_data;
1544
1547
1548
    #Get the default items.price and items.replacementprice from the aqorder that the serial has been ordered in.
1549
    my $unitprice;
1550
    my $replacementprice;
1551
    my $subscriptionid = $defaultvalues->{'subscriptionid'};
1552
    my $lastOrder;
1553
1554
    #If the subscription is on order (i.e. aqorders.datereceived is NULL then call GetLastOrderNotReceviedFromSubscription() which
1555
    #retrieves the last order for the subscriptionid with a datereceived also equalling NULL
1556
    if ( subscriptionCurrentlyOnOrder($subscriptionid) ) {
1557
        $lastOrder = GetLastOrderNotReceivedFromSubscriptionid( $subscriptionid );
1558
    } else { #Otherwise the subscription has already arrived so retrieve the last order for the subscriptionid where datereceived is not null
1559
        $lastOrder = GetLastOrderReceivedFromSubscriptionid( $subscriptionid );
1560
    }
1561
1545
    my $branch_limit = C4::Context->userenv ? C4::Context->userenv->{"branch"} : "";
1562
    my $branch_limit = C4::Context->userenv ? C4::Context->userenv->{"branch"} : "";
1546
    my $query = qq{
1563
    my $query = qq{
1547
        SELECT authorised_value,lib FROM authorised_values
1564
        SELECT authorised_value,lib FROM authorised_values
Lines 1613-1619 sub PrepareItemrecordDisplay { Link Here
1613
                        $defaultvalue = $defaultvalues->{callnumber};
1630
                        $defaultvalue = $defaultvalues->{callnumber};
1614
                    }
1631
                    }
1615
                }
1632
                }
1616
                if (   ( $tagslib->{$tag}->{$subfield}->{kohafield} eq 'items.holdingbranch' || $tagslib->{$tag}->{$subfield}->{kohafield} eq 'items.homebranch' )
1633
1634
                       if (   ( $tagslib->{$tag}->{$subfield}->{kohafield} eq 'items.holdingbranch' || $tagslib->{$tag}->{$subfield}->{kohafield} eq 'items.homebranch' )
1617
                    && $defaultvalues
1635
                    && $defaultvalues
1618
                    && $defaultvalues->{'branchcode'} ) {
1636
                    && $defaultvalues->{'branchcode'} ) {
1619
                    if ( $itemrecord and $defaultvalues and not $itemrecord->subfield($tag,$subfield) ) {
1637
                    if ( $itemrecord and $defaultvalues and not $itemrecord->subfield($tag,$subfield) ) {
Lines 1632-1637 sub PrepareItemrecordDisplay { Link Here
1632
                        $defaultvalue = $defaultvalues->{location};
1650
                        $defaultvalue = $defaultvalues->{location};
1633
                    }
1651
                    }
1634
                }
1652
                }
1653
                #Set the default items.price from the aqorders.unitprice
1654
                if ( $lastOrder->{unitprice} && $tagslib->{$tag}->{$subfield}->{kohafield} eq 'items.price' ) {
1655
                    $defaultvalue = $lastOrder->{unitprice};
1656
                }
1657
                #Set the default items.replacementprice from the aqorders.replacementprice
1658
                if ( $lastOrder->{replacementprice} && $tagslib->{$tag}->{$subfield}->{kohafield} eq 'items.replacementprice' ) {
1659
                    $defaultvalue = $lastOrder->{replacementprice};
1660
                }
1661
                #Set dateaccessioned to current date automatically so the librarian doesnt have to click in the input form to load dateaccessioned
1662
                if ( C4::Context->preference('PopulateNewItemDateAccessionedOnPageLoad') && $tagslib->{$tag}->{$subfield}->{kohafield} eq 'items.dateaccessioned' ) {
1663
                    my $date = DateTime->now;
1664
                    $date = $date->ymd;
1665
                    $defaultvalue = $date;
1666
                }
1635
                if ( $tagslib->{$tag}->{$subfield}->{authorised_value} ) {
1667
                if ( $tagslib->{$tag}->{$subfield}->{authorised_value} ) {
1636
                    my @authorised_values;
1668
                    my @authorised_values;
1637
                    my %authorised_lib;
1669
                    my %authorised_lib;
Lines 1694-1699 sub PrepareItemrecordDisplay { Link Here
1694
1726
1695
                        $defaultvalue = $default_source;
1727
                        $defaultvalue = $default_source;
1696
1728
1729
                        #---- collection code CCODE
1730
                    } elsif ( $tagslib->{$tag}->{$subfield}->{authorised_value} eq "CCODE") {
1731
                        $authorised_values_sth->execute(
1732
                           $tagslib->{$tag}->{$subfield}->{authorised_value},
1733
                           $branch_limit ? $branch_limit : ()
1734
                        );
1735
                        push @authorised_values, ""
1736
                        unless ( $tagslib->{$tag}->{$subfield}->{mandatory} );
1737
                        while ( my ( $value, $lib ) = $authorised_values_sth->fetchrow_array ) {
1738
                            push @authorised_values, $value;
1739
                            $authorised_lib{$value} = $lib;
1740
                        }
1741
1742
                        # Set the default CCODE to what was set in subscription.ccode
1743
                        if ($itemrecord and $defaultvalues) {
1744
                            $defaultvalue = $defaultvalues->{'ccode'};
1745
                        } elsif (!$itemrecord and $defaultvalues) {
1746
                            $defaultvalue = $defaultvalues->{'ccode'};
1747
                        }
1748
1697
                        #---- "true" authorised value
1749
                        #---- "true" authorised value
1698
                    } else {
1750
                    } else {
1699
                        $authorised_values_sth->execute(
1751
                        $authorised_values_sth->execute(
Lines 1707-1712 sub PrepareItemrecordDisplay { Link Here
1707
                            $authorised_lib{$value} = $lib;
1759
                            $authorised_lib{$value} = $lib;
1708
                        }
1760
                        }
1709
                    }
1761
                    }
1762
1710
                    $subfield_data{marc_value} = {
1763
                    $subfield_data{marc_value} = {
1711
                        type    => 'select',
1764
                        type    => 'select',
1712
                        values  => \@authorised_values,
1765
                        values  => \@authorised_values,
Lines 1725-1730 sub PrepareItemrecordDisplay { Link Here
1725
                    if ( $itemrecord and my $field = $itemrecord->field($tag) ) {
1778
                    if ( $itemrecord and my $field = $itemrecord->field($tag) ) {
1726
                        $defaultvalue = $field->subfield($subfield) || q{};
1779
                        $defaultvalue = $field->subfield($subfield) || q{};
1727
                    }
1780
                    }
1781
1728
                    if( !$plugin->errstr ) {
1782
                    if( !$plugin->errstr ) {
1729
                        #TODO Move html to template; see report 12176/13397
1783
                        #TODO Move html to template; see report 12176/13397
1730
                        my $tab= $plugin->noclick? '-1': '';
1784
                        my $tab= $plugin->noclick? '-1': '';
(-)a/C4/Serials.pm (-3 / +5 lines)
Lines 1302-1308 sub ModSubscription { Link Here
1302
    $biblionumber, $callnumber, $notes, $letter, $manualhistory,
1302
    $biblionumber, $callnumber, $notes, $letter, $manualhistory,
1303
    $internalnotes, $serialsadditems, $staffdisplaycount, $opacdisplaycount,
1303
    $internalnotes, $serialsadditems, $staffdisplaycount, $opacdisplaycount,
1304
    $graceperiod, $location, $enddate, $subscriptionid, $skip_serialseq,
1304
    $graceperiod, $location, $enddate, $subscriptionid, $skip_serialseq,
1305
    $itemtype, $previousitemtype, $mana_id
1305
    $itemtype, $previousitemtype, $mana_id, $ccode
1306
    ) = @_;
1306
    ) = @_;
1307
1307
1308
    my $subscription = Koha::Subscriptions->find($subscriptionid);
1308
    my $subscription = Koha::Subscriptions->find($subscriptionid);
Lines 1345-1350 sub ModSubscription { Link Here
1345
            itemtype          => $itemtype,
1345
            itemtype          => $itemtype,
1346
            previousitemtype  => $previousitemtype,
1346
            previousitemtype  => $previousitemtype,
1347
            mana_id           => $mana_id,
1347
            mana_id           => $mana_id,
1348
            ccode             => $ccode,
1348
        }
1349
        }
1349
    )->store;
1350
    )->store;
1350
1351
Lines 1362-1368 $subscriptionid = &NewSubscription($auser,branchcode,$aqbooksellerid,$cost,$aqbu Link Here
1362
    $status, $notes, $letter, $firstacquidate, $irregularity, $numberpattern,
1363
    $status, $notes, $letter, $firstacquidate, $irregularity, $numberpattern,
1363
    $locale, $callnumber, $manualhistory, $internalnotes, $serialsadditems,
1364
    $locale, $callnumber, $manualhistory, $internalnotes, $serialsadditems,
1364
    $staffdisplaycount, $opacdisplaycount, $graceperiod, $location, $enddate,
1365
    $staffdisplaycount, $opacdisplaycount, $graceperiod, $location, $enddate,
1365
    $skip_serialseq, $itemtype, $previousitemtype);
1366
    $skip_serialseq, $itemtype, $previousitemtype, $mana_id, $ccode);
1366
1367
1367
Create a new subscription with value given on input args.
1368
Create a new subscription with value given on input args.
1368
1369
Lines 1379-1385 sub NewSubscription { Link Here
1379
    $innerloop3, $status, $notes, $letter, $firstacquidate, $irregularity,
1380
    $innerloop3, $status, $notes, $letter, $firstacquidate, $irregularity,
1380
    $numberpattern, $locale, $callnumber, $manualhistory, $internalnotes,
1381
    $numberpattern, $locale, $callnumber, $manualhistory, $internalnotes,
1381
    $serialsadditems, $staffdisplaycount, $opacdisplaycount, $graceperiod,
1382
    $serialsadditems, $staffdisplaycount, $opacdisplaycount, $graceperiod,
1382
    $location, $enddate, $skip_serialseq, $itemtype, $previousitemtype, $mana_id
1383
    $location, $enddate, $skip_serialseq, $itemtype, $previousitemtype, $mana_id, $ccode
1383
    ) = @_;
1384
    ) = @_;
1384
    my $dbh = C4::Context->dbh;
1385
    my $dbh = C4::Context->dbh;
1385
1386
Lines 1422-1427 sub NewSubscription { Link Here
1422
            itemtype          => $itemtype,
1423
            itemtype          => $itemtype,
1423
            previousitemtype  => $previousitemtype,
1424
            previousitemtype  => $previousitemtype,
1424
            mana_id           => $mana_id,
1425
            mana_id           => $mana_id,
1426
            ccode             => $ccode,
1425
        }
1427
        }
1426
    )->store;
1428
    )->store;
1427
    $subscription->discard_changes;
1429
    $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_PopulateNewItemDateAccessionedOnPageLoad_syspref.sql (+1 lines)
Line 0 Link Here
1
INSERT IGNORE INTO systempreferences (`variable`, `value`, `options`, `explanation`, `type`) VALUES ('PopulateNewItemDateAccessionedOnPageLoad', 0, NULL, "If enabled the 952$d Date Acquired will be populate on page load rather than requiring the user to click in the input field", "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 1998-2003 CREATE TABLE `subscription` ( -- information related to the subscription Link Here
1998
  `itemtype` VARCHAR( 10 ) NULL,
1998
  `itemtype` VARCHAR( 10 ) NULL,
1999
  `previousitemtype` VARCHAR( 10 ) NULL,
1999
  `previousitemtype` VARCHAR( 10 ) NULL,
2000
  `mana_id` int(11) NULL DEFAULT NULL,
2000
  `mana_id` int(11) NULL DEFAULT NULL,
2001
  `ccode` varchar(80) DEFAULT NULL, -- authorized value for the collection code associated with this item (MARC21 952$8)
2001
  PRIMARY KEY  (`subscriptionid`),
2002
  PRIMARY KEY  (`subscriptionid`),
2002
  KEY `by_biblionumber` (`biblionumber`),
2003
  KEY `by_biblionumber` (`biblionumber`),
2003
  CONSTRAINT subscription_ibfk_1 FOREIGN KEY (periodicity) REFERENCES subscription_frequencies (id) ON DELETE SET NULL ON UPDATE CASCADE,
2004
  CONSTRAINT subscription_ibfk_1 FOREIGN KEY (periodicity) REFERENCES subscription_frequencies (id) ON DELETE SET NULL ON UPDATE CASCADE,
(-)a/installer/data/mysql/sysprefs.sql (+2 lines)
Lines 153-158 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
153
('DefaultPatronSearchFields',    'surname,firstname,othernames,cardnumber,userid',NULL,'Comma separated list defining the default fields to be used during a patron search using the "standard" option. If empty Koha will default to "surname,firstname,othernames,cardnumber,userid". Additional fields added to this preference will be added as search options in the dropdown menu on the patron search page.','free'),
153
('DefaultPatronSearchFields',    'surname,firstname,othernames,cardnumber,userid',NULL,'Comma separated list defining the default fields to be used during a patron search using the "standard" option. If empty Koha will default to "surname,firstname,othernames,cardnumber,userid". Additional fields added to this preference will be added as search options in the dropdown menu on the patron search page.','free'),
154
('defaultSortField','relevance','relevance|popularity|call_number|pubdate|acqdate|title|author','Specify the default field used for sorting','Choice'),
154
('defaultSortField','relevance','relevance|popularity|call_number|pubdate|acqdate|title|author','Specify the default field used for sorting','Choice'),
155
('defaultSortOrder','dsc','asc|dsc|az|za','Specify the default sort order','Choice'),
155
('defaultSortOrder','dsc','asc|dsc|az|za','Specify the default sort order','Choice'),
156
('DefaultToCreatingSerialIssuesOnReceival', 0, NULL, "If enabled the 'Create an item record when receiving this serial' checkbox will be checked by default", "YesNo"),
156
('DefaultToLoggedInLibraryCircRules',  '0', NULL ,  'If enabled, circ rules editor will default to the logged in library''s rules, rather than the ''all libraries'' rules.',  'YesNo'),
157
('DefaultToLoggedInLibraryCircRules',  '0', NULL ,  'If enabled, circ rules editor will default to the logged in library''s rules, rather than the ''all libraries'' rules.',  'YesNo'),
157
('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'),
158
('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'),
158
('DefaultToLoggedInLibraryOverdueTriggers',  '0', NULL ,  'If enabled, overdue status triggers editor will default to the logged in library''s rules, rather than the ''default'' rules.',  'YesNo'),
159
('DefaultToLoggedInLibraryOverdueTriggers',  '0', NULL ,  'If enabled, overdue status triggers editor will default to the logged in library''s rules, rather than the ''default'' rules.',  'YesNo'),
Lines 499-504 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
499
('PayPalSandboxMode',  '1', NULL ,  'If enabled, the system will use PayPal''s sandbox server for testing, rather than the production server.',  'YesNo'),
500
('PayPalSandboxMode',  '1', NULL ,  'If enabled, the system will use PayPal''s sandbox server for testing, rather than the production server.',  'YesNo'),
500
('PayPalSignature',  '', NULL ,  'Your PayPal API signature',  'Free'),
501
('PayPalSignature',  '', NULL ,  'Your PayPal API signature',  'Free'),
501
('PayPalUser',  '', NULL ,  'Your PayPal API username ( email address )',  'Free'),
502
('PayPalUser',  '', NULL ,  'Your PayPal API username ( email address )',  'Free'),
503
('PopulateNewItemDateAccessionedOnPageLoad', 0, NULL, "If enabled the 952$d Date Acquired will be populate on page load rather than requiring the user to click in the input field", "YesNo"),
502
('PrefillItem','0','','When a new item is added, should it be prefilled with last created item values?','YesNo'),
504
('PrefillItem','0','','When a new item is added, should it be prefilled with last created item values?','YesNo'),
503
('PreserveSerialNotes','1','','When a new "Expected" issue is generated, should it be prefilled with last created issue notes?','YesNo'),
505
('PreserveSerialNotes','1','','When a new "Expected" issue is generated, should it be prefilled with last created issue notes?','YesNo'),
504
('previousIssuesDefaultSortOrder','asc','asc|desc','Specify the sort order of Previous Issues on the circulation page','Choice'),
506
('previousIssuesDefaultSortOrder','asc','asc|desc','Specify the sort order of Previous Issues on the circulation page','Choice'),
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/cataloguing.pref (-1 / +6 lines)
Lines 27-32 Cataloging: Link Here
27
            - the advanced cataloging editor.
27
            - the advanced cataloging editor.
28
            - "<br/> NOTE:"
28
            - "<br/> NOTE:"
29
            - Currently does not include support for UNIMARC or NORMARC fixed fields.
29
            - Currently does not include support for UNIMARC or NORMARC fixed fields.
30
        -
31
            - pref: PopulateNewItemDateAccessionedOnPageLoad
32
              choices:
33
                  yes: "Enable"
34
                  no: "Disable"
35
            - If enabled the 952$d Date Acquired will be populate on page load rather than requiring the user to click in the input field
30
    Spine Labels:
36
    Spine Labels:
31
        -
37
        -
32
            - When using the quick spine label printer,
38
            - When using the quick spine label printer,
Lines 46-52 Cataloging: Link Here
46
                  yes: Display
52
                  yes: Display
47
                  no:  "Don't display"
53
                  no:  "Don't display"
48
            - buttons on the bib details page to print item spine labels.
54
            - buttons on the bib details page to print item spine labels.
49
        -
50
    Record Structure:
55
    Record Structure:
51
        -
56
        -
52
            - Fill in the default language for field 008 Range 35-37 of MARC21 records (e.g. eng, nor, ger, see <a href="http://www.loc.gov/marc/languages/language_code.html">MARC Code List for Languages</a>)
57
            - Fill in the default language for field 008 Range 35-37 of MARC21 records (e.g. eng, nor, ger, see <a href="http://www.loc.gov/marc/languages/language_code.html">MARC Code List for Languages</a>)
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/serials.pref (+6 lines)
Lines 62-64 Serials: Link Here
62
            yes: Do
62
            yes: Do
63
            no: Do not
63
            no: Do not
64
        - prefill the notes from the last 'Arrived' serial when generating the next 'Expected' issue.
64
        - prefill the notes from the last 'Arrived' serial when generating the next 'Expected' issue.
65
    -
66
        - pref: DefaultToCreatingSerialIssuesOnReceival
67
          choices:
68
            yes: Enable
69
            no: Disable
70
        - 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 (-5 / +6 lines)
Lines 77-87 Link Here
77
                        <li><a href="#subscription_planning">Planning</a></li>
77
                        <li><a href="#subscription_planning">Planning</a></li>
78
                        <li><a href="#subscription_issues">Issues</a></li>
78
                        <li><a href="#subscription_issues">Issues</a></li>
79
                        <li><a href="#subscription_summary">Summary</a></li>
79
                        <li><a href="#subscription_summary">Summary</a></li>
80
                        [% IF orders_grouped.size %]
80
                        <li><a href="#acquisition_details">Acquisition details</a></li>
81
                            <li>
82
                                <a href="#acquisition_details">Acquisition details</a>
83
                            </li>
84
                        [% END %]
85
                    </ul>
81
                    </ul>
86
82
87
                    <div id="subscription_info">
83
                    <div id="subscription_info">
Lines 478-483 Link Here
478
                                </tbody>
474
                                </tbody>
479
                            </table> <!-- /#orders -->
475
                            </table> <!-- /#orders -->
480
                        </div> <!-- /#acquisition_details -->
476
                        </div> <!-- /#acquisition_details -->
477
                    [% ELSE %]
478
                        <div id="acquisition_details">
479
                            <h2>Acquisition details</h2>
480
                            Create an order for the new subscription: <a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions Home Page</a>
481
                        </div>
481
                    [% END # IF orders_grouped.size %]
482
                    [% END # IF orders_grouped.size %]
482
                </div> <!-- /#subscription_description -->
483
                </div> <!-- /#subscription_description -->
483
            </main>
484
            </main>
(-)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