X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Fsearch%2Freport_prepaid_income.cgi;h=eb8bbb55eb903d2df14624311dea752c46fcf1f6;hp=9f045738a33da51feae64a76aa5b9cf20d4ea3cb;hb=ff15db0f2fa18e67498d0097797b667a81b51f71;hpb=c9544281f45155587a54aa435500887d74e5c9f5 diff --git a/httemplate/search/report_prepaid_income.cgi b/httemplate/search/report_prepaid_income.cgi index 9f045738a..eb8bbb55e 100644 --- a/httemplate/search/report_prepaid_income.cgi +++ b/httemplate/search/report_prepaid_income.cgi @@ -5,7 +5,9 @@ #needs to be re-written in sql for efficiency - my $now = time; + my $now = $cgi->param('date') && str2time($cgi->param('date')) || time; + $now =~ /^(\d+)$/ or die "unparsable date?"; + $now = $1; my %prepaid; @@ -39,7 +41,8 @@ %> -<%= header('Prepaid Income Report', menubar( 'Main Menu'=>$p, ) ) %> +<%= header( 'Prepaid Income (Unearned Revenue) Report', + menubar( 'Main Menu'=>$p, ) ) %> <%= table() %> <% @@ -54,7 +57,7 @@ for my $mon ( ( $subseq++ ? 1 : $now_mon ) .. 12 ) { if ( $prepaid{"$year-$mon"} ) { $total += $prepaid{"$year-$mon"}; - %> <%= $mon[$mon-1]. ' '. $year %> + %> <%= $mon[$mon-1]. ' '. $year %> <%= sprintf("%.2f", $prepaid{"$year-$mon"} ) %>