Bugzilla – Attachment 9167 Details for
Bug 7308
new column in admin/aqbudgets
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Show ordered amount in aqbudgets.pl
0001-Bug-7308-Show-ordered-amount-in-aqbudgets.pl.patch (text/plain), 4.68 KB, created by
Julian Maurice
on 2012-04-13 08:45:40 UTC
(
hide
)
Description:
Show ordered amount in aqbudgets.pl
Filename:
MIME Type:
Creator:
Julian Maurice
Created:
2012-04-13 08:45:40 UTC
Size:
4.68 KB
patch
obsolete
>From 3fb07a9d3c19f2f6a0855ee6f5ed2a5de9b28490 Mon Sep 17 00:00:00 2001 >From: Julian Maurice <julian.maurice@biblibre.com> >Date: Fri, 13 Apr 2012 10:40:35 +0200 >Subject: [PATCH] Bug 7308: Show ordered amount in aqbudgets.pl > >--- > C4/Budgets.pm | 1 + > admin/aqbudgets.pl | 7 +++++-- > .../prog/en/modules/admin/aqbudgets.tt | 3 +++ > 3 files changed, 9 insertions(+), 2 deletions(-) > >diff --git a/C4/Budgets.pm b/C4/Budgets.pm >index 7c867e0..023f259 100644 >--- a/C4/Budgets.pm >+++ b/C4/Budgets.pm >@@ -549,6 +549,7 @@ sub GetBudgetHierarchy { > $r->{'budget_name_indent'} = $moo; > > $r->{'budget_spent'} = GetBudgetSpent( $r->{'budget_id'} ); >+ $r->{budget_ordered} = GetBudgetOrdered( $r->{budget_id} ); > > $r->{'budget_amount_total'} = $r->{'budget_amount'}; > >diff --git a/admin/aqbudgets.pl b/admin/aqbudgets.pl >index db99759..7055c20 100755 >--- a/admin/aqbudgets.pl >+++ b/admin/aqbudgets.pl >@@ -235,7 +235,7 @@ if ($op eq 'add_form') { > my $toggle = 0; > my @loop; > my $period_total = 0; >- my ( $period_alloc_total, $base_spent_total ); >+ my ( $period_alloc_total, $base_spent_total, $base_ordered_total ); > > #This Looks WEIRD to me : should budgets be filtered in such a way ppl who donot own it would not see the amount spent on the budget by others ? > >@@ -283,6 +283,7 @@ if ($op eq 'add_form') { > # adds to total - only if budget is a 'top-level' budget > $period_alloc_total += $budget->{'budget_amount_total'} if $budget->{'depth'} == 0; > $base_spent_total += $budget->{'budget_spent'}; >+ $base_ordered_total += $budget->{budget_ordered}; > $budget->{'budget_remaining'} = $budget->{'budget_amount'} - $budget->{'total_levels_spent'}; > > # if amount == 0 dont display... >@@ -290,12 +291,13 @@ if ($op eq 'add_form') { > > $budget->{'remaining_pos'} = 1 if $budget->{'budget_remaining'} > 0; > $budget->{'remaining_neg'} = 1 if $budget->{'budget_remaining'} < 0; >- for (grep {/total_levels_spent|budget_spent|budget_amount|budget_remaining|budget_unalloc/} keys %$budget){ >+ for (grep {/total_levels_spent|budget_spent|budget_ordered|budget_amount|budget_remaining|budget_unalloc/} keys %$budget){ > $budget->{$_} = $num->format_price( $budget->{$_} ) if defined($budget->{$_}) > } > > # Value of budget_spent equals 0 instead of undefined value > $budget->{"budget_spent"} = $num->format_price(0) unless defined($budget->{"budget_spent"}); >+ $budget->{budget_ordered} = $num->format_price(0) unless defined($budget->{"budget_ordered"}); > > my $borrower = &GetMember( borrowernumber=>$budget->{budget_owner_id} ); > $budget->{"budget_owner_name"} = $borrower->{'firstname'} . ' ' . $borrower->{'surname'}; >@@ -331,6 +333,7 @@ if ($op eq 'add_form') { > budget_period_total => $budget_period_total, > period_alloc_total => $num->format_price($period_alloc_total), > base_spent_total => $num->format_price($base_spent_total), >+ base_ordered_total => $num->format_price($base_ordered_total), > branchloop => \@branchloop2, > ); > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgets.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgets.tt >index bf778c7..c746d5a 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgets.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgets.tt >@@ -168,6 +168,7 @@ > <th>Fund name</th> > <th>Total<br />allocated</th> > <th>Base-level<br />allocated</th> >+ <th>Base-level<br />ordered</th> > <th>Base-level<br />spent</th> > <th>Total sublevels<br />spent</th> > <th>Base-level<br />remaining</th> >@@ -180,6 +181,7 @@ > <th colspan="2" style="text-align: left;" nowrap="nowrap">Period allocated [% IF ( budget_period_total ) %][% budget_period_total %][% END %] </th> > <th nowrap="nowrap" class="data"> [% period_alloc_total %]</th> > <th nowrap="nowrap" class="data"> [% base_alloc_total %]</th> >+ <th class="data">[% base_ordered_total %]</th> > <th class="data">[% base_spent_total %]</th> > <th class="data">[% base_spent_total %]</th> > <th class="data">[% base_remaining_total %]</th> >@@ -200,6 +202,7 @@ > <td>[% budge.budget_name %]</td> > <td class="data">[% budge.budget_amount_total %]</td> > <td class="data">[% budge.budget_amount %] </td> >+ <td class="data">[% budge.budget_ordered %]</td> > <td class="data">[% budge.budget_spent %] </td> > <td class="data">[% budge.total_levels_spent %]</td> > [% IF ( budge.remaining_pos ) %] >-- >1.7.9.5 >
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 7308
:
9167
|
12769
|
16011
|
16012
|
16381
|
16394
|
16395
|
19824
|
19825
|
19826
|
19859
|
22462
|
24936
|
24937