From 27727afd224f056072ee820d341a9655726cf5e2 Mon Sep 17 00:00:00 2001 From: Lucas Gass Date: Fri, 12 Feb 2021 17:39:09 +0000 Subject: [PATCH] Bug 27696: add SCOSlipChoice system pref To test: 1. Apply patch, updatedatabase. 2. Look for the new system preference SCOSlipChoice. 3. Make sure your ISSUESLIP and ISSUEQSLIP have different info in them so you can differentiate between the two. 3. Switch SCOSlipChoice to ISSUESLIP, make sure the SCO now prints the issue slip. 4. Switch SCOSlipChoice to ISSUEQSLIP, make sure the SCO now prints the issue quick slip. --- installer/data/mysql/atomicupdate/bug27696.perl | 9 +++++++++ installer/data/mysql/mandatory/sysprefs.sql | 1 + .../prog/en/modules/admin/preferences/circulation.pref | 7 +++++++ koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt | 6 +++++- 4 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 installer/data/mysql/atomicupdate/bug27696.perl diff --git a/installer/data/mysql/atomicupdate/bug27696.perl b/installer/data/mysql/atomicupdate/bug27696.perl new file mode 100644 index 0000000000..58baa1fda9 --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug27696.perl @@ -0,0 +1,9 @@ +$DBversion = 'XXX'; # will be replaced by the RM +if( CheckVersion( $DBversion ) ) { + $dbh->do(q{ + INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) + VALUES ('SCOSlipChoice', 'issueqslip', 'Choose the slip for SCO print receipts', 'issueqslip|issueslip', 'Choice') + }); + # Always end with this (adjust the bug info) + NewVersion( $DBversion, 12345, "Add SCOSlipChoice system preference"); +} diff --git a/installer/data/mysql/mandatory/sysprefs.sql b/installer/data/mysql/mandatory/sysprefs.sql index eab5e66838..9df5bb48fb 100644 --- a/installer/data/mysql/mandatory/sysprefs.sql +++ b/installer/data/mysql/mandatory/sysprefs.sql @@ -577,6 +577,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('RoutingListNote','To change this note edit RoutingListNote system preference.','70|10','Define a note to be shown on all routing lists','Textarea'), ('RoutingSerials','1',NULL,'If ON, serials routing is enabled','YesNo'), ('SCOAllowCheckin','0','','If enabled, patrons may return items through the Web-based Self Checkout','YesNo'), +('SCOSlipChoice' , '0', 'issueqlsip', 'issueqslip|issueslip', 'Allow choice for SCO receipt print', 'Choice' ), ('SCOMainUserBlock','','70|10','Add a block of HTML that will display on the self checkout screen','Textarea'), ('SCOUserCSS','',NULL,'Add CSS to be included in the SCO module in an embedded