From 913db4256ddb1ae93a2a246614430f711d253650 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Fri, 8 Jul 2011 10:43:14 +0200 Subject: [PATCH] [PATCH] Bug 6080: total is wrong in acqui-home.pl In Acqui-home, with hierarchic bugdets, it's a non sense to do total & sub-totals: we're adding budgets more than once. For example : Books 1000 fictions books 500 NF books 500 result in a total of 2000 ! This patch removes the total BibLibre MT5446 --- acqui/acqui-home.pl | 16 ---------------- .../prog/en/modules/acqui/acqui-home.tt | 11 ----------- 2 files changed, 0 insertions(+), 27 deletions(-) diff --git a/acqui/acqui-home.pl b/acqui/acqui-home.pl index 0d9c207..74d504e 100755 --- a/acqui/acqui-home.pl +++ b/acqui/acqui-home.pl @@ -82,12 +82,6 @@ my $budget_arr = GetBudgetHierarchy( '', $user->{branchcode}, $template->{param_map}->{'USER_INFO'}[0]->{'borrowernumber'} ); -my $total = 0; -my $totspent = 0; -my $totordered = 0; -my $totcomtd = 0; -my $totavail = 0; - my $total_active = 0; my $totspent_active = 0; my $totordered_active = 0; @@ -121,11 +115,6 @@ foreach my $budget ( @{$budget_arr} ) { $budget->{'budget_avail'} = $budget->{'budget_amount'} - ( $budget->{'budget_spent'} + $budget->{'budget_ordered'} ); - $total += $budget->{'budget_amount'}; - $totspent += $budget->{'budget_spent'}; - $totordered += $budget->{'budget_ordered'}; - $totavail += $budget->{'budget_avail'}; - if ($budget->{budget_period_active}){ $total_active += $budget->{'budget_amount'}; $totspent_active += $budget->{'budget_spent'}; @@ -142,11 +131,6 @@ $template->param( type => 'intranet', loop_budget => $budget_arr, branchname => $branchname, - total => $num_formatter->format_price($total), - totspent => $num_formatter->format_price($totspent), - totordered => $num_formatter->format_price($totordered), - totcomtd => $num_formatter->format_price($totcomtd), - totavail => $num_formatter->format_price($totavail), total_active => $num_formatter->format_price($total_active), totspent_active => $num_formatter->format_price($totspent_active), totordered_active => $num_formatter->format_price($totordered_active), 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 a274365..87343bf 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 @@ -99,17 +99,6 @@ $(document).ready(function() { Avail - - - Total -   -   - [% total_active %] - [% totordered_active %] - [% totspent_active %] - [% totavail_active %] - - [% FOREACH loop_budge IN loop_budget %] [% IF ( loop_budge.budget_period_active ) %] -- 1.7.1