View | Details | Raw Unified | Return to bug 32256
Collapse All | Expand All

(-)a/installer/data/mysql/atomicupdate/bug_32256_-_Add_SCOBatchCheckoutsValidCategories_syspref.pl (+16 lines)
Line 0 Link Here
1
use Modern::Perl;
2
3
return {
4
    bug_number  => "32256",
5
    description => "Self checkout batch mode",
6
    up          => sub {
7
        my ($args) = @_;
8
        my ( $dbh, $out ) = @$args{qw(dbh out)};
9
10
        $dbh->do(
11
            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') }
12
        );
13
14
        say $out "Added system preference 'SCOBatchCheckoutsValidCategories'";
15
    },
16
};
(-)a/installer/data/mysql/mandatory/sysprefs.sql (+1 lines)
Lines 682-687 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
682
('RoutingSerials','1',NULL,'If ON, serials routing is enabled','YesNo'),
682
('RoutingSerials','1',NULL,'If ON, serials routing is enabled','YesNo'),
683
('SavedSearchFilters', '0', NULL, 'Allow staff with permission to create/edit custom search filters', 'YesNo'),
683
('SavedSearchFilters', '0', NULL, 'Allow staff with permission to create/edit custom search filters', 'YesNo'),
684
('SCOAllowCheckin','0','','If enabled, patrons may return items through the Web-based Self Checkout','YesNo'),
684
('SCOAllowCheckin','0','','If enabled, patrons may return items through the Web-based Self Checkout','YesNo'),
685
('SCOBatchCheckoutsValidCategories','',NULL,'Patron categories allowed to checkout in a batch while logged into Self Checkout','Free'),
685
('SCOLoadCheckoutsByDefault','1','','If enabled, load the list of a patrons checkouts when they log in to the Self Checkout','YesNo'),
686
('SCOLoadCheckoutsByDefault','1','','If enabled, load the list of a patrons checkouts when they log in to the Self Checkout','YesNo'),
686
('SCOUserCSS','',NULL,'Add CSS to be included in the SCO module in an embedded <style> tag.','free'),
687
('SCOUserCSS','',NULL,'Add CSS to be included in the SCO module in an embedded <style> tag.','free'),
687
('SCOUserJS','',NULL,'Define custom javascript for inclusion in the SCO module','free'),
688
('SCOUserJS','',NULL,'Define custom javascript for inclusion in the SCO module','free'),
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref (+5 lines)
Lines 1270-1275 Circulation: Link Here
1270
            - pref: SelfCheckAllowByIPRanges
1270
            - pref: SelfCheckAllowByIPRanges
1271
              class: short
1271
              class: short
1272
            - (Leave blank if not used. Use ranges or simple IP addresses separated by spaces, like <code>192.168.1.1 192.168.0.0/24</code>.)
1272
            - (Leave blank if not used. Use ranges or simple IP addresses separated by spaces, like <code>192.168.1.1 192.168.0.0/24</code>.)
1273
        -
1274
            - "Patron categories allowed to check out in a batch while logged into the self checkout system:"
1275
            - pref: SCOBatchCheckoutsValidCategories
1276
              choices: patron-categories
1277
              class: multiple
1273
    Course reserves:
1278
    Course reserves:
1274
        -
1279
        -
1275
            - pref: UseCourseReserves
1280
            - pref: UseCourseReserves
(-)a/opac/sco/sco-main.pl (-3 / +2 lines)
Lines 141-148 my $confirm_required = 0; Link Here
141
my $return_only      = 0;
141
my $return_only      = 0;
142
142
143
my $batch_checkouts_allowed;
143
my $batch_checkouts_allowed;
144
if ( C4::Context->preference('BatchCheckouts') and $patron ) {
144
if ( $patron ) {
145
    my @batch_category_codes = split ',', C4::Context->preference('BatchCheckoutsValidCategories');
145
    my @batch_category_codes = split ',', C4::Context->preference('SCOBatchCheckoutsValidCategories');
146
    my $categorycode         = $patron->categorycode;
146
    my $categorycode         = $patron->categorycode;
147
    if ( $categorycode && grep { $_ eq $categorycode } @batch_category_codes ) {
147
    if ( $categorycode && grep { $_ eq $categorycode } @batch_category_codes ) {
148
        $batch_checkouts_allowed = 1;
148
        $batch_checkouts_allowed = 1;
149
- 

Return to bug 32256