Bug 24665 - Add ability to run cash register report with new cash register feature
Summary: Add ability to run cash register report with new cash register feature
Status: Pushed to master
Alias: None
Product: Koha
Classification: Unclassified
Component: Reports (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Martin Renvoize
QA Contact: Testopia
URL:
Keywords:
Depends on: 24786
Blocks: 13985
  Show dependency treegraph
 
Reported: 2020-02-14 14:44 UTC by Kelly McElligott
Modified: 2020-11-16 22:18 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Who signed the patch off:
Text to go in the release notes:
This enhancement exposes the ability to refine the cash register report by cash register the transactions have taken place upon if you are using the 'UseCashRegisters' feature.
Version(s) released in:
20.11.00


Attachments
Bug 24665: Add support for filtering by cash register (4.17 KB, patch)
2020-07-21 13:54 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 24665: Add support for filtering by cash register (4.26 KB, patch)
2020-07-21 16:17 UTC, ByWater Sandboxes
Details | Diff | Splinter Review
Bug 24665: Add support for filtering by cash register (4.19 KB, patch)
2020-11-03 09:27 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 24665: Add support for filtering by cash register (4.60 KB, patch)
2020-11-03 22:31 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 24665: Add support for filtering by cash register (4.58 KB, patch)
2020-11-06 12:53 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 24665: (QA follow-up) Fix selection default (7.76 KB, patch)
2020-11-06 12:53 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 24665: (QA follow-up) Add tests for 'selected' (1.81 KB, patch)
2020-11-06 16:29 UTC, Martin Renvoize
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Kelly McElligott 2020-02-14 14:44:39 UTC
With the introduction of Cash Registers in 19.11, it would be ideal if a library could run the "Cash register" report (found under Statistic Wizard in Reports) and specifically choose to refine the report to a specific Cash Register.
Comment 1 Martin Renvoize 2020-03-06 17:01:59 UTC
What did you have in mind Kelly...

I must admit, I've never really used that report.  Having just taken a look at it, are you simply suggesting adding the ability to limit the results by a particular cash register via a select menu?
Comment 2 Martin Renvoize 2020-07-21 13:54:48 UTC
Created attachment 107150 [details] [review]
Bug 24665: Add support for filtering by cash register
Comment 3 Martin Renvoize 2020-07-21 13:55:42 UTC
Didn't get much of a brief here, so I've just added filtering for now, but let me know what additional requirements you might have.. I wasn't sure if you also wanted it in the standard output of the report too?
Comment 4 ByWater Sandboxes 2020-07-21 16:17:49 UTC
Created attachment 107164 [details] [review]
Bug 24665: Add support for filtering by cash register

Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com>
Comment 5 Kelly McElligott 2020-07-21 16:20:27 UTC
Martin,
Great!  This will be helpful to those libraries that use this built in report!  Of course any other type of report if needed can be created using MySql in the Koha report module.
Comment 6 Katrin Fischer 2020-08-16 22:26:19 UTC
Blocked by depending bug 24786 currently in need of a sign-off!
Comment 7 Martin Renvoize 2020-10-01 13:42:55 UTC
Dont' suppose you fancied testing/signing off on bug 24786 did you Kelly?  It's a dependency here so you effectively tested it whilst testing this one.
Comment 8 Martin Renvoize 2020-11-03 09:27:58 UTC
Created attachment 112901 [details] [review]
Bug 24665: Add support for filtering by cash register

Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com>
Comment 9 Martin Renvoize 2020-11-03 09:28:13 UTC
Rebased, ready for QA
Comment 10 Katrin Fischer 2020-11-03 22:31:32 UTC
Created attachment 112960 [details] [review]
Bug 24665: Add support for filtering by cash register

This patch makes it possible to filter on cash register
on the cash register statistics page.

To test:
- Activate UseCashRegisters
- Create a cash register or more to use
- Create some manual fees and fines
- Pay some of them off
- Go to Tools > Cash register statistics
- Test if the new filter for cash registers works as it should

Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 11 Jonathan Druart 2020-11-06 10:26:26 UTC
"--None--" is actually a "All" filter.
Should not it be "All" or "" instead?
Comment 12 Martin Renvoize 2020-11-06 12:24:19 UTC
(In reply to Jonathan Druart from comment #11)
> "--None--" is actually a "All" filter.
> Should not it be "All" or "" instead?

Hmm, fair comment.. challenge is that the default value comes from the html_helper.

I've already worked around this once in the dependency bug as the same issue was present on the login page (i.e Library default vs '--None--'.

I'll take a look at simplifying it here
Comment 13 Martin Renvoize 2020-11-06 12:53:22 UTC
Created attachment 113247 [details] [review]
Bug 24665: Add support for filtering by cash register

This patch makes it possible to filter on cash register
on the cash register statistics page.

To test:
- Activate UseCashRegisters
- Create a cash register or more to use
- Create some manual fees and fines
- Pay some of them off
- Go to Tools > Cash register statistics
- Test if the new filter for cash registers works as it should

Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 14 Martin Renvoize 2020-11-06 12:53:26 UTC
Created attachment 113248 [details] [review]
Bug 24665: (QA follow-up) Fix selection default

This patch updates the html_helper for the cash register selection block
to remove the 'empty option' such that it can be correclty set for each
select case and updates all existing cases where we used the process
block previously to include the relevant blank option '-- Select an
option --', '-- None --', 'Library default' and finally the new '-- All
--' options introduced with this bug.
Comment 15 Martin Renvoize 2020-11-06 12:53:58 UTC
:) - Much cleaner now.
Comment 16 Jonathan Druart 2020-11-06 14:56:05 UTC
Pushed to master for 20.11, thanks to everybody involved!
Comment 17 Martin Renvoize 2020-11-06 16:29:00 UTC
Created attachment 113261 [details] [review]
Bug 24665: (QA follow-up) Add tests for 'selected'

Add a unit test to prove the 'selected' param passed to
Koha::Template::Plugin::Registers is adhered to.
Comment 18 Jonathan Druart 2020-11-09 10:44:06 UTC
(In reply to Martin Renvoize from comment #17)
> Created attachment 113261 [details] [review] [review]
> Bug 24665: (QA follow-up) Add tests for 'selected'
> 
> Add a unit test to prove the 'selected' param passed to
> Koha::Template::Plugin::Registers is adhered to.

Pushed to master for 20.11.
Comment 19 Lucas Gass 2020-11-16 22:18:24 UTC
enhancement will not be backported to 20.05.x