From d8baa5090b9c84856072c79112ac1377e6395562 Mon Sep 17 00:00:00 2001 From: Aleisha Amohia Date: Mon, 6 May 2024 03:42:57 +0000 Subject: [PATCH] Bug 32256: Use a new SCOBatchCheckoutsValidCategories syspref So that this functionality can be controlled separately from staff-side batch checkouts Signed-off-by: Andrew Fuerste Henry Signed-off-by: Martin Renvoize Signed-off-by: Katrin Fischer --- ...d_SCOBatchCheckoutsValidCategories_syspref.pl | 16 ++++++++++++++++ installer/data/mysql/mandatory/sysprefs.sql | 1 + .../modules/admin/preferences/circulation.pref | 5 +++++ opac/sco/sco-main.pl | 4 ++-- 4 files changed, 24 insertions(+), 2 deletions(-) create mode 100755 installer/data/mysql/atomicupdate/bug_32256_-_Add_SCOBatchCheckoutsValidCategories_syspref.pl diff --git a/installer/data/mysql/atomicupdate/bug_32256_-_Add_SCOBatchCheckoutsValidCategories_syspref.pl b/installer/data/mysql/atomicupdate/bug_32256_-_Add_SCOBatchCheckoutsValidCategories_syspref.pl new file mode 100755 index 0000000000..a308a22ac0 --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_32256_-_Add_SCOBatchCheckoutsValidCategories_syspref.pl @@ -0,0 +1,16 @@ +use Modern::Perl; + +return { + bug_number => "32256", + description => "Self checkout batch mode", + up => sub { + my ($args) = @_; + my ( $dbh, $out ) = @$args{qw(dbh out)}; + + $dbh->do( + q{ INSERT IGNORE INTO systempreferences (variable,value,options,explanation,type) VALUES ('SCOBatchCheckoutsValidCategories','',NULL,'Patron categories allowed to checkout in a batch while logged into Self Checkout','Free') } + ); + + say $out "Added system preference 'SCOBatchCheckoutsValidCategories'"; + }, +}; diff --git a/installer/data/mysql/mandatory/sysprefs.sql b/installer/data/mysql/mandatory/sysprefs.sql index 833933da9e..5f18d61d9f 100644 --- a/installer/data/mysql/mandatory/sysprefs.sql +++ b/installer/data/mysql/mandatory/sysprefs.sql @@ -682,6 +682,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('RoutingSerials','1',NULL,'If ON, serials routing is enabled','YesNo'), ('SavedSearchFilters', '0', NULL, 'Allow staff with permission to create/edit custom search filters', 'YesNo'), ('SCOAllowCheckin','0','','If enabled, patrons may return items through the Web-based Self Checkout','YesNo'), +('SCOBatchCheckoutsValidCategories','',NULL,'Patron categories allowed to checkout in a batch while logged into Self Checkout','Free'), ('SCOLoadCheckoutsByDefault','1','','If enabled, load the list of a patrons checkouts when they log in to the Self Checkout','YesNo'), ('SCOUserCSS','',NULL,'Add CSS to be included in the SCO module in an embedded