From 8e397cdf92d2bff8f84ce934992e5ac1890f21cf Mon Sep 17 00:00:00 2001 From: Paul Poulain Date: Thu, 24 Mar 2011 14:39:40 +0100 Subject: [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.tmpl | 11 ----------- 2 files changed, 0 insertions(+), 27 deletions(-) diff --git a/acqui/acqui-home.pl b/acqui/acqui-home.pl index ed96a9e..b95e082 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; - foreach my $budget ( @{$budget_arr} ) { $budget->{budget_code_indent} =~ s/\ /\ \;/g; @@ -116,11 +110,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'}; - for my $field (qw( budget_amount budget_spent budget_ordered budget_avail ) ) { $budget->{$field} = $num_formatter->format_price( $budget->{$field} ); } @@ -130,11 +119,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), suggestions_count => $suggestions_count, ); diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/acqui-home.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/acqui-home.tmpl index 02f5f22..5e4bec4 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/acqui-home.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/acqui-home.tmpl @@ -78,17 +78,6 @@ Avail - - - Total -   -   - - - - - - -- 1.7.4.1