Bug 11415: Add syspref to toggle SCO receipt printing

This patch adds the SelfCheckReceiptPrompt to control
whether receipts are automatically printed when a patron
finishes a SCO session.  This is on by default during
new installations and upgrades.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
This commit is contained in:
JaTara Barnes 2014-01-05 00:33:31 -06:00 committed by Galen Charlton
parent e276049746
commit 9cc3b69a0c
5 changed files with 22 additions and 0 deletions

View file

@ -332,6 +332,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `
('SearchEngine','Zebra','Solr|Zebra','Search Engine','Choice'),
('SearchMyLibraryFirst','0',NULL,'If ON, OPAC searches return results limited by the user\'s library by default if they are logged in','YesNo'),
('SelfCheckHelpMessage','','70|10','Enter HTML to include under the basic Web-based Self Checkout instructions on the Help page','Textarea'),
('SelfCheckReceiptPrompt','1','NULL','If ON, print receipt dialog pops up when self checkout is finished','YesNo'),
('SelfCheckTimeout','120','','Define the number of seconds before the Web-based Self Checkout times out a patron','Integer'),
('SeparateHoldings','0',NULL,'Separate current branch holdings from other holdings','YesNo'),
('SeparateHoldingsBranch','homebranch','homebranch|holdingbranch','Branch used to separate holdings','Choice'),

View file

@ -7930,6 +7930,13 @@ if(CheckVersion($DBversion)) {
SetVersion($DBversion);
}
$DBversion = "3.15.00.XXX";
if (CheckVersion($DBversion)) {
$dbh->do("INSERT INTO systempreferences (variable,value,options,explanation,type) VALUES('SelfCheckReceiptPrompt', '1', 'NULL', 'If ON, print receipt dialog pops up when self checkout is finished.', 'YesNo');");
print "Upgrade to $DBversion done (Bug 11415: add system preference for self checkout receipt print)\n";
SetVersion($DBversion);
}
=head1 FUNCTIONS

View file

@ -592,6 +592,13 @@ Circulation:
- and this password
- pref: AutoSelfCheckPass
- .
-
- pref: SelfCheckReceiptPrompt
choices:
yes: Show
no: "Don't show"
- "the print receipt popup dialog when self checkout is finished"
Course Reserves:
-
- pref: UseCourseReserves

View file

@ -1,3 +1,4 @@
[% USE Koha %]
[% USE KohaDates %]
[% INCLUDE 'doc-head-open.inc' %][% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha [% END %] &rsaquo; Self checkout </title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
@ -356,8 +357,11 @@
$("#logout_form").submit(function(){
clearTimeout(mainTimeout);
[% IF Koha.Preference('SelfCheckReceiptPrompt') %]
if(confirm("Would you like to print a receipt?")){
window.open("/cgi-bin/koha/sco/printslip.pl?borrowernumber=[% borrowernumber %]&amp;print=qslip");
[% END %]
}
return true;
});

View file

@ -1,3 +1,4 @@
[% USE Koha %]
[% USE KohaDates %]
[% INCLUDE 'doc-head-open.inc' %][% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha [% END %] &rsaquo; Self checkout </title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
@ -90,8 +91,10 @@ $(document).ready(function() {
}));
$("#logout_form").submit(function(){
clearTimeout(mainTimeout);
[% IF Koha.Preference('SelfCheckReceiptPrompt') %]
if(confirm("Would you like to print a receipt?")){
window.open("/cgi-bin/koha/sco/printslip.pl?borrowernumber=[% borrowernumber %]&amp;print=qslip");
[%END %]
}
return true;
});