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

(-)a/C4/Items.pm (-2 / +56 lines)
Lines 63-68 use Koha::DateUtils; Link Here
63
use MARC::Record;
63
use MARC::Record;
64
use C4::ClassSource;
64
use C4::ClassSource;
65
use C4::Log;
65
use C4::Log;
66
use C4::Serials;
67
use C4::Acquisition;
66
use List::MoreUtils qw(any);
68
use List::MoreUtils qw(any);
67
use YAML qw(Load);
69
use YAML qw(Load);
68
use DateTime::Format::MySQL;
70
use DateTime::Format::MySQL;
Lines 939-944 sub GetItemsInfo { Link Here
939
           borrowers.surname,
941
           borrowers.surname,
940
           borrowers.firstname,
942
           borrowers.firstname,
941
           borrowers.branchcode as bcode,
943
           borrowers.branchcode as bcode,
944
           serial.serialid,
942
           serial.serialseq,
945
           serial.serialseq,
943
           serial.publisheddate,
946
           serial.publisheddate,
944
           itemtypes.description,
947
           itemtypes.description,
Lines 2174-2180 sub _SearchItems_build_where_fragment { Link Here
2174
2177
2175
    my ($items, $total) = SearchItems($filter, $params);
2178
    my ($items, $total) = SearchItems($filter, $params);
2176
2179
2177
Perform a search among items
2180
Perform ubscriptionCurrentlyOnOrder search among items
2178
2181
2179
$filter is a reference to a hash which can be a filter, or a combination of filters.
2182
$filter is a reference to a hash which can be a filter, or a combination of filters.
2180
2183
Lines 2353-2358 sub PrepareItemrecordDisplay { Link Here
2353
    }
2356
    }
2354
    my @loop_data;
2357
    my @loop_data;
2355
2358
2359
    #Get the default items.price and items.replacementprice from the aqorder that the serial has been ordered in.
2360
    my $unitprice;
2361
    my $replacementprice;
2362
    my $subscriptionid = $defaultvalues->{'subscriptionid'};
2363
    my $lastOrder;
2364
2365
    #If the subscription is on order (i.e. aqorders.datereceived is NULL then call GetLastOrderNotReceviedFromSubscription() which
2366
    #retrieves the last order for the subscriptionid with a datereceived also equalling NULL
2367
    if ( subscriptionCurrentlyOnOrder($subscriptionid) ) {
2368
        $lastOrder = GetLastOrderNotReceivedFromSubscriptionid( $subscriptionid );
2369
    } else { #Otherwise the subscription has already arrived so retrieve the last order for the subscriptionid where datereceived is not null
2370
        $lastOrder = GetLastOrderReceivedFromSubscriptionid( $subscriptionid );
2371
    }
2372
2356
    my $branch_limit = C4::Context->userenv ? C4::Context->userenv->{"branch"} : "";
2373
    my $branch_limit = C4::Context->userenv ? C4::Context->userenv->{"branch"} : "";
2357
    my $query = qq{
2374
    my $query = qq{
2358
        SELECT authorised_value,lib FROM authorised_values
2375
        SELECT authorised_value,lib FROM authorised_values
Lines 2422-2428 sub PrepareItemrecordDisplay { Link Here
2422
                        $defaultvalue = $defaultvalues->{callnumber};
2439
                        $defaultvalue = $defaultvalues->{callnumber};
2423
                    }
2440
                    }
2424
                }
2441
                }
2425
                if (   ( $tagslib->{$tag}->{$subfield}->{kohafield} eq 'items.holdingbranch' || $tagslib->{$tag}->{$subfield}->{kohafield} eq 'items.homebranch' )
2442
2443
                       if (   ( $tagslib->{$tag}->{$subfield}->{kohafield} eq 'items.holdingbranch' || $tagslib->{$tag}->{$subfield}->{kohafield} eq 'items.homebranch' )
2426
                    && $defaultvalues
2444
                    && $defaultvalues
2427
                    && $defaultvalues->{'branchcode'} ) {
2445
                    && $defaultvalues->{'branchcode'} ) {
2428
                    if ( $itemrecord and $defaultvalues and not $itemrecord->subfield($tag,$subfield) ) {
2446
                    if ( $itemrecord and $defaultvalues and not $itemrecord->subfield($tag,$subfield) ) {
Lines 2441-2446 sub PrepareItemrecordDisplay { Link Here
2441
                        $defaultvalue = $defaultvalues->{location};
2459
                        $defaultvalue = $defaultvalues->{location};
2442
                    }
2460
                    }
2443
                }
2461
                }
2462
                #Set the default items.price from the aqorders.unitprice
2463
                if ( $lastOrder->{unitprice} && $tagslib->{$tag}->{$subfield}->{kohafield} eq 'items.price' ) {
2464
                    $defaultvalue = $lastOrder->{unitprice};
2465
                }
2466
                #Set the default items.replacementprice from the aqorders.replacementprice
2467
                if ( $lastOrder->{replacementprice} && $tagslib->{$tag}->{$subfield}->{kohafield} eq 'items.replacementprice' ) {
2468
                    $defaultvalue = $lastOrder->{replacementprice};
2469
                }
2470
                #Set dateaccessioned to current date automatically so the librarian doesnt have to click in the input form to load dateaccessioned
2471
                if ( C4::Context->preference('PopulateNewItemDateAccessionedOnPageLoad') && $tagslib->{$tag}->{$subfield}->{kohafield} eq 'items.dateaccessioned' ) {
2472
                    my $date = DateTime->now;
2473
                    $date = $date->ymd;
2474
                    $defaultvalue = $date;
2475
                }
2444
                if ( $tagslib->{$tag}->{$subfield}->{authorised_value} ) {
2476
                if ( $tagslib->{$tag}->{$subfield}->{authorised_value} ) {
2445
                    my @authorised_values;
2477
                    my @authorised_values;
2446
                    my %authorised_lib;
2478
                    my %authorised_lib;
Lines 2503-2508 sub PrepareItemrecordDisplay { Link Here
2503
2535
2504
                        $defaultvalue = $default_source;
2536
                        $defaultvalue = $default_source;
2505
2537
2538
                        #---- collection code CCODE
2539
                    } elsif ( $tagslib->{$tag}->{$subfield}->{authorised_value} eq "CCODE") {
2540
                        $authorised_values_sth->execute(
2541
                           $tagslib->{$tag}->{$subfield}->{authorised_value},
2542
                           $branch_limit ? $branch_limit : ()
2543
                        );
2544
                        push @authorised_values, ""
2545
                        unless ( $tagslib->{$tag}->{$subfield}->{mandatory} );
2546
                        while ( my ( $value, $lib ) = $authorised_values_sth->fetchrow_array ) {
2547
                            push @authorised_values, $value;
2548
                            $authorised_lib{$value} = $lib;
2549
                        }
2550
2551
                        # Set the default CCODE to what was set in subscription.ccode
2552
                        if ($itemrecord and $defaultvalues) {
2553
                            $defaultvalue = $defaultvalues->{'ccode'};
2554
                        } elsif (!$itemrecord and $defaultvalues) {
2555
                            $defaultvalue = $defaultvalues->{'ccode'};
2556
                        }
2557
2506
                        #---- "true" authorised value
2558
                        #---- "true" authorised value
2507
                    } else {
2559
                    } else {
2508
                        $authorised_values_sth->execute(
2560
                        $authorised_values_sth->execute(
Lines 2516-2521 sub PrepareItemrecordDisplay { Link Here
2516
                            $authorised_lib{$value} = $lib;
2568
                            $authorised_lib{$value} = $lib;
2517
                        }
2569
                        }
2518
                    }
2570
                    }
2571
2519
                    $subfield_data{marc_value} = {
2572
                    $subfield_data{marc_value} = {
2520
                        type    => 'select',
2573
                        type    => 'select',
2521
                        values  => \@authorised_values,
2574
                        values  => \@authorised_values,
Lines 2534-2539 sub PrepareItemrecordDisplay { Link Here
2534
                    if ( $itemrecord and my $field = $itemrecord->field($tag) ) {
2587
                    if ( $itemrecord and my $field = $itemrecord->field($tag) ) {
2535
                        $defaultvalue = $field->subfield($subfield);
2588
                        $defaultvalue = $field->subfield($subfield);
2536
                    }
2589
                    }
2590
2537
                    if( !$plugin->errstr ) {
2591
                    if( !$plugin->errstr ) {
2538
                        #TODO Move html to template; see report 12176/13397
2592
                        #TODO Move html to template; see report 12176/13397
2539
                        my $tab= $plugin->noclick? '-1': '';
2593
                        my $tab= $plugin->noclick? '-1': '';
(-)a/C4/Serials.pm (-5 / +6 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 $dbh   = C4::Context->dbh;
1308
    my $dbh   = C4::Context->dbh;
Lines 1315-1321 sub ModSubscription { Link Here
1315
            callnumber=?, notes=?, letter=?, manualhistory=?,
1315
            callnumber=?, notes=?, letter=?, manualhistory=?,
1316
            internalnotes=?, serialsadditems=?, staffdisplaycount=?,
1316
            internalnotes=?, serialsadditems=?, staffdisplaycount=?,
1317
            opacdisplaycount=?, graceperiod=?, location = ?, enddate=?,
1317
            opacdisplaycount=?, graceperiod=?, location = ?, enddate=?,
1318
            skip_serialseq=?, itemtype=?, previousitemtype=?, mana_id=?
1318
            skip_serialseq=?, itemtype=?, previousitemtype=?, mana_id=?, ccode=?
1319
        WHERE subscriptionid = ?";
1319
        WHERE subscriptionid = ?";
1320
1320
1321
    my $sth = $dbh->prepare($query);
1321
    my $sth = $dbh->prepare($query);
Lines 1329-1335 sub ModSubscription { Link Here
1329
        $letter,          ($manualhistory ? $manualhistory : 0),
1329
        $letter,          ($manualhistory ? $manualhistory : 0),
1330
        $internalnotes, $serialsadditems, $staffdisplaycount, $opacdisplaycount,
1330
        $internalnotes, $serialsadditems, $staffdisplaycount, $opacdisplaycount,
1331
        $graceperiod,     $location,       $enddate,        $skip_serialseq,
1331
        $graceperiod,     $location,       $enddate,        $skip_serialseq,
1332
        $itemtype,        $previousitemtype, $mana_id,
1332
        $itemtype,        $previousitemtype, $mana_id, $ccode,
1333
        $subscriptionid
1333
        $subscriptionid
1334
    );
1334
    );
1335
    my $rows = $sth->rows;
1335
    my $rows = $sth->rows;
Lines 1346-1352 $subscriptionid = &NewSubscription($auser,branchcode,$aqbooksellerid,$cost,$aqbu Link Here
1346
    $status, $notes, $letter, $firstacquidate, $irregularity, $numberpattern,
1346
    $status, $notes, $letter, $firstacquidate, $irregularity, $numberpattern,
1347
    $locale, $callnumber, $manualhistory, $internalnotes, $serialsadditems,
1347
    $locale, $callnumber, $manualhistory, $internalnotes, $serialsadditems,
1348
    $staffdisplaycount, $opacdisplaycount, $graceperiod, $location, $enddate,
1348
    $staffdisplaycount, $opacdisplaycount, $graceperiod, $location, $enddate,
1349
    $skip_serialseq, $itemtype, $previousitemtype);
1349
    $skip_serialseq, $itemtype, $previousitemtype, $mana_id, $ccode);
1350
1350
1351
Create a new subscription with value given on input args.
1351
Create a new subscription with value given on input args.
1352
1352
Lines 1363-1369 sub NewSubscription { Link Here
1363
    $innerloop3, $status, $notes, $letter, $firstacquidate, $irregularity,
1363
    $innerloop3, $status, $notes, $letter, $firstacquidate, $irregularity,
1364
    $numberpattern, $locale, $callnumber, $manualhistory, $internalnotes,
1364
    $numberpattern, $locale, $callnumber, $manualhistory, $internalnotes,
1365
    $serialsadditems, $staffdisplaycount, $opacdisplaycount, $graceperiod,
1365
    $serialsadditems, $staffdisplaycount, $opacdisplaycount, $graceperiod,
1366
    $location, $enddate, $skip_serialseq, $itemtype, $previousitemtype, $mana_id
1366
    $location, $enddate, $skip_serialseq, $itemtype, $previousitemtype, $mana_id, $ccode
1367
    ) = @_;
1367
    ) = @_;
1368
    my $dbh = C4::Context->dbh;
1368
    my $dbh = C4::Context->dbh;
1369
1369
Lines 1406-1411 sub NewSubscription { Link Here
1406
            itemtype          => $itemtype,
1406
            itemtype          => $itemtype,
1407
            previousitemtype  => $previousitemtype,
1407
            previousitemtype  => $previousitemtype,
1408
            mana_id           => $mana_id,
1408
            mana_id           => $mana_id,
1409
            ccode             => $ccode,
1409
        }
1410
        }
1410
    )->store;
1411
    )->store;
1411
    $subscription->discard_changes;
1412
    $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 2029-2034 CREATE TABLE `subscription` ( -- information related to the subscription Link Here
2029
  `itemtype` VARCHAR( 10 ) NULL,
2029
  `itemtype` VARCHAR( 10 ) NULL,
2030
  `previousitemtype` VARCHAR( 10 ) NULL,
2030
  `previousitemtype` VARCHAR( 10 ) NULL,
2031
  `mana_id` int(11) NULL DEFAULT NULL,
2031
  `mana_id` int(11) NULL DEFAULT NULL,
2032
  `ccode` varchar(80) DEFAULT NULL, -- authorized value for the collection code associated with this item (MARC21 952$8)
2032
  PRIMARY KEY  (`subscriptionid`),
2033
  PRIMARY KEY  (`subscriptionid`),
2033
  KEY `by_biblionumber` (`biblionumber`),
2034
  KEY `by_biblionumber` (`biblionumber`),
2034
  CONSTRAINT subscription_ibfk_1 FOREIGN KEY (periodicity) REFERENCES subscription_frequencies (id) ON DELETE SET NULL ON UPDATE CASCADE,
2035
  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 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'),
Lines 479-484 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
479
('PayPalSandboxMode',  '1', NULL ,  'If enabled, the system will use PayPal''s sandbox server for testing, rather than the production server.',  'YesNo'),
480
('PayPalSandboxMode',  '1', NULL ,  'If enabled, the system will use PayPal''s sandbox server for testing, rather than the production server.',  'YesNo'),
480
('PayPalSignature',  '', NULL ,  'Your PayPal API signature',  'Free'),
481
('PayPalSignature',  '', NULL ,  'Your PayPal API signature',  'Free'),
481
('PayPalUser',  '', NULL ,  'Your PayPal API username ( email address )',  'Free'),
482
('PayPalUser',  '', NULL ,  'Your PayPal API username ( email address )',  'Free'),
483
('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"),
482
('PrefillItem','0','','When a new item is added, should it be prefilled with last created item values?','YesNo'),
484
('PrefillItem','0','','When a new item is added, should it be prefilled with last created item values?','YesNo'),
483
('PreserveSerialNotes','1','','When a new "Expected" issue is generated, should it be prefilled with last created issue notes?','YesNo'),
485
('PreserveSerialNotes','1','','When a new "Expected" issue is generated, should it be prefilled with last created issue notes?','YesNo'),
484
('previousIssuesDefaultSortOrder','asc','asc|desc','Specify the sort order of Previous Issues on the circulation page','Choice'),
486
('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 (-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