Bug 29287

Summary: Display of funds on acquisitions home is not consistent with display on funds page
Product: Koha Reporter: Nick Clemens <nick>
Component: AcquisitionsAssignee: Nick Clemens <nick>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: andrewfh, kyle, victor
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
22.05.00,21.11.04,21.05.13
Bug Depends on: 23767    
Bug Blocks: 31367    
Attachments: Bug 29287: Add child funds to display of parent funds on acqui home
Bug 29287: Add child funds to display of parent funds on acqui home
Bug 29287: Add child funds to display of parent funds on acqui home
Bug 29287: Add child funds to display of parent funds on acqui home

Description Nick Clemens 2021-10-20 17:26:53 UTC
Acquisitions home does not have a place for totaling the child funds into the parent funds. When funds are collapsed it can appear nothing is spent

The total available also does not subtract any money spent from child funds
Comment 1 Katrin Fischer 2021-10-20 18:46:08 UTC
The child and parent funds are handled totally separately as you can spend on each level, but it has made things quite confusing a lot of times.

I believe the currnet design if partially due to how the totals are calculated/changed when filtering on the table?
Comment 2 Nick Clemens 2021-10-20 18:48:37 UTC
Created attachment 126595 [details] [review]
Bug 29287: Add child funds to display of parent funds on acqui home
Comment 3 Nick Clemens 2021-10-20 18:52:32 UTC
(In reply to Katrin Fischer from comment #1)
> The child and parent funds are handled totally separately as you can spend
> on each level, but it has made things quite confusing a lot of times.
> 
> I believe the currnet design if partially due to how the totals are
> calculated/changed when filtering on the table?

Yes, what I have done in this patch is to add new display, with a different class

In the context of this page, 'total_amount' means 'an amount to be included in the totals' 
I introduce 'inclusive_amount' which is for display only

Further it adjusts the final column to show available funds after child fund are subtracted
Comment 4 Andrew Fuerste-Henry 2022-01-12 17:12:29 UTC
To test:
1 - have a budget with at least 3 funds, one of which is a sub-fund to another
2 - create and receive orders such that each fund has one expected and one complete order
3 - go to acqui-home.pl, compare values to those found on aqbudgets.pl, find them different
4 - apply patch, reload pages
5 - compare acqui-home.pl and aqbudgets.pl again, be joyful
Comment 5 Andrew Fuerste-Henry 2022-01-12 17:15:06 UTC
Created attachment 129356 [details] [review]
Bug 29287: Add child funds to display of parent funds on acqui home

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Comment 6 Andrew Fuerste-Henry 2022-02-09 20:17:38 UTC
Created attachment 130410 [details] [review]
Bug 29287: Add child funds to display of parent funds on acqui home

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>

Signed-off-by: Michael Sutherland <sudrland@vt.edu>
Comment 7 Jonathan Druart 2022-02-21 14:44:29 UTC
Created attachment 130963 [details] [review]
Bug 29287: Add child funds to display of parent funds on acqui home

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>

Signed-off-by: Michael Sutherland <sudrland@vt.edu>

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 8 Fridolin Somers 2022-03-02 08:48:38 UTC
Pushed to master for 22.05, thanks to everybody involved 🦄
Comment 9 Kyle M Hall 2022-03-04 13:12:43 UTC
Pushed to 21.11.x for 21.11.04
Comment 10 Andrew Fuerste-Henry 2022-03-20 15:02:49 UTC
Pushed to 21.05.x for 21.05.13
Comment 11 Victor Grousset/tuxayo 2022-03-21 00:15:24 UTC
Not backported to oldoldstable (20.11.x). Feel free to ask if it's needed.
Comment 12 Nick Clemens 2022-08-16 12:00:53 UTC
*** Bug 22329 has been marked as a duplicate of this bug. ***