]> git.koha-community.org Git - koha.git/commit
Bug 23767: Total children only if parents not visible
authorNick Clemens <nick@bywatersolutions.com>
Wed, 3 Feb 2021 14:48:37 +0000 (14:48 +0000)
committerAndrew Fuerste-Henry <andrew@bywatersolutions.com>
Mon, 22 Feb 2021 22:45:49 +0000 (22:45 +0000)
commit1788a9b9114b1592f2c92b7d760a8b31c6a69529
tree7979cee0020540e2a44e8c3c8c9b8b5be1810fb0
parent3cf367f50f022a6979ff57a721056d5d7a80fff2
Bug 23767: Total children only if parents not visible

This patch changes the way to calculate the footer. It adds the budget and parent ids to the cell
as custom data elements. When totaling we grab a list of all the rows we are showing - if a
row has a parent and the parent is showing then we skip adding its value to the total.

As the function is used on both acqui-home and aqbudgets I adjusted both templates

To test:
1 - Follow the test plan on previous patch
2 - Try filtering the table so you see only the child funds
3 - Confirm the totals show the child alone when it is visible
4 - Confirm the child total is excluded when the parent is visible

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 1f3152d453c8b5f2a366b916b50d3265d3ef135b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit fe191f17b8fa142e4430dfe05833b846658f148d)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
koha-tmpl/intranet-tmpl/prog/en/modules/acqui/acqui-home.tt
koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgets.tt
koha-tmpl/intranet-tmpl/prog/js/datatables.js