Account view RFC

This is a proposal to enhance the account view in Koha, specifically targeted towards the staff interface as a first step, but the same principles can be used for the OPAC at a later stage.
==Background==
The current view in the Accounts tab on the patron display in the staff interface is confusing to many users (staff). The Account view is separated into four tabs, and each row in accountlines is displayed as an individual fine/payment/writeoff etc. This makes it difficult to follow what has been paid for when, where there can be several rows between the actual fine and the payment received. There have also been problems with description being inconsistent between tabs, codes have been used rather than spelled out descriptions etc.
Improvement of the account system in Koha has been done on the backend side for several years, and the staff display have had some improvement in recent releases, but it is clear that there is need of an overhaul on how accounts are displayed at all, based on what staff actually want to see, and how they want it to work. To investigate this, and propose a solution, a series of workshops that focus on the user experience (UX) have been held.
==UX work==
There has to date been three UX workshops on the patron account view in the staff interface. The work has been driven by Stockholm University Library, but has also included participants from several other libraries and organizations, librarians as well as developers. Stockholm University Library has a long experience of working with user experience in systems development, and believe that the Koha community can benefit greatly from using UX methodologies in the development work.
The first workshop on the accounts view was held at the Swedish User Group meeting in Skövde, March 2019. About 20 people attended the workshop (mostly librarians), from both public, academic and special libraries. This was an introductory workshop that attempted to identify the problem areas, and find out if the issues where the same for all types of libraries. It was concluded that all attendees saw the account view as a problem area, with special attention towards:
*	The need for overview when there are a lot of rows is desperately missing
*	The lack of linking between fines and payments/writeoff (the detail view added in 18.11 did a little to alleviate this, but was seen more as patching the problem, not solving the underlying issue).
*	The account view is not intuitive, and difficult to use
*	The use of codes (F, FU etc.) rather than descriptions. Later fixed in 19.05
*	Descriptions are inconsistent across tabs. Since fixed in 19.05
The second UX workshop was held at Stockholm University Library in September 2019, and included a variety of staff. Using the general problem areas identified in the first workshop, the first part of the workshop was focused on what the staff wanted from the account view, identifying their needs. In the second part of the workshop the attendees were asked to disregard the current account display and instead draw their proposed solutions on a whiteboard. After much inspired drawing and discussion, a general solution was agreed upon.
The third UX workshop was held at the Koha hackfest in Marseille in early October 2019. Here the same workshop that was performed at Stockholm University Library was repeated. Conclusions were similar to those found at Stockholm University, but with added use cases by different members of the community, the proposed solution from Stockholm was found to not completely comply with all the different needs and was therefore adjusted accordingly.
==A new accounts display==
The result from both workshops was that there is a need to rework the account display into two new views: a transaction view and an account view. On both views there is a need to group fines/fees and payments/writeoffs, to make it clear how they are connected. This also means that the current tabs should be removed, and that there should instead be a function to filter out fines (and linked payments/writeoffs) that have been fully paid. Each view is discussed in detail below, with a working prototype for each below. Please note that the prototype is merely an aide in visualizing the views, and of more information can be expanded; details can and will of course change in the actual implementation.
Prototype home: https://ext.prototyp.sub.su.se/#g=1&p=home
==Account view==
The view is based on two levels of information: fines/fees and transactions (payments/writeoffs), where it is grouped on the fines/fees on the first level, and transactions on the second. To improve overview of fines, only the first level is shown as a default, where each row can be expanded below to show the transactions connected to the specific fine. In order to have a smaller table, making it easier to overview, the two layers should preferably have different columns. (If this is not achievable, then a larger table with more columns, where both levels are the same, could be an option.)
Account view prototype: https://ext.prototyp.sub.su.se/#g=1&p=accountview
Level 1: Transactions (payments/writeoffs)	 	 	 	 	 	
Type 	Title* 	Fine creation date 	Return/renew date 	Amount	Amountoutstanding	Actions (button)**
Level 2: account (fines/fees) 	 	 	 	 	 	
Type of change 	Transaction date	Transaction details	Transaction amount	 	 	
Level 3: title (item) information 	 	 	 	 	 	
Callnumber 	Barcode 	Enumchron 	Home library 	 	 	
 * More information about the title is in the prototype provided on level 2, shown as an example on how information can be expanded. 
 This info could possibly be placed in the title column of level 1 instead.
 ** One button, collecting what is today different buttons: Pay, Void etc.
Click the transaction (“Overdue fine”) or the title ("Pedagogik: en grundbok ...") in the prototype to expand the separate sub-levels.
To the left of the columns there should be a checkbox, to allow one or more fines/fees to be paid/written-off at the same time, just like the function today. Payment/writeoff buttons below the table also like today. This is not added to the prototype.
==Transaction view==
A view that is based on transactions, where account details (the fines and fees) are displayed below each transaction. A reversed view of the account view described above, transactions are first level, with account data is second. The second level is hidden as default, but will expand below when the user clicks on a transaction.
Transaction view prototype: https://ext.prototyp.sub.su.se/#g=1&p=transactionview
Level 1: Transactions (payments/writeoffs)	 	 	
Transaction date (timestamp?) 	Type of change	Transaction details (How? Where? Who?)	Total/sum
Level 2: account (fines/fees) 	 	 	
Type 	Title 	Amount 	This transaction
Level 3: Title (item information) 	 	 	
Callnumber 	Barcode 	Enumchron 	
Click type of change (“Payment”) or the title to view the different levels. 
At the bottom of the table (or beneath it) a total should be displayed. The following three columns/data should display: Credit, Debit & Balance. This is not added to the prototype.
Category:RFCs