From 04350d331071e803da7b10220899b3b0b37e3850 Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Fri, 23 Jan 2026 12:40:57 +0000 Subject: [PATCH] Bug 29800: Add new system preference WhenLostUpdateFine --- installer/data/mysql/atomicupdate/bz_29800.pl | 20 +++++++++++++++++++ installer/data/mysql/mandatory/sysprefs.sql | 1 + 2 files changed, 21 insertions(+) create mode 100755 installer/data/mysql/atomicupdate/bz_29800.pl diff --git a/installer/data/mysql/atomicupdate/bz_29800.pl b/installer/data/mysql/atomicupdate/bz_29800.pl new file mode 100755 index 00000000000..3acd9bcf751 --- /dev/null +++ b/installer/data/mysql/atomicupdate/bz_29800.pl @@ -0,0 +1,20 @@ +use Modern::Perl; +use Koha::Installer::Output qw(say_warning say_success say_info); + +return { + bug_number => "29800", + description => "Add option to calculate and update fines when marking an item lost", + up => sub { + my ($args) = @_; + my ( $dbh, $out ) = @$args{qw(dbh out)}; + + $dbh->do( + q{ + INSERT IGNORE INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` ) VALUES + ('WhenLostUpdateFine','0',NULL,'If ON, calculate and update fines when a patron loses an item.','YesNo') + } + ); + + say $out "Added new system preference 'WhenLostUpdateFine'"; + }, +}; diff --git a/installer/data/mysql/mandatory/sysprefs.sql b/installer/data/mysql/mandatory/sysprefs.sql index c46343ee00e..6fe677a91fb 100644 --- a/installer/data/mysql/mandatory/sysprefs.sql +++ b/installer/data/mysql/mandatory/sysprefs.sql @@ -889,6 +889,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('WaitingNotifyAtCheckout','0',NULL,'If ON, notify librarians of waiting holds for the patron whose items they are checking out.','YesNo'), ('WebBasedSelfCheck','0',NULL,'If ON, enables the web-based self-check system','YesNo'), ('WhenLostChargeReplacementFee','1',NULL,'If ON, Charge the replacement price when a patron loses an item.','YesNo'), +('WhenLostUpdateFine','0',NULL,'If ON, calculate and update fines when a patron loses an item.','YesNo'), ('WhenLostForgiveFine','0',NULL,'If ON, Forgives the fines on an item when it is lost.','YesNo'), ('XSLTDetailsDisplay','default','','Enable XSL stylesheet control over details page display on intranet','Free'), ('XSLTListsDisplay','default','','Enable XSLT stylesheet control over lists pages display on intranet','Free'), -- 2.39.5