MT3168 : Suggestion budget management
budget were not saved and not correctly displayed Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com> Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
This commit is contained in:
parent
b214eace34
commit
c841eb0e0c
|
|
@ -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 -->
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue