Bug 23633

Summary: Filter out historical charges by default on a users 'your charges' page
Product: Koha Reporter: Martin Renvoize (ashimema) <martin.renvoize>
Component: OPACAssignee: Martin Renvoize (ashimema) <martin.renvoize>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: fiona.borthwick
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:
19.11.00
Circulation function:
Attachments: Bug 23633: Hide paid transactions by default on the OPAC
Bug 23633: Hide paid transactions by default on the OPAC
Bug 23633: Hide paid transactions by default on the OPAC

Description Martin Renvoize (ashimema) 2019-09-18 07:57:32 UTC
The 'your charges' OPAC page display all charges (paid for or otherwise) that the user has ever had.

It's also the page where, if enabled, a user can initiate an online payment. If there's is a large history of paid charges displayed then it can be cumbersome to pick out the charges owed and scroll to the bottom of the page to reach the pay now buttons.

I propose we filter the table by default to just outstanding account lines and allow the full view via a button/checkbox.
Comment 1 Martin Renvoize (ashimema) 2019-10-22 11:41:11 UTC
Created attachment 94532 [details] [review]
Bug 23633: Hide paid transactions by default on the OPAC

This patch adds filtering on paid for type transactions to the OPAC
accounts page.  The filtering is enabled by default but may be toggled
to show historical transactions.
Comment 2 Martin Renvoize (ashimema) 2019-10-22 11:44:13 UTC
Test plan, 

1) Select a patron with a number of paid for and not paid for transactions over a period of time.
2) Navigate to their 'accounts' page in the OPAC
3) Note that paid for transactions are filtered on page load
4) Click the 'Show all transactions' filter button to display all transactions
5) Toggle the filter and note it works both ways

Bonus points
1) Check that it works with and without online (paypal and plugin) payments enabled.
2) Check that it works with outstanding credits on the account.
Comment 3 Owen Leonard 2019-10-22 15:35:21 UTC
Created attachment 94582 [details] [review]
Bug 23633: Hide paid transactions by default on the OPAC

This patch adds filtering on paid for type transactions to the OPAC
accounts page.  The filtering is enabled by default but may be toggled
to show historical transactions.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 4 Katrin Fischer 2019-10-24 06:23:54 UTC
Created attachment 94646 [details] [review]
Bug 23633: Hide paid transactions by default on the OPAC

This patch adds filtering on paid for type transactions to the OPAC
accounts page.  The filtering is enabled by default but may be toggled
to show historical transactions.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 5 Katrin Fischer 2019-10-24 06:24:44 UTC
I really like this change. I'd also suggest to make 'show only unpaid' the default on the staff side too (separate bug).
Comment 6 Martin Renvoize (ashimema) 2019-10-24 10:00:13 UTC
Nice work!

Pushed to master for 19.11.00