From 2ee33de5ef8ffe66a1871d06a22eace33b455bba Mon Sep 17 00:00:00 2001 From: sushi Date: Wed, 7 Jun 2006 02:45:26 +0000 Subject: [PATCH] Merging Katipo changes. Got acqui homepage actually displaying suggestions - only displayed count before - need to get the suggestedby diplaying borrowers name rather than id number. Showing budget breakdowns. Slight alteration - let $status be an input parameter. --- acqui/acqui-home.pl | 32 ++++++++++++++++++++------------ 1 file changed, 20 insertions(+), 12 deletions(-) diff --git a/acqui/acqui-home.pl b/acqui/acqui-home.pl index ae36ad5cd3..948362b0ea 100755 --- a/acqui/acqui-home.pl +++ b/acqui/acqui-home.pl @@ -46,11 +46,15 @@ for ( my $i = 0 ; $i < $count ; $i++ ) { $toggle = 0; } my ( $spent, $comtd ) = bookfundbreakdown( $results[$i]->{'bookfundid'} ); + my $avail = $results[$i]->{'budgetamount'} - ( $spent + $comtd ); my %line; - $line{bookfundname} = $results[$i]->{'bookfundname'}; $line{budgetamount} = $results[$i]->{'budgetamount'}; + $line{bookfundid} = $results[$i]->{'bookfundid'}; + $line{sdate} = $results[$i]->{'startdate'}; + $line{edate} = $results[$i]->{'enddate'}; + $line{aqbudgetid} = $results[$i]->{'aqbudgetid'}; $line{spent} = sprintf( "%.2f", $spent ); $line{comtd} = sprintf( "%.2f", $comtd ); $line{avail} = sprintf( "%.2f", $avail ); @@ -74,18 +78,22 @@ for ( my $i = 0 ; $i < $count ; $i++ ) { } # suggestions ? -my $suggestion = countsuggestion("ASKED"); +my $status = $query->param('status') || "ASKED"; +my $suggestion = countsuggestion($status); +my $suggestions_loop = &searchsuggestion( '', '', '', '', $status, '' ); + $template->param( - classlist => $classlist, - type => 'intranet', - loop_budget => \@loop_budget, - loop_currency => \@loop_currency, - total => sprintf( "%.2f", $total ), - suggestion => $suggestion, - totspent => sprintf( "%.2f", $totspent ), - totcomtd => sprintf( "%.2f", $totcomtd ), - totavail => sprintf( "%.2f", $totavail ), - nobudget => $#results == -1 ? 1 : 0 + classlist => $classlist, + type => 'intranet', + loop_budget => \@loop_budget, + loop_currency => \@loop_currency, + total => sprintf( "%.2f", $total ), + suggestion => $suggestion, + suggestions_loop => $suggestions_loop, + totspent => sprintf( "%.2f", $totspent ), + totcomtd => sprintf( "%.2f", $totcomtd ), + totavail => sprintf( "%.2f", $totavail ), + nobudget => $#results == -1 ? 1 : 0 ); output_html_with_http_headers $query, $cookie, $template->output; -- 2.39.2