@@ -, +, @@ module home page |____ Book |_____ Adult fiction --- acqui/acqui-home.pl | 4 +++- .../intranet-tmpl/prog/en/modules/acqui/acqui-home.tt | 16 +++++++++++++--- 2 files changed, 16 insertions(+), 4 deletions(-) --- a/acqui/acqui-home.pl +++ a/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'}; --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/acqui-home.tt +++ a/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() { Owner Library Amount - Ordered - Spent + Base-level ordered + Total ordered + Base-level spent + Total spent Total available @@ -168,7 +170,9 @@ $(document).ready(function() { Total + [% totordered_active | $Price %] + [% totspent_active | $Price %] @@ -214,6 +218,9 @@ $(document).ready(function() { + [% loop_budge.total_ordered | $Price %] + + [% IF loop_budge.budget_parent_id %] [% loop_budge.budget_spent | $Price %] @@ -223,6 +230,9 @@ $(document).ready(function() { + [% loop_budge.total_spent | $Price %] + + [% IF loop_budge.budget_parent_id %] [% loop_budge.budget_avail | $Price %] [% ELSE %] --