summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--httemplate/index.html1
-rw-r--r--httemplate/search/report_prepaid_income.cgi9
-rw-r--r--httemplate/search/report_prepaid_income.html17
3 files changed, 24 insertions, 3 deletions
diff --git a/httemplate/index.html b/httemplate/index.html
index 548c25ceb..2d4f6b51c 100644
--- a/httemplate/index.html
+++ b/httemplate/index.html
@@ -69,6 +69,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>
diff --git a/httemplate/search/report_prepaid_income.html b/httemplate/search/report_prepaid_income.html
new file mode 100644
index 000000000..b85a481be
--- /dev/null
+++ b/httemplate/search/report_prepaid_income.html
@@ -0,0 +1,17 @@
+<HTML>
+ <HEAD>
+ <TITLE>Prepaid Income (Unearned Revenue) Report</TITLE>
+ <LINK REL="stylesheet" TYPE="text/css" HREF="../elements/calendar-win2k-2.css" TITLE="win2k-2">
+ <SCRIPT TYPE="text/javascript" SRC="../elements/calendar_stripped.js"></SCRIPT>
+ <SCRIPT TYPE="text/javascript" SRC="../elements/calendar-en.js"></SCRIPT>
+ <SCRIPT TYPE="text/javascript" SRC="../elements/calendar-setup.js"></SCRIPT>
+ </HEAD>
+ <BODY BGCOLOR="#e8e8e8">
+ <H1>Prepaid Income (Unearned Revenue) Report</H1>
+ <FORM ACTION="report_prepaid_income.cgi" METHOD="post">
+ Prepaid income (unearned revenue) as of <INPUT TYPE="text" NAME="date" VALUE="now">
+ <INPUT TYPE="submit" VALUE="Generate report">
+ </BODY>
+</HTML>
+ <TABLE>
+