Bug 41214

Summary: Cash register should only show if UseCashRegisters sys pref is enabled
Product: Koha Reporter: Pedro Amorim <pedro.amorim>
Component: SIP2Assignee: Pedro Amorim <pedro.amorim>
Status: Passed QA --- QA Contact: Jonathan Druart <jonathan.druart>
Severity: enhancement    
Priority: P5 - low CC: jonathan.druart, lucas, martin.renvoize, matt.blenkinsop, pedro.amorim
Version: MainKeywords: rel_26_05_candidate
Hardware: All   
OS: All   
GIT URL: Initiative type: ---
Sponsorship status: --- Comma delimited list of Sponsors:
Crowdfunding goal: 0 Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:
Bug Depends on: 37893    
Bug Blocks:    
Attachments: Bug 41214: Only show cash register if UseCashRegisters sys pref is enabled
Bug 41214: Add cypress test
Bug 41214: Convert hideIn to a callback to allow total removal of fields via syspref
Bug 41214: Apply the same logic to table columns
Bug 41214: Apply the same logic to table columns
Bug 41214: Only show cash register if UseCashRegisters sys pref is enabled
Bug 41214: Add cypress test
Bug 41214: Convert hideIn to a callback to allow total removal of fields via syspref
Bug 41214: Apply the same logic to table columns
Bug 41214: Only show cash register if UseCashRegisters sys pref is enabled
Bug 41214: Add cypress test
Bug 41214: Convert hideIn to a callback to allow total removal of fields via syspref
Bug 41214: Apply the same logic to table columns

Description Pedro Amorim 2025-11-07 11:10:55 UTC

    
Comment 1 Pedro Amorim 2025-11-07 11:13:32 UTC
Created attachment 189263 [details] [review]
Bug 41214: Only show cash register if UseCashRegisters sys pref is enabled

Test plan:
1) Add a new account:
http://localhost:8081/cgi-bin/koha/sip2/accounts/add
2) Notice the 'cash register' field does not show
3) Enable UseCashRegisters sys pref
4) Repeat 1 (or edit an existing account). Refresh the page.
5) Notice the 'cash register' field now shows
Comment 2 Jonathan Druart 2025-11-07 13:04:05 UTC
Can we have a cypress test for this?
Comment 3 Pedro Amorim 2025-11-07 13:57:49 UTC
Created attachment 189322 [details] [review]
Bug 41214: Add cypress test

cypress run --spec t/cypress/integration/SIP2/Accounts.ts --config video=false,screenshotOnRunFailure=false
Comment 4 Matt Blenkinsop 2025-11-19 10:27:20 UTC
Created attachment 189695 [details] [review]
Bug 41214: Convert hideIn to a callback to allow total removal of fields via syspref
Comment 5 Matt Blenkinsop 2025-11-19 10:52:58 UTC
Created attachment 189697 [details] [review]
Bug 41214: Apply the same logic to table columns
Comment 6 Matt Blenkinsop 2025-11-19 11:36:05 UTC
Created attachment 189698 [details] [review]
Bug 41214: Apply the same logic to table columns
Comment 7 Pedro Amorim 2025-11-19 11:40:48 UTC
Created attachment 189699 [details] [review]
Bug 41214: Only show cash register if UseCashRegisters sys pref is enabled

Test plan:
1) Add a new account:
http://localhost:8081/cgi-bin/koha/sip2/accounts/add
2) Notice the 'cash register' field does not show
3) Enable UseCashRegisters sys pref
4) Repeat 1 (or edit an existing account). Refresh the page.
5) Notice the 'cash register' field now shows

Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk>
Comment 8 Pedro Amorim 2025-11-19 11:40:50 UTC
Created attachment 189700 [details] [review]
Bug 41214: Add cypress test

cypress run --spec t/cypress/integration/SIP2/Accounts.ts --config video=false,screenshotOnRunFailure=false

Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk>
Comment 9 Pedro Amorim 2025-11-19 11:40:53 UTC
Created attachment 189701 [details] [review]
Bug 41214: Convert hideIn to a callback to allow total removal of fields via syspref

Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk>
Comment 10 Pedro Amorim 2025-11-19 11:40:55 UTC
Created attachment 189702 [details] [review]
Bug 41214: Apply the same logic to table columns

Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk>
Comment 11 Pedro Amorim 2025-11-19 11:47:24 UTC
Thanks Matt for the follow-ups, that is a better approach here imo.
I'm moving this to Signed-off with both mine and Matt's SO lines for the following reasons:
1) We both worked on this (and tested it) and we're both happy with the solution here.
2) It's a small patch with core VueJS framework changes i.e. make 'hideIn' be optionally used as a callback.

Setting Joubu as QA contact as it makes sense. I'm happy to put it back to NSO if the above reasons are not enough for SO.
Comment 12 Jonathan Druart 2025-11-24 09:47:45 UTC
Created attachment 189902 [details] [review]
Bug 41214: Only show cash register if UseCashRegisters sys pref is enabled

Test plan:
1) Add a new account:
http://localhost:8081/cgi-bin/koha/sip2/accounts/add
2) Notice the 'cash register' field does not show
3) Enable UseCashRegisters sys pref
4) Repeat 1 (or edit an existing account). Refresh the page.
5) Notice the 'cash register' field now shows

Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 13 Jonathan Druart 2025-11-24 09:47:46 UTC
Created attachment 189903 [details] [review]
Bug 41214: Add cypress test

cypress run --spec t/cypress/integration/SIP2/Accounts.ts --config video=false,screenshotOnRunFailure=false

Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 14 Jonathan Druart 2025-11-24 09:47:47 UTC
Created attachment 189904 [details] [review]
Bug 41214: Convert hideIn to a callback to allow total removal of fields via syspref

Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 15 Jonathan Druart 2025-11-24 09:47:49 UTC
Created attachment 189905 [details] [review]
Bug 41214: Apply the same logic to table columns

Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>