There are libraries use Koha's self checkout system without having receipt printers connected to them. The prompt for print a receipt from sco should be optional and controlled by a system preference.
Created attachment 23904 [details] [review] Implements syspref for SCO receipt printing
Test Case: 1. Log into self-check as normal. 2. Click the "Finish" button. 3. Notice that receipt dialog pops up. 4. Apply patch. 5. Run updatedatabase.pl 6. Set the SelfCheckReceiptPrompt syspref to "Don't show" 6. Log into self-check. 7. Click the "Finish" button. 8. Verify that the receipt dialog does NOT pop up.
Comment on attachment 23904 [details] [review] Implements syspref for SCO receipt printing Review of attachment 23904 [details] [review]: ----------------------------------------------------------------- ::: installer/data/mysql/updatedatabase.pl @@ +7886,5 @@ > } > > +$DBversion = "3.15.00.XXX"; > +if(CheckVersion($DBversion)) { > + $dbh->do("INSERT INTO systempreferences (variable,value,options,explanation,type) VALUES('SelfCheckReceiptPrompt', '0', 'NULL', 'If ON, print receipt dialog pops up when self checkout is finished.', 'YesNo');"); This all looks good, and works well. Our rule of thumb though is to not change behaviour. This syspref is set off, so once you upgrade you will no longer get the prompt showing up. I think it should go into the update as on, so the behaviour doesn't change on upgrade, people can switch it off. It can go in off for new installs though.
Created attachment 24028 [details] [review] Implements syspref for SCO receipt printing - updated to change default to ON
Created attachment 24037 [details] [review] Implements syspref for SCO receipt printing -- updated default value + template
Created attachment 24038 [details] [review] Implements syspref for SCO receipt -- added code to prog
Created attachment 24039 [details] [review] Bug 11415: Add syspref to toggle receipt printing for self-check Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Created attachment 24040 [details] [review] Bug 11415: Add syspref to toggle SCO receipt printing Simple change to updatedatabase.pl to set SCO receipt printing as default Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Created attachment 24041 [details] [review] Bug 11415: Add syspref to toggle SCO receipt printing Updated files to set default to 1 in sysprefs.sql. Also added code to pass the parameter to the template page, Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Created attachment 24042 [details] [review] Bug 11415: Add syspref to toggle SCO receipt printing Added code to update prog Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Created attachment 24043 [details] [review] [SIGNED OFF] Bug 11415: Add syspref to toggle receipt printing for self-check Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Created attachment 24044 [details] [review] [SIGNED OFF] Bug 11415: Add syspref to toggle SCO receipt printing Toggled SCO receipt printing to be on by default for upgrades in updatedatabase.pl. Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Created attachment 24045 [details] [review] [SIGNED OFF] Bug 11415: Add syspref to toggle SCO receipt printing Updated files to set default to 1 in sysprefs.sql. Also added code to read the system preference on the template page. Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Created attachment 24046 [details] [review] [SIGNED OFF] Bug 11415: Add syspref to toggle SCO receipt printing Added code to update prog theme with same changes as the bootstrap theme. Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
REVISED TEST PLAN ================= 0. ~/qa-test-tools/koha-qa.pl -v 2 -c 4 NOTE: Fix tabs. 1. Log into self-check as normal. (https://.../cgi-bin/koha/sco/sco-main.pl) 2. Check something out. 2. Click the "Finish" button. 3. Notice that receipt dialog pops up. 4. Apply patch. 5. Run updatedatabase.pl 6. Set the SelfCheckReceiptPrompt syspref to "Don't show" 7. Log into self-check. 8. Check something out. 9. Click the "Finish" button. 10. Verify that the receipt dialog does NOT pop up. 11. Set the SelfCheckReceiptPrompt syspref to "Don't show" 12. Log into self-check. 13. Check something out. 14. Click the "Finish" button. 15. Verify that the receipt dialog does NOT pop up.
Oops... got hit by the cut-and-paste problem. Fixed step 11. :) REVISED TEST PLAN ================= 0. ~/qa-test-tools/koha-qa.pl -v 2 -c 4 NOTE: Fix tabs. 1. Log into self-check as normal. (https://.../cgi-bin/koha/sco/sco-main.pl) 2. Check something out. 2. Click the "Finish" button. 3. Notice that receipt dialog pops up. 4. Apply patch. 5. Run updatedatabase.pl 6. Set the SelfCheckReceiptPrompt syspref to "Don't show" 7. Log into self-check. 8. Check something out. 9. Click the "Finish" button. 10. Verify that the receipt dialog does NOT pop up. 11. Set the SelfCheckReceiptPrompt syspref to "Show" 12. Log into self-check. 13. Check something out. 14. Click the "Finish" button. 15. Verify that the receipt dialog does NOT pop up
Created attachment 24130 [details] [review] Bug 11415: Add syspref to toggle SCO receipt printing Toggled SCO receipt printing to be on by default for upgrades in updatedatabase.pl. Updated files to set default to 1 in sysprefs.sql. Also added code to read the system preference on the template page. Added code to update prog theme with same changes as the bootstrap theme. Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Created attachment 24131 [details] [review] Bug 11415: Add syspref to toggle SCO receipt printing Toggled SCO receipt printing to be on by default for upgrades in updatedatabase.pl. Updated files to set default to 1 in sysprefs.sql. Also added code to read the system preference on the template page. Added code to update prog theme with same changes as the bootstrap theme. Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Passes koha-qa.pl, works as advertised. No regressions noted.
Created attachment 24132 [details] [review] Bug 11415 [QA Followup] - Add syspref to toggle SCO receipt printing
Now Kyle was faster with doing QA:) Welcome JaTara!
Pushed to master. Congratulations on having your first patch accepted into Koha, JaTara!
Pushed to 3.14.x, will be in 3.14.07. (created updatabase 3.14.06.001)