Bug 26160

Summary: Add column configuration to the Point of sale, Items for purchase table
Product: Koha Reporter: Martin Renvoize <martin.renvoize>
Component: Fines and feesAssignee: Martin Renvoize <martin.renvoize>
Status: Pushed to master --- QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: jonathan.druart, lucas, oleonard, sally.healey
Version: master   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Small patch
Text to go in the release notes:
Version(s) released in:
20.11.00
Bug Depends on: 23354    
Bug Blocks: 26189    
Attachments: Bug 26160: Make POS items table configurable
Bug 26160: Make POS items table configurable
Bug 26160: Make POS items table configurable
Bug 26160: (follow-up) Improve styling

Description Martin Renvoize 2020-08-06 12:11:41 UTC
Some people may want the CODE field to appear, whilst others are happy with just the Description.. we should allow for this.
Comment 1 Martin Renvoize 2020-08-06 13:51:26 UTC
Created attachment 107892 [details] [review]
Bug 26160: Make POS items table configurable
Comment 2 ByWater Sandboxes 2020-08-10 15:04:45 UTC
Created attachment 108007 [details] [review]
Bug 26160: Make POS items table configurable

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Comment 3 Sally 2020-08-10 15:11:50 UTC
Test Plan:

1)  System preference:  EnablePointOfSale - set to Enable
2)  System preference:  UseCashRegisters - set to Use
3)  Administration > Accounting > Cash registers - create a new cash register for the library you're logged in as
4)  Administration > Accounting > Debit types - create at least one debit type
5)  Home > Point of sale - verify that all four columns exist in the Items for purchase table:  Code, Description, Cost, Action
6)  Administration > Additional parameters > Table settings > Point of sale - change which columns can be hidden and/or toggled
7)  Home > Point of sale - verify that your choices have been implemented (columns are hidden, columns can be toggled, columns can't be toggled)
8) Repeat steps 6 and 7 for different combinations, checking that they all work.

Works great, signing off.
Comment 4 Katrin Fischer 2020-08-10 20:07:47 UTC
I think we should by default not print/export the Actions column, but this is currently not handled consistenty on other tables - it doesn't print for itemtypes, but it does for libraries. So not failing solely for this reason.

This might also need some additional styling work - I filed bug 26189 for that as the display is not perfect right now either.
Comment 5 Katrin Fischer 2020-08-10 20:09:25 UTC
Created attachment 108014 [details] [review]
Bug 26160: Make POS items table configurable

1)  System preference:  EnablePointOfSale - set to Enable
2)  System preference:  UseCashRegisters - set to Use
3)  Administration > Accounting > Cash registers - create a new cash register for the library you're logged in as
4)  Administration > Accounting > Debit types - create at least one debit type
5)  Home > Point of sale - verify that all four columns exist in the Items for purchase table:  Code, Description, Cost, Action
6)  Administration > Additional parameters > Table settings > Point of sale - change which columns can be hidden and/or toggled
7)  Home > Point of sale - verify that your choices have been implemented (columns are hidden, columns can be toggled, columns can't be toggled)
8) Repeat steps 6 and 7 for different combinations, checking that they all work.

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

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Added Sally's test plan.
Comment 6 Martin Renvoize 2020-08-11 07:22:17 UTC
(In reply to Katrin Fischer from comment #4)
> I think we should by default not print/export the Actions column, but this
> is currently not handled consistenty on other tables - it doesn't print for
> itemtypes, but it does for libraries. So not failing solely for this reason.
> 
> This might also need some additional styling work - I filed bug 26189 for
> that as the display is not perfect right now either.

I actually asked on IRC about removing the export/print option entirely as I don't feel you would want to do that here.. but I was warned against it as it would entail changing more base code in KohaTable. I may open another bug for that sometime soon however.

Thanks for the QA. 😀
Comment 7 Jonathan Druart 2020-08-12 10:20:33 UTC
It does not display nicely for me: https://snipboard.io/irsbW8.jpg
Comment 8 Martin Renvoize 2020-08-12 11:13:29 UTC
(In reply to Jonathan Druart from comment #7)
> It does not display nicely for me: https://snipboard.io/irsbW8.jpg

Katrin raised this as another bug, styling issues were present prior to this bug (I've not managed to work out how to resolve them and have asked for some help on IRC)
Comment 9 Martin Renvoize 2020-08-12 12:59:35 UTC
Created attachment 108102 [details] [review]
Bug 26160: (follow-up) Improve styling
Comment 10 Martin Renvoize 2020-08-12 13:00:45 UTC
Minor improvements above to make dataTables styling more consistent when found within a 'fieldset class="rows"' element..

Still needs some work to get the alignment working but I've hit a dead end.. hoping someone can take a look and help.
Comment 11 Jonathan Druart 2020-08-12 13:26:38 UTC
Can you move your patch to bug 26189 please?
Comment 12 Martin Renvoize 2020-08-12 13:32:24 UTC
(In reply to Jonathan Druart from comment #11)
> Can you move your patch to bug 26189 please?

Done, thanks :)
Comment 13 Jonathan Druart 2020-08-13 05:57:59 UTC
Pushed to master for 20.11, thanks to everybody involved!
Comment 14 Lucas Gass 2020-08-17 15:09:32 UTC
Enhancement will bot be backported to 20.05.x