From c396922c16bb247e44e5babc369ececdd95a3e8a Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Mon, 9 Feb 2026 12:39:10 -0500 Subject: [PATCH] Bug 41553: Add new syspref OrderLineFundInfo Signed-off-by: Amy Peck --- .../data/mysql/atomicupdate/bug_41553.pl | 20 ++++++++++++++++++ installer/data/mysql/mandatory/sysprefs.sql | 1 + .../prog/en/modules/acqui/neworderempty.tt | 21 +++++++++++++++++-- .../admin/preferences/acquisitions.pref | 9 ++++++++ 4 files changed, 49 insertions(+), 2 deletions(-) create mode 100755 installer/data/mysql/atomicupdate/bug_41553.pl diff --git a/installer/data/mysql/atomicupdate/bug_41553.pl b/installer/data/mysql/atomicupdate/bug_41553.pl new file mode 100755 index 00000000000..9484f8d7748 --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_41553.pl @@ -0,0 +1,20 @@ +use Modern::Perl; +use Koha::Installer::Output qw(say_warning say_success say_info); + +return { + bug_number => "41553", + description => "Add OrderLineFundInfo system preference", + up => sub { + my ($args) = @_; + my ( $dbh, $out ) = @$args{qw(dbh out)}; + + $dbh->do( + q{ + INSERT IGNORE INTO systempreferences (variable, value, options, explanation, type) + VALUES ('OrderLineFundInfo', 'name', 'name|code|both', 'Choose what information to display for the fund in the order line table', 'Choice') + } + ); + + say $out "Added new system preference 'OrderLineFundInfo'"; + }, +}; diff --git a/installer/data/mysql/mandatory/sysprefs.sql b/installer/data/mysql/mandatory/sysprefs.sql index 585d7a5d8d8..2f48a7396ab 100644 --- a/installer/data/mysql/mandatory/sysprefs.sql +++ b/installer/data/mysql/mandatory/sysprefs.sql @@ -609,6 +609,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('OpenURLImageLocation', '', NULL, 'Location of image for OpenURL links', 'Free'), ('OpenURLResolverURL', '', NULL, 'URL of OpenURL Resolver', 'Free'), ('OpenURLText', '', NULL, 'Text of OpenURL links (or image title if OpenURLImageLocation is defined)', 'Free'), +('OrderLineFundInfo', 'name', 'name|code|both', 'Choose what information to display for the fund in the order line table', 'Choice'), ('OrderPdfFormat','pdfformat::layout3pages',NULL, 'Controls what script is used for printing (basketgroups)','Free'), ('OrderPriceRounding','','|nearest_cent','Local preference for rounding orders before calculations to ensure correct calculations','Choice'), ('OverDriveAuthName','',NULL,'Authentication for OverDrive integration, used as fallback when no OverDrive library authnames are set','Free'), diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt index b2fddc450c6..ff54e06f619 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt @@ -609,6 +609,7 @@ [% bdgclass=budget_loo.b_active? "": "b_inactive" | html %] [% END %] + [% SET OrderLineFundInfo = Koha.Preference('OrderLineFundInfo') %] [% IF ( budget_loo.b_sel ) %] [% ELSE %] [% END %] [% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/acquisitions.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/acquisitions.pref index 910d5ff8dc6..dc68e992ce2 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/acquisitions.pref +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/acquisitions.pref @@ -58,6 +58,15 @@ Acquisitions: 1: Warn 0: "Do not warn" - when the librarian tries to create an invoice with a duplicate number. + - + - Show + - pref: OrderLineFundInfo + default: name + choices: + name: fund name + code: fund code + both: fund code and name + - in the forms for creating and editing order lines. - - "Upon receiving items, update their subfields if they were created when placing an order (e.g. o=5|a=\"foo bar\"):" - pref: AcqItemSetSubfieldsWhenReceived -- 2.39.5