summaryrefslogtreecommitdiff
path: root/httemplate/search
diff options
context:
space:
mode:
authorivan <ivan>2004-01-23 11:20:46 +0000
committerivan <ivan>2004-01-23 11:20:46 +0000
commitfbc51d2d8257bdeba5e5a7e538a311b7f159f746 (patch)
treedeb5f137ec70c43381022db344ecf6bdb89ca89d /httemplate/search
parent43da0b74fd66d202127f27f9813fb24b877ba07d (diff)
add prepaid income to main menu and allow arbitrary dates
Diffstat (limited to 'httemplate/search')
-rw-r--r--httemplate/search/report_prepaid_income.cgi9
1 files changed, 6 insertions, 3 deletions
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"};
- %> <TR><TD><%= $mon[$mon-1]. ' '. $year %></TD>
+ %> <TR><TD ALIGN="right"><%= $mon[$mon-1]. ' '. $year %></TD>
<TD ALIGN="right">
<%= sprintf("%.2f", $prepaid{"$year-$mon"} ) %>
</TD>