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

(-)a/installer/data/mysql/atomicupdate/bug_41553.pl (+20 lines)
Line 0 Link Here
1
use Modern::Perl;
2
use Koha::Installer::Output qw(say_warning say_success say_info);
3
4
return {
5
    bug_number  => "41553",
6
    description => "Add OrderLineFundInfo system preference",
7
    up          => sub {
8
        my ($args) = @_;
9
        my ( $dbh, $out ) = @$args{qw(dbh out)};
10
11
        $dbh->do(
12
            q{
13
            INSERT IGNORE INTO systempreferences (variable, value, options, explanation, type)
14
            VALUES ('OrderLineFundInfo', 'name', 'name|code|both', 'Choose what information to display for the fund in the order line table', 'Choice')
15
            }
16
        );
17
18
        say $out "Added new system preference 'OrderLineFundInfo'";
19
    },
20
};
(-)a/installer/data/mysql/mandatory/sysprefs.sql (+1 lines)
Lines 609-614 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
609
('OpenURLImageLocation', '', NULL, 'Location of image for OpenURL links', 'Free'),
609
('OpenURLImageLocation', '', NULL, 'Location of image for OpenURL links', 'Free'),
610
('OpenURLResolverURL', '', NULL, 'URL of OpenURL Resolver', 'Free'),
610
('OpenURLResolverURL', '', NULL, 'URL of OpenURL Resolver', 'Free'),
611
('OpenURLText', '', NULL, 'Text of OpenURL links (or image title if OpenURLImageLocation is defined)', 'Free'),
611
('OpenURLText', '', NULL, 'Text of OpenURL links (or image title if OpenURLImageLocation is defined)', 'Free'),
612
('OrderLineFundInfo', 'name', 'name|code|both', 'Choose what information to display for the fund in the order line table', 'Choice'),
612
('OrderPdfFormat','pdfformat::layout3pages',NULL, 'Controls what script is used for printing (basketgroups)','Free'),
613
('OrderPdfFormat','pdfformat::layout3pages',NULL, 'Controls what script is used for printing (basketgroups)','Free'),
613
('OrderPriceRounding','','|nearest_cent','Local preference for rounding orders before calculations to ensure correct calculations','Choice'),
614
('OrderPriceRounding','','|nearest_cent','Local preference for rounding orders before calculations to ensure correct calculations','Choice'),
614
('OverDriveAuthName','',NULL,'Authentication for OverDrive integration, used as fallback when no OverDrive library authnames are set','Free'),
615
('OverDriveAuthName','',NULL,'Authentication for OverDrive integration, used as fallback when no OverDrive library authnames are set','Free'),
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt (-2 / +19 lines)
Lines 609-614 Link Here
609
                                [% bdgclass=budget_loo.b_active? "": "b_inactive" | html %]
609
                                [% bdgclass=budget_loo.b_active? "": "b_inactive" | html %]
610
                            [% END %]
610
                            [% END %]
611
611
612
                            [% SET OrderLineFundInfo = Koha.Preference('OrderLineFundInfo') %]
612
                            [% IF ( budget_loo.b_sel ) %]
613
                            [% IF ( budget_loo.b_sel ) %]
613
                                <option
614
                                <option
614
                                    value="[% budget_loo.b_id | html %]"
615
                                    value="[% budget_loo.b_id | html %]"
Lines 617-627 Link Here
617
                                    data-sort2-authcat="[% budget_loo.b_sort2_authcat | html %]"
618
                                    data-sort2-authcat="[% budget_loo.b_sort2_authcat | html %]"
618
                                    selected="selected"
619
                                    selected="selected"
619
                                >
620
                                >
620
                                    [% level_indent | html %]<span class="budget_name">[% budget_loo.b_txt | html %]</span> <span class="budget_code">([% budget_loo.b_code | html %])</span>[% IF !budget_loo.b_active %](inactive)[% END %]
621
                                    [% IF OrderLineFundInfo == 'name' %]
622
                                        [% level_indent | html %][% budget_loo.b_txt | html %]
623
                                    [% ELSIF OrderLineFundInfo == 'code' %]
624
                                        [% level_indent | html %][% budget_loo.b_code | html %]
625
                                    [% ELSIF OrderLineFundInfo == 'both' %]
626
                                        [% level_indent | html %][% budget_loo.b_txt | html %]
627
                                        ([% budget_loo.b_code | html %])
628
                                    [% END %]
629
                                    [% IF !budget_loo.b_active %](inactive)[% END %]
621
                                </option>
630
                                </option>
622
                            [% ELSE %]
631
                            [% ELSE %]
623
                                <option value="[% budget_loo.b_id | html %]" class="[% bdgclass | html %]" data-sort1-authcat="[% budget_loo.b_sort1_authcat | html %]" data-sort2-authcat="[% budget_loo.b_sort2_authcat | html %]">
632
                                <option value="[% budget_loo.b_id | html %]" class="[% bdgclass | html %]" data-sort1-authcat="[% budget_loo.b_sort1_authcat | html %]" data-sort2-authcat="[% budget_loo.b_sort2_authcat | html %]">
624
                                    [% level_indent | html %]<span class="budget_name">[% budget_loo.b_txt | html %]</span> <span class="budget_code">([% budget_loo.b_code | html %])</span>[% IF !budget_loo.b_active %](inactive)[% END %]
633
                                    [% IF OrderLineFundInfo == 'name' %]
634
                                        [% level_indent | html %][% budget_loo.b_txt | html %]
635
                                    [% ELSIF OrderLineFundInfo == 'code' %]
636
                                        [% level_indent | html %][% budget_loo.b_code | html %]
637
                                    [% ELSIF OrderLineFundInfo == 'both' %]
638
                                        [% level_indent | html %][% budget_loo.b_txt | html %]
639
                                        ([% budget_loo.b_code | html %])
640
                                    [% END %]
641
                                    [% IF !budget_loo.b_active %](inactive)[% END %]
625
                                </option>
642
                                </option>
626
                            [% END %]
643
                            [% END %]
627
                        [% END %]
644
                        [% END %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/acquisitions.pref (-1 / +9 lines)
Lines 58-63 Acquisitions: Link Here
58
                  1: Warn
58
                  1: Warn
59
                  0: "Do not warn"
59
                  0: "Do not warn"
60
            - when the librarian tries to create an invoice with a duplicate number.
60
            - when the librarian tries to create an invoice with a duplicate number.
61
        -
62
            - Show
63
            - pref: OrderLineFundInfo
64
              default: name
65
              choices:
66
                  name: fund name
67
                  code: fund code
68
                  both: fund code and name
69
            - in the forms for creating and editing order lines.
61
        -
70
        -
62
            - "Upon receiving items, update their subfields if they were created when placing an order (e.g. o=5|a=\"foo bar\"):"
71
            - "Upon receiving items, update their subfields if they were created when placing an order (e.g. o=5|a=\"foo bar\"):"
63
            - pref: AcqItemSetSubfieldsWhenReceived
72
            - pref: AcqItemSetSubfieldsWhenReceived
64
- 

Return to bug 41553