diff options
author | ivan <ivan> | 2004-01-23 11:20:46 +0000 |
---|---|---|
committer | ivan <ivan> | 2004-01-23 11:20:46 +0000 |
commit | fbc51d2d8257bdeba5e5a7e538a311b7f159f746 (patch) | |
tree | deb5f137ec70c43381022db344ecf6bdb89ca89d | |
parent | 43da0b74fd66d202127f27f9813fb24b877ba07d (diff) |
add prepaid income to main menu and allow arbitrary dates
-rw-r--r-- | httemplate/index.html | 1 | ||||
-rw-r--r-- | httemplate/search/report_prepaid_income.cgi | 9 |
2 files changed, 7 insertions, 3 deletions
diff --git a/httemplate/index.html b/httemplate/index.html index 35a423bcf..d101bc228 100644 --- a/httemplate/index.html +++ b/httemplate/index.html @@ -70,6 +70,7 @@ </UL> <A HREF="search/report_cust_pay.html">Payment report (by type and/or date range)</A> <BR><BR><A HREF="search/report_receivables.cgi">Accounts Receivable Aging Summary</A> + <BR><BR><A HREF="search/report_prepaid_income.html">Prepaid Income (Unearned Revenue) Report</A> <BR><BR>(old) Financial reports (being rewritten) <UL> <LI> <A HREF="search/report_tax.html">tax reports</A> 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> |