Bugzilla – Attachment 3745 Details for
Bug 6089
Remove budget total on acqui-home
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
proposed patch
0001-BZ6089-acqui-home-budget-total-is-wrong.patch (text/plain), 3.11 KB, created by
Paul Poulain
on 2011-04-06 13:50:38 UTC
(
hide
)
Description:
proposed patch
Filename:
MIME Type:
Creator:
Paul Poulain
Created:
2011-04-06 13:50:38 UTC
Size:
3.11 KB
patch
obsolete
>From 2caef83668535f3ff69c988d98d58813f240dcc5 Mon Sep 17 00:00:00 2001 >From: Paul Poulain <paul.poulain@biblibre.com> >Date: Wed, 6 Apr 2011 15:49:51 +0200 >Subject: [PATCH] BZ6089: acqui-home budget total is wrong > >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 >--- > 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 @@ > <th>Avail</th> > </tr> > </thead> >- <tfoot> >- <tr> >- <th>Total</th> >- <th> </th> >- <th> </th> >- <th align="right" ><!-- TMPL_VAR name="total" --></th> >- <th align="right" ><!-- TMPL_VAR name="totordered" --></th> >- <th align="right" ><!-- TMPL_VAR name="totspent" --></th> >- <th align="right" ><!-- TMPL_VAR name="totavail" --></th> >- </tr> >- </tfoot> > <tbody> > <!-- TMPL_LOOP name="loop_budget" --> > <!--TMPL_IF NAME="__odd__" --> >-- >1.7.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 6089
: 3745 |
6090