From 5bc92c454d0b684e61ad65cf78c884095155cac7 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 + .../admin/preferences/circulation.pref | 6 ++++++ 3 files changed, 27 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 3a06d35226c..b17f038a5a9 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'), diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref index 00e764062dc..3de9ced3df6 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref @@ -1204,6 +1204,12 @@ Circulation: 1: Forgive 0: "Don't forgive" - the fines on an item when it is marked as lost. + - + - pref: WhenLostUpdateFine + choices: + 1: Update + 0: "Don't update" + - the fines on an item when it is marked as lost. - - "Don't refund lost fees if a lost item is checked in more than" - pref: NoRefundOnLostReturnedItemsAge -- 2.39.5