From e998b75bf9b861906588e0c318812b1c4d3cc8e6 Mon Sep 17 00:00:00 2001 From: peggy Date: Thu, 7 Nov 2013 18:49:51 -0500 Subject: [PATCH] Bug 11040 Add option to print regular slip to CircAutoPrintQuickSlip Test plan: 1. Set the System Preference for CircAutoPrintQuickSlip to "clear the screen". Enter a borrower barcode for checkout Press Enter The screen should be cleared. 2. Set the System Preference for CircCircAutoPrintQuickSlip to "open a quick slip window" Enter a borrower barcode for checkout Press Enter A Quick slip is printed. 3. Apply the patch Update the database using UpdateDatabase.pl 4. Set the System Preference for CircAutoPrintQuickSlip to "clear the screen". Enter a borrower barcode for checkout Press Enter The screen should be cleared. 5. Set the System Preference for CircCircAutoPrintQuickSlip to "open a quick slip window" Enter a borrower barcode for checkout Press Enter A Quick slip is printed. 6. Set the System Preference for CircCircAutoPrintQuickSlip to "open a slip window" Enter a borrower barcode for checkout Press Enter A Slip is printed. 7. Reload the database using sysprefs.sql Set the System Preference for CircAutoPrintQuickSlip to "clear the screen". Enter a borrower barcode for checkout Press Enter The screen should be cleared. 8. Set the System Preference for CircCircAutoPrintQuickSlip to "open a quick slip window" Enter a borrower barcode for checkout Press Enter A Quick slip is printed. 9. Set the System Preference for CircCircAutoPrintQuickSlip to "open a slip window" Enter a borrower barcode for checkout Press Enter A Slip is printed. 10. Verify that the Checkout Help includes information about printing Slips. Signed-off-by: Chris Cormack --- installer/data/mysql/sysprefs.sql | 2 +- installer/data/mysql/updatedatabase.pl | 8 ++++++++ .../prog/en/modules/admin/preferences/circulation.pref | 5 +++-- koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt | 4 ++-- koha-tmpl/intranet-tmpl/prog/en/modules/help/circ/circulation.tt | 2 +- 5 files changed, 15 insertions(+), 6 deletions(-) diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql index 72eead2..bac1d58 100644 --- a/installer/data/mysql/sysprefs.sql +++ b/installer/data/mysql/sysprefs.sql @@ -77,7 +77,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('CataloguingLog','1',NULL,'If ON, log edit/create/delete actions on bibliographic data. WARNING: this feature is very resource consuming.','YesNo'), ('checkdigit','none','none|katipo','If ON, enable checks on patron cardnumber: none or \"Katipo\" style checks','Choice'), ('CircAutocompl','1',NULL,'If ON, autocompletion is enabled for the Circulation input','YesNo'), -('CircAutoPrintQuickSlip','1',NULL,'Choose what should happen when an empty barcode field is submitted in circulation: Display a print quick slip window or Clear the screen.','YesNo'), +('CircAutoPrintQuickSlip','qslip',NULL,'Choose what should happen when an empty barcode field is submitted in circulation: Display a print quick slip window, Display a print slip window or Clear the screen.','Choice'), ('CircControl','ItemHomeLibrary','PickupLibrary|PatronLibrary|ItemHomeLibrary','Specify the agency that controls the circulation and fines policy','Choice'), ('ConfirmFutureHolds','0','','Number of days for confirming future holds','Integer'), ('COinSinOPACResults','1','','If ON, use COinS in OPAC search results page. NOTE: this can slow down search response time significantly','YesNo'), diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 6162bc5..ca53c80 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -7743,6 +7743,14 @@ if(CheckVersion($DBversion)) { SetVersion($DBversion); } +$DBversion = "XXX"; +if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) { + $dbh->do("UPDATE systempreferences SET value='clear' where variable = 'CircAutoPrintQuickSlip' and value = '0'"); + $dbh->do("UPDATE systempreferences SET value='qslip' where variable = 'CircAutoPrintQuickSlip' and value = '1'"); + $dbh->do("UPDATE systempreferences SET explanation = 'Choose what should happen when an empty barcode field is submitted in circulation: Display a print quick slip window, Display a print slip window or Clear the screen.', type = 'Choice' where variable = 'CircAutoPrintQuickSlip'"); + print "Upgrade to $DBversion done (Add option to print full slip when checking out a null barcode)"; + SetVersion($DBversion); +} =head1 FUNCTIONS =head2 TableExists($table) 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 9ae9c44..2c5469b 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 @@ -107,8 +107,9 @@ Circulation: - When an empty barcode field is submitted in circulation - pref: CircAutoPrintQuickSlip choices: - yes: "open a print quick slip window" - no: "clear the screen" + clear: "clear the screen" + qslip: "open a print quick slip window" + slip: "open a print slip window" - . - - Include the stylesheet at diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt index 46b82a8..81ea2b6 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt @@ -75,11 +75,11 @@ var MSG_EXPORT_SELECT_CHECKOUTS = _("You must select checkout(s) to export"); $( '.renewals-allowed' ).hide(); $( '.renewals-disabled' ).show(); } } ).attr( 'checked', false ); - [% END %][% IF ( CircAutoPrintQuickSlip ) %] + [% END %][% IF !( CircAutoPrintQuickSlip == 'clear' ) %] // listen submit to trigger qslip on empty checkout $('#mainform').bind('submit',function() { if ($('#barcode').val() == '') { - return printx_window('qslip'); } + return printx_window( '[% CircAutoPrintQuickSlip %]' ); } });[% END %] [% IF ( CAN_user_circulate_override_renewals ) %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/help/circ/circulation.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/help/circ/circulation.tt index a70f8e9..c1e758c 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/help/circ/circulation.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/help/circ/circulation.tt @@ -39,7 +39,7 @@

Once you have checked out all of the items for the patron you can print them a receipt by choosing one of two methods.

-

If you have the CircAutoPrintQuickSlip preference set to 'open a print quick slip window' you can simply hit enter on your keyboard or scan a blank piece of paper with your barcode scanner. The idea being that you're "checking out" a blank barcode which triggers Koha to print the 'Quick slip.'

+

If you have the CircAutoPrintQuickSlip preference set to 'open a print quick slip window' or 'open a print slip window' you can simply hit enter on your keyboard or scan a blank piece of paper with your barcode scanner. The idea being that you're "checking out" a blank barcode which triggers Koha to print the 'Quick slip' or the 'Slip.'

You can also click the Print button at the top of the screen and choose 'Print slip' or 'Print quick slip'.

-- 1.8.3.2