Bugzilla – Attachment 50438 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), 4.86 KB, created by
Rémi Mayrand-Provencher
on 2016-04-19 19:11:03 UTC
(
hide
)
Description:
Bug 16126 - Display base-level amounts on the acquisition module home page
Filename:
MIME Type:
Creator:
Rémi Mayrand-Provencher
Created:
2016-04-19 19:11:03 UTC
Size:
4.86 KB
patch
obsolete
>From 9dac8e9a3fdb7346efed576a52e5db3da238fca4 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 > >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 >--- > 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 804e3ce..b323bce 100755 >--- a/acqui/acqui-home.pl >+++ b/acqui/acqui-home.pl >@@ -90,6 +90,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; > } >@@ -97,7 +99,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 112a4ab..7b4322d 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 >@@ -43,7 +43,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 ] }, >@@ -156,8 +156,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> >@@ -168,7 +170,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> >@@ -214,6 +218,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 %] >@@ -223,6 +230,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 %] >-- >1.9.1
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