Bugzilla – Attachment 193155 Details for
Bug 41553
Add fund code to the fund dropdown list when adding an item to an order (neworderempty.pl)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 41553: Add new syspref OrderLineFundInfo
Bug-41553-Add-new-syspref-OrderLineFundInfo.patch (text/plain), 6.93 KB, created by
Andrew Fuerste-Henry
on 2026-02-13 20:40:36 UTC
(
hide
)
Description:
Bug 41553: Add new syspref OrderLineFundInfo
Filename:
MIME Type:
Creator:
Andrew Fuerste-Henry
Created:
2026-02-13 20:40:36 UTC
Size:
6.93 KB
patch
obsolete
>From c396922c16bb247e44e5babc369ececdd95a3e8a Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Mon, 9 Feb 2026 12:39:10 -0500 >Subject: [PATCH] Bug 41553: Add new syspref OrderLineFundInfo > >Signed-off-by: Amy Peck <apeck@fplct.org> >--- > .../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 ) %] > <option > value="[% budget_loo.b_id | html %]" >@@ -617,11 +618,27 @@ > data-sort2-authcat="[% budget_loo.b_sort2_authcat | html %]" > selected="selected" > > >- [% 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 %] >+ [% IF OrderLineFundInfo == 'name' %] >+ [% level_indent | html %][% budget_loo.b_txt | html %] >+ [% ELSIF OrderLineFundInfo == 'code' %] >+ [% level_indent | html %][% budget_loo.b_code | html %] >+ [% ELSIF OrderLineFundInfo == 'both' %] >+ [% level_indent | html %][% budget_loo.b_txt | html %] >+ ([% budget_loo.b_code | html %]) >+ [% END %] >+ [% IF !budget_loo.b_active %](inactive)[% END %] > </option> > [% ELSE %] > <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 %]"> >- [% 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 %] >+ [% IF OrderLineFundInfo == 'name' %] >+ [% level_indent | html %][% budget_loo.b_txt | html %] >+ [% ELSIF OrderLineFundInfo == 'code' %] >+ [% level_indent | html %][% budget_loo.b_code | html %] >+ [% ELSIF OrderLineFundInfo == 'both' %] >+ [% level_indent | html %][% budget_loo.b_txt | html %] >+ ([% budget_loo.b_code | html %]) >+ [% END %] >+ [% IF !budget_loo.b_active %](inactive)[% END %] > </option> > [% 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
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 41553
:
191035
|
191036
|
192683
|
192832
|
192833
|
193154
| 193155