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

(-)a/C4/Budgets.pm (-3 / +4 lines)
Lines 524-532 sub GetBudgetHierarchy { Link Here
524
            push @bind_params, $branchcode;
524
            push @bind_params, $branchcode;
525
        }
525
        }
526
    }
526
    }
527
	$query.=" WHERE ".join(' AND ', @where_strings) if @where_strings;
527
    $query .= " WHERE " . join( ' AND ', @where_strings ) if @where_strings;
528
	my $sth = $dbh->prepare($query);
528
    $query .= " ORDER BY timestamp DESC" if C4::Context->preference('FundDropdownSortField') eq 'timestamp';
529
	$sth->execute(@bind_params);
529
    my $sth = $dbh->prepare($query);
530
    $sth->execute(@bind_params);
530
531
531
    my %links;
532
    my %links;
532
    # create hash with budget_id has key
533
    # create hash with budget_id has key
(-)a/installer/data/mysql/atomicupdate/bug_31606_-_add_FundDropdownSortField_syspref.pl (+16 lines)
Line 0 Link Here
1
use Modern::Perl;
2
3
return {
4
    bug_number  => "31606",
5
    description => "Make acquisitions fund dropdown consistently show budget name",
6
    up          => sub {
7
        my ($args) = @_;
8
        my ( $dbh, $out ) = @$args{qw(dbh out)};
9
10
        $dbh->do(
11
            q{ INSERT IGNORE INTO systempreferences (variable,value,options,explanation,type) VALUES ('FundDropdownSortField','budget_code','budget_code|timestamp','Choose the display order of budgets and funds','Choice') }
12
        );
13
14
        say $out "Added system preference 'FundDropdownSortField'";
15
    },
16
};
(-)a/installer/data/mysql/mandatory/sysprefs.sql (+1 lines)
Lines 281-286 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
281
('finesMode','off','off|production','Choose the fines mode, \'off\' (no charges), \'production\' (accrue overdue fines).  Requires accruefines cronjob.','Choice'),
281
('finesMode','off','off|production','Choose the fines mode, \'off\' (no charges), \'production\' (accrue overdue fines).  Requires accruefines cronjob.','Choice'),
282
('ForceLibrarySelection','0',NULL,'Force staff to select a library when logging into the staff interface.','YesNo'),
282
('ForceLibrarySelection','0',NULL,'Force staff to select a library when logging into the staff interface.','YesNo'),
283
('FRBRizeEditions','0','','If ON, Koha will query one or more ISBN web services for associated ISBNs and display an Editions tab on the details pages','YesNo'),
283
('FRBRizeEditions','0','','If ON, Koha will query one or more ISBN web services for associated ISBNs and display an Editions tab on the details pages','YesNo'),
284
('FundDropdownSortField','budget_code','budget_code|timestamp','Choose the display order of budgets and funds','Choice');
284
('GenerateAuthorityField667', 'Machine generated authority record', NULL, 'When BiblioAddsAuthorities and AutoCreateAuthorities are enabled, use this as a default value for the 667$a field of MARC21 records', 'free'),
285
('GenerateAuthorityField667', 'Machine generated authority record', NULL, 'When BiblioAddsAuthorities and AutoCreateAuthorities are enabled, use this as a default value for the 667$a field of MARC21 records', 'free'),
285
('GenerateAuthorityField670', 'Work cat.', NULL, 'When BiblioAddsAuthorities and AutoCreateAuthorities are enabled, use this as a default value for the 670$a field of MARC21 records', 'free'),
286
('GenerateAuthorityField670', 'Work cat.', NULL, 'When BiblioAddsAuthorities and AutoCreateAuthorities are enabled, use this as a default value for the 670$a field of MARC21 records', 'free'),
286
('GoogleJackets','0',NULL,'if ON, displays jacket covers from Google Books API','YesNo'),
287
('GoogleJackets','0',NULL,'if ON, displays jacket covers from Google Books API','YesNo'),
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/acquisitions.pref (-1 / +8 lines)
Lines 138-143 Acquisitions: Link Here
138
              class: email
138
              class: email
139
            - 'when sending acquisitions order and claim notices.'
139
            - 'when sending acquisitions order and claim notices.'
140
            - '<br>If left empty, it will fall back to the first defined address in the following list: library reply-to, library email, <a href="/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=ReplytoDefault">ReplytoDefault</a>, <a href="/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=KohaAdminEmailAddress">KohaAdminEmailAddress</a>.'
140
            - '<br>If left empty, it will fall back to the first defined address in the following list: library reply-to, library email, <a href="/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=ReplytoDefault">ReplytoDefault</a>, <a href="/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=KohaAdminEmailAddress">KohaAdminEmailAddress</a>.'
141
        -
142
            - When displaying the budgets and funds dropdown, sort by
143
            - pref: FundDropdownSortField
144
              default: budget_code
145
              choices:
146
                  budget_code: "budget code"
147
                  timestamp: "last modified timestamp"
148
            - "."
141
    Printing:
149
    Printing:
142
        -
150
        -
143
            - Use the
151
            - Use the
144
- 

Return to bug 31606