Bugzilla – Attachment 139829 Details for
Bug 31367
Display of sub-funds does not include totals of sub-sub-funds on acquisitions home page
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 31367: Add subtotals if budget has children
Bug-31367-Add-subtotals-if-budget-has-children.patch (text/plain), 3.25 KB, created by
Nick Clemens
on 2022-08-26 13:37:52 UTC
(
hide
)
Description:
Bug 31367: Add subtotals if budget has children
Filename:
MIME Type:
Creator:
Nick Clemens
Created:
2022-08-26 13:37:52 UTC
Size:
3.25 KB
patch
obsolete
>From 004c665e3c969905b96a10b189572a9c583e80a1 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Fri, 26 Aug 2022 13:32:50 +0000 >Subject: [PATCH] Bug 31367: Add subtotals if budget has children > >On bug 29287 we added child funds if a fund had no parent id > >It turns out funds can have a parent, and still have children (sub-sub-funds) > >This patch simply checks for children, rather than checking for lack of parent. > >Totals are already calculated correctly in GetBudgetHierarchy > >To test: >1 - Add a fund "Fund" to a budget - assign 1000 dollars >2 - Add a sub-fund "SubFund" - assign 100 dollars >3 - Add a sub-sub-fund "SubSubFund" - assign 10 dollars >4 - Add to a basket $5 order from SubSubFund >5 - Add to a basket $50 order from SubFund >6 - Add to a basket $500 order form Fun >7 - View acqui home - note 'SubFund' does not include total from 'SubSubFund' >8 - Apply patch >9 - Confirm all sub-sub-funds totaled in sub-funds and that fund total correctly adds sub and sub-sub funds >--- > koha-tmpl/intranet-tmpl/prog/en/modules/acqui/acqui-home.tt | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/acqui-home.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/acqui-home.tt >index 94d28d5f17..a4e480e895 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/acqui-home.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/acqui-home.tt >@@ -160,7 +160,7 @@ > </td> > <td class="data"> > <a href="ordered.pl?fund=[% loop_budge.budget_id | uri %]&fund_code=[% loop_budge.budget_code | uri %]"> >- [% IF !loop_budge.budget_parent_id %] >+ [% IF loop_budge.children.size %] > <a title="Ordered from this fund" href="ordered.pl?fund=[% loop_budge.budget_id | uri %]&fund_code=[% loop_budge.budget_code | uri %]"> > (<span class="total_amount">[% loop_budge.budget_ordered | $Price %]</span>) > </a> >@@ -172,7 +172,7 @@ > [% END %] > </td> > <td class="data"> >- [% IF !loop_budge.budget_parent_id %] >+ [% IF loop_budge.children.size %] > <a title="Spent from this fund" href="spent.pl?fund=[% loop_budge.budget_id | uri %]&fund_code=[% loop_budge.budget_code | uri %]"> > (<span class="total_amount">[% loop_budge.budget_spent | $Price %]</span>) > </a> >@@ -184,7 +184,7 @@ > [% END %] > </td> > <td class="data"> >- [% IF !loop_budge.budget_parent_id %] >+ [% IF loop_budge.children.size %] > (<span title="Remaining in this fund" class="parent_amount" data-parent_id="[% loop_budge.budget_parent_id | html %]" data-self_id="[% loop_budge.budget_id | html %]">[% loop_budge.budget_avail | $Price %]</span>) > <span title="Remaining with child funds included" class="total_amount" data-parent_id="[% loop_budge.budget_parent_id | html %]" data-self_id="[% loop_budge.budget_id | html %]">[% loop_budge.total_avail | $Price %]</span> > [% ELSE %] >-- >2.30.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 31367
:
139829
|
139850
|
140480