Bugzilla – Attachment 64659 Details for
Bug 16126
Display base-level amounts on the acquisition module home page
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 16126 - Display base-level amounts on the acquisition module home page
Bug-16126---Display-base-level-amounts-on-the-acqu.patch (text/plain), 5.59 KB, created by
Tomás Cohen Arazi
on 2017-06-26 17:34:27 UTC
(
hide
)
Description:
Bug 16126 - Display base-level amounts on the acquisition module home page
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi
Created:
2017-06-26 17:34:27 UTC
Size:
5.59 KB
patch
obsolete
>From 6f4c77c5f553f88f701e3a083603455baf47413a Mon Sep 17 00:00:00 2001 >From: Blou <philippe.blouin@inlibro.com> >Date: Wed, 19 Aug 2015 17:03:57 -0400 >Subject: [PATCH] Bug 16126 - Display base-level amounts on the acquisition > module home page >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >This patch will display on the acquisition module home page the information already displayed on the "manage fund" page (aqbudgets.pl). > >Currently, Koha display the base-level amounts only. > >This patch will : > >1. rename the column "ordered", "spent" and "available" to "base-level [ordered|spent|available]" > >2. add the column "ordered", "spent" and available with the same calculation from the "manage fund" page. > >TEST PLAN : > >1. Go to the Administration module >2. Add a new budget (ie : Budget 2016) >3. Add a fund to this budget (ie : Book) >4. Add a child fund (ie : Adult fiction) > >You will have this hierarchy : > >Budget 2016 > |____ Book > |_____ Adult fiction > >5. Go to the Acquisition module >6. Place an order and use the "Adult fiction" budget >7. Go back the Acquisition home page and compare the table with the table from the aqbudgets.pl page (Administration > Budget > Fund) >8. You will see : > >BEFORE PATCH : >the base level amounts only > >AFTER PATCH : >the base level and the total amounts > >Followed test plan, works as expected. >Signed-off-by: Marc Véron <veron@veron.ch> >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >I tested the functionality and it works as expected. It also passes the QA script. >It basically adds 'base-level' information to the acquisitions page. The only difference >with what is displayed on the funds page is that it doesn't add the base-level available >amounts. So the table is more compact and easy to follow. > >I think this is a useful enhancement even if it makes this table closer to the funds one. >I checked it totalizes correctly on each scenario and respects the acq workflow exactly as >the funds table. >--- > acqui/acqui-home.pl | 4 +++- > .../intranet-tmpl/prog/en/modules/acqui/acqui-home.tt | 16 +++++++++++++--- > 2 files changed, 16 insertions(+), 4 deletions(-) > >diff --git a/acqui/acqui-home.pl b/acqui/acqui-home.pl >index fe53174..2c60ee2 100755 >--- a/acqui/acqui-home.pl >+++ b/acqui/acqui-home.pl >@@ -83,6 +83,8 @@ foreach my $budget ( @{$budget_arr} ) { > > $budget->{'budget_ordered'} = GetBudgetOrdered( $budget->{'budget_id'} ); > $budget->{'budget_spent'} = GetBudgetSpent( $budget->{'budget_id'} ); >+ $budget->{'total_spent'} = GetBudgetHierarchySpent( $budget->{'budget_id'} ) // 0; >+ $budget->{'total_ordered'} = GetBudgetHierarchyOrdered( $budget->{'budget_id'} ) // 0; > if ( !defined $budget->{budget_spent} ) { > $budget->{budget_spent} = 0; > } >@@ -90,7 +92,7 @@ foreach my $budget ( @{$budget_arr} ) { > $budget->{budget_ordered} = 0; > } > $budget->{'budget_avail'} = >- $budget->{'budget_amount'} - ( $budget->{'budget_spent'} + $budget->{'budget_ordered'} ); >+ $budget->{'budget_amount'} - ( $budget->{'total_spent'} + $budget->{'total_ordered'} ); > > $total += $budget->{'budget_amount'}; > $totspent += $budget->{'budget_spent'}; >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 f64a60b..243ceff 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 >@@ -44,7 +44,7 @@ $(document).ready(function() { > }, > "footerCallback": function ( row, data, start, end, display ) { > var api = this.api(), data; >- footer_column_sum( api, [ 6, 7, 8, 9 ] ); >+ footer_column_sum( api, [ 6, 11 ] ); > }, > "aoColumnDefs": [ > { "bVisible": false, "aTargets": [ 0, 1 ] }, >@@ -157,8 +157,10 @@ $(document).ready(function() { > <th>Owner</th> > <th>Library</th> > <th>Amount</th> >- <th>Ordered</th> >- <th>Spent</th> >+ <th>Base-level ordered</th> >+ <th>Total ordered</th> >+ <th>Base-level spent</th> >+ <th>Total spent</th> > <th>Total available</th> > </tr> > </thead> >@@ -169,7 +171,9 @@ $(document).ready(function() { > <th colspan="4">Total</th> > <th class="data"></th> > <th class="data"></th> >+ <th class="data">[% totordered_active | $Price %]</th> > <th class="data"></th> >+ <th class="data">[% totspent_active | $Price %]</th> > <th class="data"></th> > </tr> > </tfoot> >@@ -215,6 +219,9 @@ $(document).ready(function() { > </a> > </td> > <td class="data"> >+ <span class="total_amount">[% loop_budge.total_ordered | $Price %]</span> >+ </td> >+ <td class="data"> > <a href="spent.pl?fund=[% loop_budge.budget_id %]&fund_code=[% loop_budge.budget_code %]"> > [% IF loop_budge.budget_parent_id %] > [% loop_budge.budget_spent | $Price %] >@@ -224,6 +231,9 @@ $(document).ready(function() { > </a> > </td> > <td class="data"> >+ <span class="total_amount">[% loop_budge.total_spent | $Price %]</span> >+ </td> >+ <td class="data"> > [% IF loop_budge.budget_parent_id %] > [% loop_budge.budget_avail | $Price %] > [% ELSE %] >-- >2.7.4
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 16126
:
50438
|
51931
|
55810
|
55811
|
64659
|
84094
|
93747
|
98622