Bug 26273 - Expose cashup summary history for a cash register
Summary: Expose cashup summary history for a cash register
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Fines and fees (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Martin Renvoize (ashimema)
QA Contact: Testopia
URL:
Keywords:
: 26676 (view as bug list)
Depends on: 26274 27680 27930
Blocks: 27779
  Show dependency treegraph
 
Reported: 2020-08-21 13:59 UTC by Martin Renvoize (ashimema)
Modified: 2022-12-12 21:24 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
This enhancement adds a cashup history table at the bottom of the register details page. You can then use this table to display the full summary for any cashup that has taken place at this cash register.
Version(s) released in:
21.05.00
Circulation function:


Attachments
Bug 26273: Add historic cashups table to register page (3.35 KB, patch)
2021-02-01 16:44 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 26273: Add historic cashups table to register page (3.42 KB, patch)
2021-02-10 10:16 UTC, PTFS Europe Sandboxes
Details | Diff | Splinter Review
Bug 26273: (follow-up) Format dates and money correctly. (2.31 KB, patch)
2021-02-10 17:33 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 26273: Add historic cashups table to register page (3.49 KB, patch)
2021-02-11 08:11 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 26273: (follow-up) Format dates and money correctly. (2.31 KB, patch)
2021-02-11 08:11 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 26273: Add historic cashups table to register page (3.49 KB, patch)
2021-02-11 10:24 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 26273: (follow-up) Format dates and money correctly. (2.67 KB, patch)
2021-02-11 10:24 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 26273: (follow-up) Add 'Cashier' to the cashups table (2.92 KB, patch)
2021-02-11 10:24 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 26273: (follow-up) Add 'Cashier' to the cashups table (2.94 KB, patch)
2021-02-11 12:13 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 26273: Add historic cashups table to register page (3.56 KB, patch)
2021-02-11 16:02 UTC, ByWater Sandboxes
Details | Diff | Splinter Review
Bug 26273: (follow-up) Format dates and money correctly. (2.74 KB, patch)
2021-02-11 16:02 UTC, ByWater Sandboxes
Details | Diff | Splinter Review
Bug 26273: (follow-up) Add 'Cashier' to the cashups table (3.00 KB, patch)
2021-02-11 16:02 UTC, ByWater Sandboxes
Details | Diff | Splinter Review
Bug 26273: Add historic cashups table to register page (3.55 KB, patch)
2021-03-01 13:49 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 26273: (follow-up) Format dates and money correctly. (2.73 KB, patch)
2021-03-01 13:49 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 26273: (follow-up) Add 'Cashier' to the cashups table (3.00 KB, patch)
2021-03-01 13:49 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 26273: (QA follow-up) Check for null firstname (1.39 KB, patch)
2021-03-05 08:32 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 26273: (QA follow-up) Remove unrequired table_controls div (1.01 KB, patch)
2021-03-05 08:53 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 26273: (QA follow-up) Check for null firstname (1.39 KB, patch)
2021-03-05 11:19 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 26273: (QA follow-up) Remove unrequired table_controls div (1.01 KB, patch)
2021-03-05 11:19 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 26273: (QA follow-up) Add horizontal rule to distinguish tables (836 bytes, patch)
2021-03-05 11:19 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 26273: Add historic cashups table to register page (3.62 KB, patch)
2021-03-05 11:51 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 26273: (follow-up) Format dates and money correctly. (2.79 KB, patch)
2021-03-05 11:51 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 26273: (follow-up) Add 'Cashier' to the cashups table (3.06 KB, patch)
2021-03-05 11:51 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 26273: (QA follow-up) Check for null firstname (1.45 KB, patch)
2021-03-05 11:51 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 26273: (QA follow-up) Remove unrequired table_controls div (1.07 KB, patch)
2021-03-05 11:51 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 26273: (QA follow-up) Add horizontal rule to distinguish tables (893 bytes, patch)
2021-03-05 11:51 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 26273: (QA follow-up) Use _escape_str/price for escaping (3.58 KB, patch)
2021-03-11 13:59 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 26273: (QA follow-up) Use _escape_str/price for escaping (1.94 KB, patch)
2021-03-11 14:29 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 26273: (QA follow-up) Use escape_str/price for escaping (1.89 KB, patch)
2021-03-11 14:37 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 26273: Add historic cashups table to register page (3.96 KB, patch)
2021-03-11 15:33 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 26273: (follow-up) Format dates and money correctly. (2.79 KB, patch)
2021-03-11 15:33 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 26273: (follow-up) Add 'Cashier' to the cashups table (3.50 KB, patch)
2021-03-11 15:34 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 26273: (QA follow-up) Use escape_str/price for escaping (1.89 KB, patch)
2021-03-11 15:34 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 28273: Unit tests (3.91 KB, patch)
2021-05-03 12:59 UTC, Tomás Cohen Arazi (tcohen)
Details | Diff | Splinter Review
Bug 28273: Add Koha::Biblios->pickup_locations (1.50 KB, patch)
2021-05-03 12:59 UTC, Tomás Cohen Arazi (tcohen)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Renvoize (ashimema) 2020-08-21 13:59:43 UTC
With bug 26172 we allow for a nicely summarised display of cash register activity for the most recent cashup action.

We should somehow expose the ability to see past cashups in the same way.

I'm open to suggestions on how best to expose this... one thought that came to mind was to add 'next/previous' buttons to the summary modal so you could 'scroll' through previous cashups..
Comment 1 Sally 2021-01-05 15:00:47 UTC
This sounds like a great idea.  

My instinct would be to also have an index - perhaps where each linked summary is labelled with the cash up date?

A bit like this:  

05-01-2021 || Link to summary
01-01-2021 || Link to summary
22-12-2020 || Link to summary
15-12-2020 || Link to summary
08-12-2020 || Link to summary
01-12-2020 || Link to summary
29-11-2020 || Link to summary
26-11-2020 || Link to summary
13-11-2020 || Link to summary
04-11-2020 || Link to summary

We tend to seek out previous cash ups when there's a problem, so being able to quickly view an index of that till's cash ups to find the correct session would be great.  If we had 2-3 cash ups a week and we wanted to go back 6 months, just prev/next controls would be a little frustrating.

Or, if it's not too much work, a data table would do the job - then we could always use the search / sort controls?
Comment 2 Martin Renvoize (ashimema) 2021-01-26 12:07:28 UTC
*** Bug 26676 has been marked as a duplicate of this bug. ***
Comment 3 Martin Renvoize (ashimema) 2021-01-26 12:07:55 UTC
Katrin Fischer 2020-10-14 12:34:55 BST
At the moment when we do multiple cashups, there is no overview page to see the past ones. We can only see a bit of information on the last cash-ups.

It would be nice to have a way to list cashups for a timeframe for audit and other purposes.
Comment 4 Martin Renvoize (ashimema) 2021-02-01 16:44:51 UTC
Created attachment 116176 [details] [review]
Bug 26273: Add historic cashups table to register page

This patch adds a historic cashups table to the bottom of the register
transaction details page.  It will only display if one or more cashups
have taken place and contains links to allow display of the summary
detail modal for each cashup.

Test plan
1/ Enable UseCashRegisters
2/ Undertake a few transactions and cashups
3/ View the 'Register details' page
4/ Note the appearance of a 'Cashup history' section at the bottom of
the page
5/ Note that 'Summary' button displays the relevant modal
6/ Signoff
Comment 5 Martin Renvoize (ashimema) 2021-02-01 16:48:39 UTC
I'm looking for feedback on this one now.. I'm not entirely sure about the placement of the index.. whether the register details page is the right place or whether this warrants a page of it's own (but then.. where should it be linked from and what should it be called?)

The attached patch is a proof of concept for how we may achieve it however :)
Comment 6 PTFS Europe Sandboxes 2021-02-10 10:16:52 UTC
Created attachment 116640 [details] [review]
Bug 26273: Add historic cashups table to register page

This patch adds a historic cashups table to the bottom of the register
transaction details page.  It will only display if one or more cashups
have taken place and contains links to allow display of the summary
detail modal for each cashup.

Test plan
1/ Enable UseCashRegisters
2/ Undertake a few transactions and cashups
3/ View the 'Register details' page
4/ Note the appearance of a 'Cashup history' section at the bottom of
the page
5/ Note that 'Summary' button displays the relevant modal
6/ Signoff

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Comment 7 Sally 2021-02-10 10:25:49 UTC
The sign off is under my name, but both Daniel and I have been testing with it.  We both really like this.

We like the placement of the summaries, as we think it's easy for the staff to find and easy to use.

We particularly like that the filters for the datatable show automatically, and that you can sort/search by takings as well as date.

The date formatting is slightly unusual with the +00.00 at the end: e.g.  2021-02-10T10:04:56+00:00

But that's not a blocker for us - it's very useful to see the time and to be able to sort by it, in case the staff cash up multiple times in one day.
Comment 8 Martin Renvoize (ashimema) 2021-02-10 17:33:22 UTC
Created attachment 116685 [details] [review]
Bug 26273: (follow-up) Format dates and money correctly.

This patch adds the missing formatting for the Datetime and Amount
fields.
Comment 9 Martin Renvoize (ashimema) 2021-02-10 17:34:29 UTC
(In reply to Sally from comment #7)
> The sign off is under my name, but both Daniel and I have been testing with
> it.  We both really like this.
> 
> We like the placement of the summaries, as we think it's easy for the staff
> to find and easy to use.
> 
> We particularly like that the filters for the datatable show automatically,
> and that you can sort/search by takings as well as date.
> 
> The date formatting is slightly unusual with the +00.00 at the end: e.g. 
> 2021-02-10T10:04:56+00:00
> 
> But that's not a blocker for us - it's very useful to see the time and to be
> able to sort by it, in case the staff cash up multiple times in one day.

Thanks for testing, and good catch on the missing formatting.. I've added a followup not to take care of both the datetime formatting and the cashup amounts.
Comment 10 Martin Renvoize (ashimema) 2021-02-10 17:37:19 UTC
I meant to ask.. I could probably get at the staff user name for who carried out the cashup.. would that be helpful in the index table at all too?
Comment 11 Martin Renvoize (ashimema) 2021-02-11 08:11:07 UTC
Created attachment 116691 [details] [review]
Bug 26273: Add historic cashups table to register page

This patch adds a historic cashups table to the bottom of the register
transaction details page.  It will only display if one or more cashups
have taken place and contains links to allow display of the summary
detail modal for each cashup.

Test plan
1/ Enable UseCashRegisters
2/ Undertake a few transactions and cashups
3/ View the 'Register details' page
4/ Note the appearance of a 'Cashup history' section at the bottom of
the page
5/ Note that 'Summary' button displays the relevant modal
6/ Signoff

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Signed-off-by: Daniel Jones <daniel.jones@cheshiresharedservices.gov.uk>
Comment 12 Martin Renvoize (ashimema) 2021-02-11 08:11:10 UTC
Created attachment 116692 [details] [review]
Bug 26273: (follow-up) Format dates and money correctly.

This patch adds the missing formatting for the Datetime and Amount
fields.
Comment 13 Sally 2021-02-11 09:22:23 UTC
(In reply to Martin Renvoize from comment #10)
> I meant to ask.. I could probably get at the staff user name for who carried
> out the cashup.. would that be helpful in the index table at all too?

If it's not too much work, that'd be great!  (Or even just the borrowernumber.)
Comment 14 Martin Renvoize (ashimema) 2021-02-11 10:24:05 UTC
Created attachment 116697 [details] [review]
Bug 26273: Add historic cashups table to register page

This patch adds a historic cashups table to the bottom of the register
transaction details page.  It will only display if one or more cashups
have taken place and contains links to allow display of the summary
detail modal for each cashup.

Test plan
1/ Enable UseCashRegisters
2/ Undertake a few transactions and cashups
3/ View the 'Register details' page
4/ Note the appearance of a 'Cashup history' section at the bottom of
the page
5/ Note that 'Summary' button displays the relevant modal
6/ Signoff

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Signed-off-by: Daniel Jones <daniel.jones@cheshiresharedservices.gov.uk>
Comment 15 Martin Renvoize (ashimema) 2021-02-11 10:24:08 UTC
Created attachment 116698 [details] [review]
Bug 26273: (follow-up) Format dates and money correctly.

This patch adds the missing formatting for the Datetime and Amount
fields.

Test plan
1/ Apply patch and reload register page to re-display the cashups table
2/ Note that the 'Date' field now displays a nicely formatted date
without an offset.
3/ Note that the 'Amount' field now displays the number according to
your money formatting preferences (with 2 decimal places in most cases)
4/ Signoff
Comment 16 Martin Renvoize (ashimema) 2021-02-11 10:24:11 UTC
Created attachment 116699 [details] [review]
Bug 26273: (follow-up) Add 'Cashier' to the cashups table

This patch adds the 'Cashier' field as discussed on the bug report.

Test plan
1/ Apply patch and reload the register page to refresh the table
2/ Note that a 'Cashier' field now appears in the table
3/ Sorting and searching on 'Cashier' should work as expected
4/ Default sorting should remain as 'Date' order.
5/ Signoff
Comment 17 Martin Renvoize (ashimema) 2021-02-11 12:13:14 UTC
Created attachment 116710 [details] [review]
Bug 26273: (follow-up) Add 'Cashier' to the cashups table

This patch adds the 'Cashier' field as discussed on the bug report.

Test plan
1/ Apply patch and reload the register page to refresh the table
2/ Note that a 'Cashier' field now appears in the table
3/ Sorting and searching on 'Cashier' should work as expected
4/ Default sorting should remain as 'Date' order.
5/ Signoff
Comment 18 ByWater Sandboxes 2021-02-11 16:02:03 UTC
Created attachment 116771 [details] [review]
Bug 26273: Add historic cashups table to register page

This patch adds a historic cashups table to the bottom of the register
transaction details page.  It will only display if one or more cashups
have taken place and contains links to allow display of the summary
detail modal for each cashup.

Test plan
1/ Enable UseCashRegisters
2/ Undertake a few transactions and cashups
3/ View the 'Register details' page
4/ Note the appearance of a 'Cashup history' section at the bottom of
the page
5/ Note that 'Summary' button displays the relevant modal
6/ Signoff

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Signed-off-by: Daniel Jones <daniel.jones@cheshiresharedservices.gov.uk>

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Comment 19 ByWater Sandboxes 2021-02-11 16:02:05 UTC
Created attachment 116772 [details] [review]
Bug 26273: (follow-up) Format dates and money correctly.

This patch adds the missing formatting for the Datetime and Amount
fields.

Test plan
1/ Apply patch and reload register page to re-display the cashups table
2/ Note that the 'Date' field now displays a nicely formatted date
without an offset.
3/ Note that the 'Amount' field now displays the number according to
your money formatting preferences (with 2 decimal places in most cases)
4/ Signoff

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Comment 20 ByWater Sandboxes 2021-02-11 16:02:08 UTC
Created attachment 116773 [details] [review]
Bug 26273: (follow-up) Add 'Cashier' to the cashups table

This patch adds the 'Cashier' field as discussed on the bug report.

Test plan
1/ Apply patch and reload the register page to refresh the table
2/ Note that a 'Cashier' field now appears in the table
3/ Sorting and searching on 'Cashier' should work as expected
4/ Default sorting should remain as 'Date' order.
5/ Signoff

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Comment 21 Sally 2021-02-11 16:02:56 UTC
Both patches work as expected - cashier field, and date/time.
Comment 22 Katrin Fischer 2021-02-17 21:42:45 UTC
The dependency patch is not yet signed off - moving to BLOCKED for the moment until that is sorted.
Comment 23 Martin Renvoize (ashimema) 2021-03-01 13:49:41 UTC
Created attachment 117449 [details] [review]
Bug 26273: Add historic cashups table to register page

This patch adds a historic cashups table to the bottom of the register
transaction details page.  It will only display if one or more cashups
have taken place and contains links to allow display of the summary
detail modal for each cashup.

Test plan
1/ Enable UseCashRegisters
2/ Undertake a few transactions and cashups
3/ View the 'Register details' page
4/ Note the appearance of a 'Cashup history' section at the bottom of
the page
5/ Note that 'Summary' button displays the relevant modal
6/ Signoff

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Signed-off-by: Daniel Jones <daniel.jones@cheshiresharedservices.gov.uk>
Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Comment 24 Martin Renvoize (ashimema) 2021-03-01 13:49:44 UTC
Created attachment 117450 [details] [review]
Bug 26273: (follow-up) Format dates and money correctly.

This patch adds the missing formatting for the Datetime and Amount
fields.

Test plan
1/ Apply patch and reload register page to re-display the cashups table
2/ Note that the 'Date' field now displays a nicely formatted date
without an offset.
3/ Note that the 'Amount' field now displays the number according to
your money formatting preferences (with 2 decimal places in most cases)
4/ Signoff

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Comment 25 Martin Renvoize (ashimema) 2021-03-01 13:49:47 UTC
Created attachment 117451 [details] [review]
Bug 26273: (follow-up) Add 'Cashier' to the cashups table

This patch adds the 'Cashier' field as discussed on the bug report.

Test plan
1/ Apply patch and reload the register page to refresh the table
2/ Note that a 'Cashier' field now appears in the table
3/ Sorting and searching on 'Cashier' should work as expected
4/ Default sorting should remain as 'Date' order.
5/ Signoff

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Comment 26 Martin Renvoize (ashimema) 2021-03-01 13:50:33 UTC
Rebased against the now PQA dependency bug and set status back to SO
Comment 27 Katrin Fischer 2021-03-04 17:27:00 UTC
Some small things:

1) If there is no first name for the "cashier" the table will display "null", for example: null koha. A lot of libraries may use "functional" accounts where this is a likely scneario.

2) Quite nit-picky (I know!)... the heading "Cashup history" is really close to the "Details" button and further away form the table, much further than the heading of the same label to the table above. I think this does make it a little hard to understand the table structure at a quick glance.

Overall this works well, failing for 1) but happy to get something for 2)!
Comment 28 Martin Renvoize (ashimema) 2021-03-05 08:32:28 UTC
Created attachment 117787 [details] [review]
Bug 26273: (QA follow-up) Check for null firstname

This patch adds a test for firstname being defined before constructing
fullname from it.
Comment 29 Martin Renvoize (ashimema) 2021-03-05 08:40:16 UTC
(In reply to Katrin Fischer from comment #27)
> Some small things:
> 
> 1) If there is no first name for the "cashier" the table will display
> "null", for example: null koha. A lot of libraries may use "functional"
> accounts where this is a likely scenario.

Fixed in followup

> 2) Quite nit-picky (I know!)... the heading "Cashup history" is really close
> to the "Details" button and further away form the table, much further than
> the heading of the same label to the table above. I think this does make it
> a little hard to understand the table structure at a quick glance.

This appears to be something funky in the API driven datatables wrapper.. as such I'm tempted to open a distinct bug about it rather than fix it here as it'll affect both here, the Cities management page and the orders tables.
Comment 30 Martin Renvoize (ashimema) 2021-03-05 08:53:59 UTC
Created attachment 117793 [details] [review]
Bug 26273: (QA follow-up) Remove unrequired table_controls div

Looks like a copy/paste issue.. I don't believe we need this div at all
for the table to function as expected and adding it just creates uneeded
whitespace.
Comment 31 Martin Renvoize (ashimema) 2021-03-05 08:54:51 UTC
(In reply to Martin Renvoize from comment #29)
> This appears to be something funky in the API driven datatables wrapper.. as
> such I'm tempted to open a distinct bug about it rather than fix it here as
> it'll affect both here, the Cities management page and the orders tables.

I take that back.. somehow a spare div crept into the source in this template.. I've removed it in a followup :)
Comment 32 Katrin Fischer 2021-03-05 11:15:08 UTC
Still stuck with the nulls, sorry!

Also a little extra space between heading and "Display" could be nice. :)
Comment 33 Martin Renvoize (ashimema) 2021-03-05 11:19:35 UTC
Created attachment 117809 [details] [review]
Bug 26273: (QA follow-up) Check for null firstname

This patch adds a test for firstname being defined before constructing
fullname from it.
Comment 34 Martin Renvoize (ashimema) 2021-03-05 11:19:38 UTC
Created attachment 117810 [details] [review]
Bug 26273: (QA follow-up) Remove unrequired table_controls div

Looks like a copy/paste issue.. I don't believe we need this div at all
for the table to function as expected and adding it just creates uneeded
whitespace.
Comment 35 Martin Renvoize (ashimema) 2021-03-05 11:19:42 UTC
Created attachment 117811 [details] [review]
Bug 26273: (QA follow-up) Add horizontal rule to distinguish tables
Comment 36 Martin Renvoize (ashimema) 2021-03-05 11:20:29 UTC
try now
Comment 37 Katrin Fischer 2021-03-05 11:51:19 UTC
Created attachment 117829 [details] [review]
Bug 26273: Add historic cashups table to register page

This patch adds a historic cashups table to the bottom of the register
transaction details page.  It will only display if one or more cashups
have taken place and contains links to allow display of the summary
detail modal for each cashup.

Test plan
1/ Enable UseCashRegisters
2/ Undertake a few transactions and cashups
3/ View the 'Register details' page
4/ Note the appearance of a 'Cashup history' section at the bottom of
the page
5/ Note that 'Summary' button displays the relevant modal
6/ Signoff

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Signed-off-by: Daniel Jones <daniel.jones@cheshiresharedservices.gov.uk>
Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 38 Katrin Fischer 2021-03-05 11:51:23 UTC
Created attachment 117830 [details] [review]
Bug 26273: (follow-up) Format dates and money correctly.

This patch adds the missing formatting for the Datetime and Amount
fields.

Test plan
1/ Apply patch and reload register page to re-display the cashups table
2/ Note that the 'Date' field now displays a nicely formatted date
without an offset.
3/ Note that the 'Amount' field now displays the number according to
your money formatting preferences (with 2 decimal places in most cases)
4/ Signoff

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 39 Katrin Fischer 2021-03-05 11:51:27 UTC
Created attachment 117831 [details] [review]
Bug 26273: (follow-up) Add 'Cashier' to the cashups table

This patch adds the 'Cashier' field as discussed on the bug report.

Test plan
1/ Apply patch and reload the register page to refresh the table
2/ Note that a 'Cashier' field now appears in the table
3/ Sorting and searching on 'Cashier' should work as expected
4/ Default sorting should remain as 'Date' order.
5/ Signoff

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 40 Katrin Fischer 2021-03-05 11:51:31 UTC
Created attachment 117832 [details] [review]
Bug 26273: (QA follow-up) Check for null firstname

This patch adds a test for firstname being defined before constructing
fullname from it.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 41 Katrin Fischer 2021-03-05 11:51:34 UTC
Created attachment 117833 [details] [review]
Bug 26273: (QA follow-up) Remove unrequired table_controls div

Looks like a copy/paste issue.. I don't believe we need this div at all
for the table to function as expected and adding it just creates uneeded
whitespace.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 42 Katrin Fischer 2021-03-05 11:51:38 UTC
Created attachment 117834 [details] [review]
Bug 26273: (QA follow-up) Add horizontal rule to distinguish tables

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 43 Jonathan Druart 2021-03-11 10:00:44 UTC
+                        return data.escapeHtml();

It explodes if data is not defined (see bug 25293 for instance).

I think we should move the JS function '_escape_str' out of in acqui/parcel.tt to have it available from anywhere.
Comment 44 Martin Renvoize (ashimema) 2021-03-11 13:36:35 UTC
(In reply to Jonathan Druart from comment #43)
> +                        return data.escapeHtml();
> 
> It explodes if data is not defined (see bug 25293 for instance).
> 
> I think we should move the JS function '_escape_str' out of in
> acqui/parcel.tt to have it available from anywhere.

staff-global.js perhaps.. or a new variable_filter.js perhaps?
Comment 45 Martin Renvoize (ashimema) 2021-03-11 13:59:46 UTC
Created attachment 118125 [details] [review]
Bug 26273: (QA follow-up) Use _escape_str/price for escaping

This patch moves the _escape_str and _escape_price functions into the
staff-global js include and then uses them in the register page
Comment 46 Martin Renvoize (ashimema) 2021-03-11 14:01:38 UTC
staff-global already includes the afore used escapeHtml prototype extensions and is loaded on all pages... seemed good choice.

Tested change in register page and on parcel page too... all working still. :)
Comment 47 Jonathan Druart 2021-03-11 14:13:34 UTC
I am sorry Martin but I think this patch must be moved to its own bug report for backport. Maybe also remove the '_'?
I can do it if you want me to.
Comment 48 Martin Renvoize (ashimema) 2021-03-11 14:15:30 UTC
I can do it.. I was just hoping to avoid holding this bug up with another SO + QA cycle on a new bug.

Alas, I do agree with you really though.
Comment 49 Martin Renvoize (ashimema) 2021-03-11 14:29:58 UTC
Created attachment 118129 [details] [review]
Bug 26273: (QA follow-up) Use _escape_str/price for escaping

This patch moves the _escape_str and _escape_price functions into the
staff-global js include and then uses them in the register page
Comment 50 Martin Renvoize (ashimema) 2021-03-11 14:30:43 UTC
Done, bug 27930
Comment 51 Martin Renvoize (ashimema) 2021-03-11 14:37:18 UTC
Created attachment 118130 [details] [review]
Bug 26273: (QA follow-up) Use escape_str/price for escaping

This patch uses the global escape_str/escape_price functions in the register
page.
Comment 52 Martin Renvoize (ashimema) 2021-03-11 14:38:07 UTC
Just a rewording of the commit message to account for most of the actual change being moved to another bug ;)
Comment 53 Jonathan Druart 2021-03-11 15:33:53 UTC
Created attachment 118149 [details] [review]
Bug 26273: Add historic cashups table to register page

This patch adds a historic cashups table to the bottom of the register
transaction details page.  It will only display if one or more cashups
have taken place and contains links to allow display of the summary
detail modal for each cashup.

Test plan
1/ Enable UseCashRegisters
2/ Undertake a few transactions and cashups
3/ View the 'Register details' page
4/ Note the appearance of a 'Cashup history' section at the bottom of
the page
5/ Note that 'Summary' button displays the relevant modal
6/ Signoff

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Signed-off-by: Daniel Jones <daniel.jones@cheshiresharedservices.gov.uk>
Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Bug 26273: (QA follow-up) Remove unrequired table_controls div

Looks like a copy/paste issue.. I don't believe we need this div at all
for the table to function as expected and adding it just creates uneeded
whitespace.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Bug 26273: (QA follow-up) Add horizontal rule to distinguish tables

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 54 Jonathan Druart 2021-03-11 15:33:58 UTC
Created attachment 118150 [details] [review]
Bug 26273: (follow-up) Format dates and money correctly.

This patch adds the missing formatting for the Datetime and Amount
fields.

Test plan
1/ Apply patch and reload register page to re-display the cashups table
2/ Note that the 'Date' field now displays a nicely formatted date
without an offset.
3/ Note that the 'Amount' field now displays the number according to
your money formatting preferences (with 2 decimal places in most cases)
4/ Signoff

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 55 Jonathan Druart 2021-03-11 15:34:02 UTC
Created attachment 118151 [details] [review]
Bug 26273: (follow-up) Add 'Cashier' to the cashups table

This patch adds the 'Cashier' field as discussed on the bug report.

Test plan
1/ Apply patch and reload the register page to refresh the table
2/ Note that a 'Cashier' field now appears in the table
3/ Sorting and searching on 'Cashier' should work as expected
4/ Default sorting should remain as 'Date' order.
5/ Signoff

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Bug 26273: (QA follow-up) Check for null firstname

This patch adds a test for firstname being defined before constructing
fullname from it.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 56 Jonathan Druart 2021-03-11 15:34:06 UTC
Created attachment 118152 [details] [review]
Bug 26273: (QA follow-up) Use escape_str/price for escaping

This patch uses the global escape_str/escape_price functions in the register
page.
Comment 57 Jonathan Druart 2021-03-11 15:37:45 UTC
Pushed to master for 21.05, thanks to everybody involved!
Comment 58 Fridolin Somers 2021-03-19 14:50:15 UTC
Enhancement not pushed to 20.11.x
Comment 59 Tomás Cohen Arazi (tcohen) 2021-05-03 12:59:44 UTC Comment hidden (obsolete)
Comment 60 Tomás Cohen Arazi (tcohen) 2021-05-03 12:59:50 UTC Comment hidden (obsolete)