From 7521ae3c4868a3fa617e7d78b5bd565240150d2e Mon Sep 17 00:00:00 2001 From: Alex Buckley Date: Tue, 27 Sep 2022 16:54:06 +1300 Subject: [PATCH] Bug 31631: Add new system preference Sponsored-by: Waikato Institute of Technology, New Zealand --- ...31-add_CalculateFundValuesIncludingTax_syspref.pl | 12 ++++++++++++ installer/data/mysql/mandatory/sysprefs.sql | 1 + .../en/modules/admin/preferences/acquisitions.pref | 6 ++++++ 3 files changed, 19 insertions(+) create mode 100755 installer/data/mysql/atomicupdate/bug_31631-add_CalculateFundValuesIncludingTax_syspref.pl diff --git a/installer/data/mysql/atomicupdate/bug_31631-add_CalculateFundValuesIncludingTax_syspref.pl b/installer/data/mysql/atomicupdate/bug_31631-add_CalculateFundValuesIncludingTax_syspref.pl new file mode 100755 index 0000000000..fa21418f9f --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_31631-add_CalculateFundValuesIncludingTax_syspref.pl @@ -0,0 +1,12 @@ +use Modern::Perl; + +return { + bug_number => "31631", + description => "Add new system preference CalculateFundValuesIncludingTax", + up => sub { + my ($args) = @_; + my ($dbh, $out) = @$args{qw(dbh out)}; + + $dbh->do(q{INSERT IGNORE INTO systempreferences (variable, value, options, explanation, type) VALUES ('CalculateFundValuesIncludingTax', '1', NULL, 'Include tax in the calculated fund values (spent, ordered) for all supplier configurations', 'YesNo')}); + }, +}; diff --git a/installer/data/mysql/mandatory/sysprefs.sql b/installer/data/mysql/mandatory/sysprefs.sql index db99d68f81..f226fe96c3 100644 --- a/installer/data/mysql/mandatory/sysprefs.sql +++ b/installer/data/mysql/mandatory/sysprefs.sql @@ -120,6 +120,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('BundleNotLoanValue','3',NULL,'Sets the NOT_LOAN AV value that represents "Added to bundle" as a not for loan value','Free'), ('CalculateFinesOnReturn','1','','Switch to control if overdue fines are calculated on return or not','YesNo'), ('CalculateFinesOnBackdate','1','','Switch to control if overdue fines are calculated on return when backdating','YesNo'), +('CalculateFundValuesIncludingTax', '1', NULL, 'Include tax in the calculated fund values (spent, ordered) for all supplier configurations', 'YesNo'), ('CalendarFirstDayOfWeek','0','0|1|2|3|4|5|6','Select the first day of week to use in the calendar.','Choice'), ('CanMarkHoldsToPullAsLost','do_not_allow','do_not_allow|allow|allow_and_notify','Add a button to the "Holds to pull" screen to mark an item as lost and notify the patron.','Choice'), ('canreservefromotherbranches','1','','With Independent branches on, can a user from one library place a hold on an item from another library','YesNo'), 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 bfe4f6e362..c42aad06a9 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 @@ -39,6 +39,12 @@ Acquisitions: - pref: TaxRates - . Enter in numeric form, 0.12 for 12%. The first item in the list will be selected by default. For more than one value, separate with | (pipe). - "Please note: The database will only accept values up to 4 decimals precision, further values will be rounded." + - + - pref: CalculateFundValuesIncludingTax + choices: + 1: Include + 0: Exclude + - "tax in the calculated fund values (spent, ordered). Note this rule applies to all vendors regardless of their configuration" - - pref: AcqWarnOnDuplicateInvoice choices: -- 2.20.1