Bug 28389

Summary: One should be able to see details for refunds on the register summary page
Product: Koha Reporter: Martin Renvoize <martin.renvoize>
Component: Fines and feesAssignee: Martin Renvoize <martin.renvoize>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: kyle, lucas, m.de.rooy, oleonard, sally.healey
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
21.11.00
Bug Depends on: 28390    
Bug Blocks: 13985    
Attachments: Bug 28389: Add 'Details' link to refund type payout lines in POS
Bug 28389: Add 'Details' link to refund type payout lines in POS
Bug 28389: Add 'Details' link to refund type payout lines in POS
Bug 28389: Add 'Details' link to refund type payout lines in POS
Bug 28389: Add 'Details' link to refund type payout lines in POS

Description Martin Renvoize 2021-05-19 13:22:41 UTC
If you issue a refund for an charge and then view the transactions on the register page, you currently have no way of displaying what the refund was against.
Comment 1 Martin Renvoize 2021-05-19 13:26:01 UTC
Created attachment 121175 [details] [review]
Bug 28389: Add 'Details' link to refund type payout lines in POS

This patch adds a link to the account-details page for refund type
payout lines displaying on the register details page of cash management.
Comment 2 Lucas Gass 2021-05-19 16:41:59 UTC
Created attachment 121189 [details] [review]
Bug 28389: Add 'Details' link to refund type payout lines in POS

This patch adds a link to the account-details page for refund type
payout lines displaying on the register details page of cash management.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Comment 3 Lucas Gass 2021-05-19 16:42:50 UTC
This works well and should defenitly come in handy!
Comment 4 Marcel de Rooy 2021-07-09 06:40:11 UTC
Just wondering about this kind of naming:

debit.credit.description
Comment 5 Marcel de Rooy 2021-07-09 06:43:16 UTC
                                <td>[%- PROCESS account_type_description account=debit.credit -%]</td>
                                    [%- IF debit.credit.description %][% debit.credit.description | html %][%- END -%]
                                    [%- IF ( debit.credit.itemnumber ) -%] (<a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% debit.credit.item.biblionumber | uri %]&amp;itemnumber=[% debit.credit.itemnumber | uri %]">[% debit.credit.item.biblio.title | html %]</a>)[%- END -%]
                                <td>[% debit.credit.amount | $Price %]</td>

This does not look good to me at first glance.
You remove <td> and move data outside data tags?
Please explain/correct.
Comment 6 Martin Renvoize 2021-08-05 10:32:11 UTC
Created attachment 123477 [details] [review]
Bug 28389: Add 'Details' link to refund type payout lines in POS

This patch adds a link to the account-details page for refund type
payout lines displaying on the register details page of cash management.

Test plan
1/ Enable 'UseCashRegisters'
2/ Add some transactions with at least one including a 'Refund'
3/ Look at the transaction history for the current register (Tools >
Cash management > Transaction history for X)
4/ Note the refund line does not contain a link to 'Details'
5/ Apply the patch
6/ The refund line should now have a 'Details' button on the right.
7/ Bonus points, perform a cashup and then search for older transactions
and check the 'Details' button appears in this table too.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Comment 7 Martin Renvoize 2021-08-05 10:33:13 UTC
(In reply to Marcel de Rooy from comment #5)
>                                 <td>[%- PROCESS account_type_description
> account=debit.credit -%]</td>
>                                     [%- IF debit.credit.description %][%
> debit.credit.description | html %][%- END -%]
>                                     [%- IF ( debit.credit.itemnumber ) -%]
> (<a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[%
> debit.credit.item.biblionumber | uri %]&amp;itemnumber=[%
> debit.credit.itemnumber | uri %]">[% debit.credit.item.biblio.title | html
> %]</a>)[%- END -%]
>                                 <td>[% debit.credit.amount | $Price %]</td>
> 
> This does not look good to me at first glance.
> You remove <td> and move data outside data tags?
> Please explain/correct.

Good catch, my brain was clearly on a go slow there.

I've rebased the patch, added a more details test plan and fixed an additional error with regards the historical transactions table not adding this field.
Comment 8 Martin Renvoize 2021-08-05 10:44:00 UTC
Created attachment 123479 [details] [review]
Bug 28389: Add 'Details' link to refund type payout lines in POS

This patch adds a link to the account-details page for refund type
payout lines displaying on the register details page of cash management.

Test plan
1/ Enable 'UseCashRegisters'
2/ Add some transactions with at least one including a 'Refund'
3/ Look at the transaction history for the current register (Tools >
Cash management > Transaction history for X)
4/ Note the refund line does not contain a link to 'Details'
5/ Apply the patch
6/ The refund line should now have a 'Details' button on the right.
7/ Bonus points, perform a cashup and then search for older transactions
and check the 'Details' button appears in this table too.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Comment 9 Katrin Fischer 2021-10-10 14:46:01 UTC
Created attachment 126023 [details] [review]
Bug 28389: Add 'Details' link to refund type payout lines in POS

This patch adds a link to the account-details page for refund type
payout lines displaying on the register details page of cash management.

Test plan
1/ Enable 'UseCashRegisters'
2/ Add some transactions with at least one including a 'Refund'
3/ Look at the transaction history for the current register (Tools >
Cash management > Transaction history for X)
4/ Note the refund line does not contain a link to 'Details'
5/ Apply the patch
6/ The refund line should now have a 'Details' button on the right.
7/ Bonus points, perform a cashup and then search for older transactions
and check the 'Details' button appears in this table too.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 10 Jonathan Druart 2021-10-15 09:29:17 UTC
Pushed to master for 21.11, thanks to everybody involved!