web client: total billed and total paid/created show activity for bills no longer on patron record

Bug #1772955 reported by Kathy Lussier
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Evergreen
Medium
Unassigned
3.4
Medium
Unassigned
3.5
Medium
Unassigned
3.6
Medium
Unassigned

Bug Description

Evergreen version: master

At the top of the patron's bills screen, there is a line with Total Owed, Total Billed, and Total Paid/Credited that should display totals for all of the bills listed in this interface. However, the total billed and total paid/credited fields (probably total owed too) display totals that include bills that have already been fully paid.

To replicate this issue:
1. Retrieve a patron with bills on their account. I used Robert Lopez in the Concerto dataset
2. Pay off some or all of the bills on the patron record.
3. Note that Total Billed will continue to display the full total that previously displayed. The total paid/credited will display what you just paid.
4. Log out of the client, log back in, and retrieve the same patron record. You will continue to see these same totals for these fields, even though they cover bills that are no longer listed as current bills.

A screencast showing this behavior can be seen at https://drive.google.com/file/d/1Gd01xSNF_m8FASypX3rJiD_5Vam8-GsM/view

Revision history for this message
Geoff Sams (gsams) wrote :

I can confirm this behavior on master, following these exact steps.

Changed in evergreen:
status: New → Confirmed
Mike Risher (mrisher)
Changed in evergreen:
assignee: nobody → Mike Risher (mrisher)
Revision history for this message
Mike Risher (mrisher) wrote :
Changed in evergreen:
assignee: Mike Risher (mrisher) → nobody
tags: added: pullrequest
Revision history for this message
Dawn Dale (ddale) wrote :

 have tested this code and consent to signing off on it with my name, Dawn Dale and my email address, <email address hidden>.

Changed in evergreen:
milestone: none → 3.4.3
tags: added: signedoff
Changed in evergreen:
milestone: 3.4.3 → 3.4.4
Galen Charlton (gmc)
tags: added: needsrepatch
removed: signedoff
Revision history for this message
Galen Charlton (gmc) wrote :

The proposed patch only works as expected if the list of billings that the user owes money on fits in one grid page. If the user has more billings than that, paging through the rows will cause the total billed, owed, and paid values to fluctuate based on the billings that are currently displayed.

I think the underlying problem is that the database view that the summary amounts is taken from, money.open_usr_summary, says the following: "give me the totals for all transactions that are still open that ever had billings on it". Instead, for this interface the desired view would be more like "give me the totals for all transactions that are still open and do not have a balanced owed of zero".

Consequently, I propose as a more durable fix either changing the definition of money.open_usr_summary (but might that break any reports that depend on the current definition of the view) or create a new view called something like money.open_having_balances_usr_summary.

Changed in evergreen:
milestone: 3.4.4 → 3.5.1
Revision history for this message
Mike Rylander (mrylander) wrote :

I agree with the approach Galen suggest of a new peer to money.open_usr_summary that adds "AND balance_owed > 0.0" to the WHERE clause. The two views would then provide "today" and "for all time" perspectives.

It looks like the view definition and IDL class block, along with a one-line change to use the new view rather than 'mous' via pcrud, are all that's needed.

I'll put something together quickly for review.

Changed in evergreen:
assignee: nobody → Mike Rylander (mrylander)
Revision history for this message
Mike Rylander (mrylander) wrote :

There is a branch available here: https://git.evergreen-ils.org/?p=working/Evergreen.git;a=shortlog;h=refs/heads/user/miker/lp-1772955-only-show-totals-when-xact-has-balance

From the commit message:

This commit adds a new view and IDL definition that shows the total owed/paid/balance for transactions that have a balance other than 0. This new view is used in the patron summary bar, and access is provided wherever the all-open-transactions version is available in case we want to move to the new one elsewhere.

Changed in evergreen:
assignee: Mike Rylander (mrylander) → nobody
tags: removed: needsrepatch
Changed in evergreen:
milestone: 3.5.1 → 3.5.2
Revision history for this message
Ruth Frasur (rfrasur) wrote :

This works. I have tested this code and consent to signing off on it with my name, Ruth Frasur and my email address, <email address hidden>.

tags: added: signedoff
Changed in evergreen:
milestone: 3.5.2 → 3.6.1
Changed in evergreen:
milestone: 3.6.1 → 3.6.2
Jason Boyer (jboyer)
Changed in evergreen:
assignee: nobody → Jason Boyer (jboyer)
Jason Boyer (jboyer)
Changed in evergreen:
milestone: 3.6.2 → 3.7-beta
status: Confirmed → Fix Committed
Jason Boyer (jboyer)
Changed in evergreen:
assignee: Jason Boyer (jboyer) → nobody
tags: removed: webstaffclient
Changed in evergreen:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers