Bug 24478

Summary: Make it possible to deactivate point of sale
Product: Koha Reporter: Katrin Fischer <katrin.fischer>
Component: Fines and feesAssignee: Martin Renvoize <martin.renvoize>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: 1joynelson, andrewfh, martin.renvoize
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
20.05.00
Bug Depends on: 23354    
Bug Blocks: 23355    
Attachments: Bug 24478: Add `EnablePointOfSale` system preference
Bug 24478: Use `EnablePointOfSale` preference
Bug 24478: Use `EnablePointOfSale` preference
Bug 24477: Require `takepayment` permission in pos/pay.pl
Bug 24478: Add `EnablePointOfSale` system preference
Bug 24478: Use `EnablePointOfSale` preference
Bug 24478: Fix sequence in syyprefs.sql and add missing comma

Description Katrin Fischer 2020-01-22 07:28:01 UTC
It would be nice if the new POS module could be deactivated for libraries not using it.

A common demand from smaller libraries is to hide all functionality they don't use to make things less confusing and less error prone. As the new POS feature shows up as a new module on the start page it's prominently placed and it would be nice if there was a pref to turn off this functionality separate from fines permissions.
Comment 1 Martin Renvoize 2020-01-22 10:55:30 UTC
Created attachment 97702 [details] [review]
Bug 24478: Add `EnablePointOfSale` system preference
Comment 2 Martin Renvoize 2020-01-22 10:55:33 UTC
Created attachment 97703 [details] [review]
Bug 24478: Use `EnablePointOfSale` preference

This patch adds the `EnablePointOfSale` preference to the accounting tab
on the preferences editor and ties the display of the Point of Sale
module to it.

Test plan:
1) Enable both `UseCashRegisters` and `EnablePointOfSale` preferences.
2) Ensure you are a superuser or your user has the
   takepayment permission.
3) The Point of Sale module should be present on your staff home page
   with the above configuration, otherwhise it should not.
Comment 3 ByWater Sandboxes 2020-01-22 14:05:32 UTC
Created attachment 97732 [details] [review]
Bug 24478: Use `EnablePointOfSale` preference

This patch adds the `EnablePointOfSale` preference to the accounting tab
on the preferences editor and ties the display of the Point of Sale
module to it.

Test plan:
1) Enable both `UseCashRegisters` and `EnablePointOfSale` preferences.
2) Ensure you are a superuser or your user has the
   takepayment permission.
3) The Point of Sale module should be present on your staff home page
   with the above configuration, otherwhise it should not.

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>

https://bugs.koha-community.org/show_bug.cgi?id=24477

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Comment 4 ByWater Sandboxes 2020-01-22 14:05:34 UTC
Created attachment 97733 [details] [review]
Bug 24477: Require `takepayment` permission in pos/pay.pl

When adding the point of sale take payment page in bug 23354 we missed
the permission check script side along with adding the permission at
install time (update was caught).

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Comment 5 Katrin Fischer 2020-01-22 23:02:38 UTC
Created attachment 97762 [details] [review]
Bug 24478: Add `EnablePointOfSale` system preference

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 6 Katrin Fischer 2020-01-22 23:02:41 UTC
Created attachment 97763 [details] [review]
Bug 24478: Use `EnablePointOfSale` preference

This patch adds the `EnablePointOfSale` preference to the accounting tab
on the preferences editor and ties the display of the Point of Sale
module to it.

Test plan:
1) Enable both `UseCashRegisters` and `EnablePointOfSale` preferences.
2) Ensure you are a superuser or your user has the
   takepayment permission.
3) The Point of Sale module should be present on your staff home page
   with the above configuration, otherwhise it should not.

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>

https://bugs.koha-community.org/show_bug.cgi?id=24477

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 7 Katrin Fischer 2020-01-22 23:02:44 UTC
Created attachment 97764 [details] [review]
Bug 24478: Fix sequence in syyprefs.sql and add missing comma

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 8 Katrin Fischer 2020-01-22 23:04:54 UTC
Thx Martin!

2 notes:

- The QA tools don't catch if the , is missing at the end of a line in sysprefs.sql. I think it would be nice if we could add a check for that.

- The pref will only control the visibility of the icon on the start page, but not access to the page. It might be nice to add a message there with a link to activate the feature. But I am not seeing this as a blocker, as what we do there is inconsistent:

ILL: turn pref off = 404
Course reserves: turn pref off = nothing happens (allows to prepare for use, maybe)
Comment 9 Martin Renvoize 2020-01-23 10:36:18 UTC
Nice work everyone!

Pushed to master for 20.05
Comment 10 Joy Nelson 2020-02-06 23:25:51 UTC
Enhancement not backported to 19.11