Bug 41214 - Cash register should only show if UseCashRegisters sys pref is enabled
Summary: Cash register should only show if UseCashRegisters sys pref is enabled
Status: Passed QA
Alias: None
Product: Koha
Classification: Unclassified
Component: SIP2 (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Pedro Amorim
QA Contact: Jonathan Druart
URL:
Keywords: rel_26_05_candidate
Depends on: 37893
Blocks:
  Show dependency treegraph
 
Reported: 2025-11-07 11:10 UTC by Pedro Amorim
Modified: 2025-12-01 17:34 UTC (History)
5 users (show)

See Also:
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:


Attachments
Bug 41214: Only show cash register if UseCashRegisters sys pref is enabled (20.66 KB, patch)
2025-11-07 11:13 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 41214: Add cypress test (1.90 KB, patch)
2025-11-07 13:57 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 41214: Convert hideIn to a callback to allow total removal of fields via syspref (18.59 KB, patch)
2025-11-19 10:27 UTC, Matt Blenkinsop
Details | Diff | Splinter Review
Bug 41214: Apply the same logic to table columns (1.22 KB, patch)
2025-11-19 10:52 UTC, Matt Blenkinsop
Details | Diff | Splinter Review
Bug 41214: Apply the same logic to table columns (1.24 KB, patch)
2025-11-19 11:36 UTC, Matt Blenkinsop
Details | Diff | Splinter Review
Bug 41214: Only show cash register if UseCashRegisters sys pref is enabled (20.78 KB, patch)
2025-11-19 11:40 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 41214: Add cypress test (2.02 KB, patch)
2025-11-19 11:40 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 41214: Convert hideIn to a callback to allow total removal of fields via syspref (18.71 KB, patch)
2025-11-19 11:40 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 41214: Apply the same logic to table columns (1.36 KB, patch)
2025-11-19 11:40 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 41214: Only show cash register if UseCashRegisters sys pref is enabled (20.85 KB, patch)
2025-11-24 09:47 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 41214: Add cypress test (2.10 KB, patch)
2025-11-24 09:47 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 41214: Convert hideIn to a callback to allow total removal of fields via syspref (18.78 KB, patch)
2025-11-24 09:47 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 41214: Apply the same logic to table columns (1.44 KB, patch)
2025-11-24 09:47 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
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>