[Koha-patches] [PATCH 01/11] MT3168 : Suggestion budget management
Henri-Damien LAURENT
henridamien.laurent at biblibre.com
Fri Mar 26 11:25:31 CET 2010
budget were not saved and not correctly displayed
Signed-off-by: Henri-Damien LAURENT <henridamien.laurent at biblibre.com>
---
.../prog/en/modules/suggestion/suggestion.tmpl | 4 ++--
suggestion/suggestion.pl | 13 +++++++------
2 files changed, 9 insertions(+), 8 deletions(-)
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tmpl
index 5efdfb5..b0904a1 100755
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tmpl
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tmpl
@@ -198,7 +198,7 @@ h4.collapse a { font-size : 80%; text-decoration: none; } fieldset.brief ol { di
<th>Suggestion</th>
<th>Suggested by /on</th>
<th>Managed by /on</th>
- <th>For</th>
+ <th>Library</th>
<th>Budget</th>
<th>Status</th></tr>
</thead>
@@ -229,7 +229,7 @@ h4.collapse a { font-size : 80%; text-decoration: none; } fieldset.brief ol { di
<!-- TMPL_VAR name="branchcode" -->
</td>
<td>
- <!-- TMPL_VAR name="aqbudgetid" -->
+ <!-- TMPL_VAR name="budget_name" -->
</td>
<td>
<!-- TMPL_IF name="ASKED" -->Requested<!-- /TMPL_IF --> <!-- TMPL_IF name="ACCEPTED" -->Accepted<!-- /TMPL_IF --> <!-- TMPL_IF name="ORDERED" -->Ordered<!-- /TMPL_IF --> <!-- TMPL_IF name="REJECTED" -->Rejected<!-- /TMPL_IF --> <!-- TMPL_IF name="CHECKED" -->Checked<!-- /TMPL_IF --> <!-- TMPL_IF name="reason" --><br />(<!-- TMPL_VAR name="reason" -->)<!-- /TMPL_IF -->
diff --git a/suggestion/suggestion.pl b/suggestion/suggestion.pl
index 9811cc8..96b2869 100755
--- a/suggestion/suggestion.pl
+++ b/suggestion/suggestion.pl
@@ -166,12 +166,13 @@ if ($op=~/else/) {
# warn $$suggestion_ref{$displayby}."=$criteriumvalue; $displayby";
my $suggestions = &SearchSuggestion($suggestion_ref);
- foreach (@$suggestions){
+ foreach my $suggestion (@$suggestions){
+ $suggestion->{budget_name}=GetBudget($suggestion->{budgetid})->{budget_name};
foreach my $date qw(suggesteddate manageddate accepteddate){
- if ($_->{$date} ne "0000-00-00" && $_->{$date} ne "" ){
- $_->{$date}=format_date($_->{$date}) ;
+ if ($suggestion->{$date} ne "0000-00-00" && $suggestion->{$date} ne "" ){
+ $suggestion->{$date}=format_date($suggestion->{$date}) ;
} else {
- $_->{$date}="" ;
+ $suggestion->{$date}="" ;
}
}
}
@@ -257,8 +258,8 @@ $template->param(itemtypeloop=>$supportlist);
my $searchbudgets={ budget_branchcode=>$branchfilter} if $branchfilter;
my $budgets = GetBudgets($searchbudgets);
-foreach (@$budgets){
- $_->{'selected'}=1 if ($$suggestion_ref{'budget_id'} && $_{'budget_id'} eq $$suggestion_ref{'budget_id'})
+foreach my $budget (@$budgets){
+ $budget->{'selected'}=1 if ($$suggestion_ref{'budgetid'} && $budget->{'budget_id'} eq $$suggestion_ref{'budgetid'})
};
$template->param( budgetsloop => $budgets);
--
1.6.3.3
More information about the Koha-patches
mailing list