Bugzilla – Attachment 116840 Details for
Bug 27696
Add a dedicated self checkout (SCO) issue slip
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 27696: add SCOSlipChoice system pref
Bug-27696-add-SCOSlipChoice-system-pref.patch (text/plain), 5.12 KB, created by
Lucas Gass (lukeg)
on 2021-02-12 17:45:20 UTC
(
hide
)
Description:
Bug 27696: add SCOSlipChoice system pref
Filename:
MIME Type:
Creator:
Lucas Gass (lukeg)
Created:
2021-02-12 17:45:20 UTC
Size:
5.12 KB
patch
obsolete
>From 27727afd224f056072ee820d341a9655726cf5e2 Mon Sep 17 00:00:00 2001 >From: Lucas Gass <lucas@bywatersolutions.com> >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 <a href=\"/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=RoutingListNote#jumped\">RoutingListNote</a> 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 <style> tag.','free'), > ('SCOUserJS','',NULL,'Define custom javascript for inclusion in the SCO module','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 ab68c75687..65799897ee 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 >@@ -1061,6 +1061,13 @@ Circulation: > syntax: text/html > class: code > - >+ - "Use the" >+ - pref: SCOSlipChoice >+ choices: >+ issueslip: "ISSUESLIP" >+ issueqslip: "ISSUEQSLIP" >+ - "when printing a receipt from the web-based self checkout." >+ - > - "Include the following CSS on all pages in the web-based self checkout:" > - pref: SCOUserCSS > type: textarea >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt >index 907f4bdf81..1a6c0d07c7 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt >@@ -499,7 +499,11 @@ > var confirmStart = Date.now(); > confirmModal("", _("Would you like to print a receipt?"), _("Print receipt and end session"), _("End session"), function(result) { > if ( result && (Date.now() - confirmStart) < [% SelfCheckTimeout | html %] ) { >- var win = window.open("/cgi-bin/koha/sco/printslip.pl?borrowernumber=[% borrowernumber | html %]&print=qslip"); >+ [% IF Koha.Preference( 'SCOSlipChoice' ) == 'issueqslip' %] >+ var win = window.open("/cgi-bin/koha/sco/printslip.pl?borrowernumber=[% borrowernumber | html %]&print=qslip"); >+ [% ELSE %] >+ var win = window.open("/cgi-bin/koha/sco/printslip.pl?borrowernumber=[% borrowernumber | html %]&print=slip"); >+ [% END %] > location.href = '/cgi-bin/koha/sco/sco-main.pl?op=logout'; > } else { > location.href = '/cgi-bin/koha/sco/sco-main.pl?op=logout'; >-- >2.11.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 27696
:
116840
|
117349