Bug 26194 - Messages about missing cash registers should link to cash register management
Summary: Messages about missing cash registers should link to cash register management
Status: Pushed to master
Alias: None
Product: Koha
Classification: Unclassified
Component: Templates (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Owen Leonard
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks: 13985
  Show dependency treegraph
 
Reported: 2020-08-11 19:30 UTC by Owen Leonard
Modified: 2020-09-04 15:22 UTC (History)
2 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Who signed the patch off:
Text to go in the release notes:
Version(s) released in:
20.11.00


Attachments
Bug 26194: Add link to cash register management from message about missing registers (8.01 KB, patch)
2020-08-11 19:57 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 26194: Add link to cash register management from message about missing registers (8.04 KB, patch)
2020-08-12 15:10 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 26194: (follow-up) Default to current branch (1.84 KB, patch)
2020-08-12 15:10 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 26194: Add link to cash register management from message about missing registers (8.13 KB, patch)
2020-08-15 07:52 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 26194: (follow-up) Default to current branch (1.90 KB, patch)
2020-08-15 07:52 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Owen Leonard 2020-08-11 19:30:57 UTC
If UseCashRegisters and EnablePointOfSale preferences are enabled but there are no cash registers defined, a message will appear in several places in Koha saying "You must have at least one cash register associated with the branch."

If the user has permission, it would be helpful to include a link directly to new cash register creation. Also, the term "library" should be used instead of "branch."
Comment 1 Owen Leonard 2020-08-11 19:57:16 UTC
Created attachment 108092 [details] [review]
Bug 26194: Add link to cash register management from message about missing registers

In places where the interface warns the user about missing cash
registers we should provide users with permission a direct link to the
cash register management page.

To test, apply the patch and enable the UseCashRegisters and
EnablePointOfSale preferences.

If necessary, go to Administration -> Cash registers and remove any cash
registers for your library.

 - Log in to the staff interface as a user with "manage_cash_registers"
   permission.
 - Locate a patron who has outstanding fines.
 - Under Accounting -> Make a payment, click the "Pay" button next to a
   fine.
 - The page should show the message about missing cash registers with a
   button which take you directly to the "Add new cash register" form.
 - Perform the same check by selecting the checkbox next to a fine and
   clicking the "Pay amount" button and the "Pay selected" button.
 - Test the message shown at:
   - Tools -> Cashup registers.
   - Point of sale -> Register details
   - Point of sale -> Library details
 - Perform the same tests when logged in as a user without permission to
   manage cash registers. The messages shown in the previous steps
   should omit the button linking to cash register management.
Comment 2 Martin Renvoize 2020-08-12 13:51:42 UTC
Nice.. will test now :)
Comment 3 Martin Renvoize 2020-08-12 15:10:08 UTC
Created attachment 108127 [details] [review]
Bug 26194: Add link to cash register management from message about missing registers

In places where the interface warns the user about missing cash
registers we should provide users with permission a direct link to the
cash register management page.

To test, apply the patch and enable the UseCashRegisters and
EnablePointOfSale preferences.

If necessary, go to Administration -> Cash registers and remove any cash
registers for your library.

 - Log in to the staff interface as a user with "manage_cash_registers"
   permission.
 - Locate a patron who has outstanding fines.
 - Under Accounting -> Make a payment, click the "Pay" button next to a
   fine.
 - The page should show the message about missing cash registers with a
   button which take you directly to the "Add new cash register" form.
 - Perform the same check by selecting the checkbox next to a fine and
   clicking the "Pay amount" button and the "Pay selected" button.
 - Test the message shown at:
   - Tools -> Cashup registers.
   - Point of sale -> Register details
   - Point of sale -> Library details
 - Perform the same tests when logged in as a user without permission to
   manage cash registers. The messages shown in the previous steps
   should omit the button linking to cash register management.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 4 Martin Renvoize 2020-08-12 15:10:11 UTC
Created attachment 108128 [details] [review]
Bug 26194: (follow-up) Default to current branch

When adding a new register, it would be helpful to default to the
current logged in branch.
Comment 5 Martin Renvoize 2020-08-12 15:14:02 UTC
Works well.. I do wonder if the block could be factored out into an include.. but we could/should probably do that on another bug report.

I've added a followup to fix the 'Add register' form so it uses the PROCESS block from HTMLHelpers and as such we get the currently logged in branch selected in the dropdown by default (which with these links in place makes allot more sense than defaulting to the first one listed).

Signing off.
Comment 6 Martin Renvoize 2020-08-12 15:17:22 UTC
Minor niggle to be looked at during QA.. the alert box styling has changed from 'alert' to 'info' (yellow background to blue background).. and the button styling doesn't look completely right to me yet... ?
Comment 7 Katrin Fischer 2020-08-15 07:52:42 UTC
Created attachment 108313 [details] [review]
Bug 26194: Add link to cash register management from message about missing registers

In places where the interface warns the user about missing cash
registers we should provide users with permission a direct link to the
cash register management page.

To test, apply the patch and enable the UseCashRegisters and
EnablePointOfSale preferences.

If necessary, go to Administration -> Cash registers and remove any cash
registers for your library.

 - Log in to the staff interface as a user with "manage_cash_registers"
   permission.
 - Locate a patron who has outstanding fines.
 - Under Accounting -> Make a payment, click the "Pay" button next to a
   fine.
 - The page should show the message about missing cash registers with a
   button which take you directly to the "Add new cash register" form.
 - Perform the same check by selecting the checkbox next to a fine and
   clicking the "Pay amount" button and the "Pay selected" button.
 - Test the message shown at:
   - Tools -> Cashup registers.
   - Point of sale -> Register details
   - Point of sale -> Library details
 - Perform the same tests when logged in as a user without permission to
   manage cash registers. The messages shown in the previous steps
   should omit the button linking to cash register management.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 8 Katrin Fischer 2020-08-15 07:52:45 UTC
Created attachment 108314 [details] [review]
Bug 26194: (follow-up) Default to current branch

When adding a new register, it would be helpful to default to the
current logged in branch.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 9 Katrin Fischer 2020-08-15 07:53:20 UTC
(In reply to Martin Renvoize from comment #6)
> Minor niggle to be looked at during QA.. the alert box styling has changed
> from 'alert' to 'info' (yellow background to blue background).. and the
> button styling doesn't look completely right to me yet... ?

I think that's ok, because blue = info, not indicating a real problem. I beleive the button looks similar in other spots too.
Comment 10 Jonathan Druart 2020-08-18 15:47:51 UTC
Pushed to master for 20.11, thanks to everybody involved!
Comment 11 Lucas Gass 2020-09-04 15:22:25 UTC
enhancement will not be backported to 20.05.x