From 55de0fac57f2a71bd05aa5ce583601fb2edeacdf Mon Sep 17 00:00:00 2001 From: ivan Date: Fri, 23 Jan 2004 08:58:35 +0000 Subject: oops --- httemplate/search/report_prepaid_income.cgi | 1 + 1 file changed, 1 insertion(+) (limited to 'httemplate') diff --git a/httemplate/search/report_prepaid_income.cgi b/httemplate/search/report_prepaid_income.cgi index f1d284b1a..bcad93325 100644 --- a/httemplate/search/report_prepaid_income.cgi +++ b/httemplate/search/report_prepaid_income.cgi @@ -30,6 +30,7 @@ foreach my $which_month ( 2 .. $freq ) { until ( $mon < 13 ) { $mon -= 12; $year++; } $prepaid{"$year-$mon"} += $per_month; + $mon++; } } -- cgit v1.2.1 From c9544281f45155587a54aa435500887d74e5c9f5 Mon Sep 17 00:00:00 2001 From: ivan Date: Fri, 23 Jan 2004 09:04:00 +0000 Subject: tidy up look --- httemplate/search/report_prepaid_income.cgi | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'httemplate') diff --git a/httemplate/search/report_prepaid_income.cgi b/httemplate/search/report_prepaid_income.cgi index bcad93325..9f045738a 100644 --- a/httemplate/search/report_prepaid_income.cgi +++ b/httemplate/search/report_prepaid_income.cgi @@ -35,6 +35,8 @@ } + my @mon = qw(Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec); + %> <%= header('Prepaid Income Report', menubar( 'Main Menu'=>$p, ) ) %> @@ -52,8 +54,10 @@ for my $mon ( ( $subseq++ ? 1 : $now_mon ) .. 12 ) { if ( $prepaid{"$year-$mon"} ) { $total += $prepaid{"$year-$mon"}; - %> <%= "$year-$mon" %> - <%= sprintf("%.2f", $prepaid{"$year-$mon"} ) %> + %> <%= $mon[$mon-1]. ' '. $year %> + + <%= sprintf("%.2f", $prepaid{"$year-$mon"} ) %> + <% } @@ -62,7 +66,7 @@ } %> -Total<%= sprintf("%.2f", $total) %> +Total<%= sprintf("%.2f", $total) %> -- cgit v1.2.1 From ff15db0f2fa18e67498d0097797b667a81b51f71 Mon Sep 17 00:00:00 2001 From: ivan Date: Fri, 23 Jan 2004 11:20:43 +0000 Subject: add prepaid income to main menu and allow arbitrary dates --- httemplate/index.html | 1 + httemplate/search/report_prepaid_income.cgi | 9 ++++++--- httemplate/search/report_prepaid_income.html | 17 +++++++++++++++++ 3 files changed, 24 insertions(+), 3 deletions(-) create mode 100644 httemplate/search/report_prepaid_income.html (limited to 'httemplate') 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 @@ Payment report (by type and/or date range)

Accounts Receivable Aging Summary +

Prepaid Income (Unearned Revenue) Report

(old) Financial reports (being rewritten)
  • tax reports 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"} ) %> 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 @@ + + + Prepaid Income (Unearned Revenue) Report + + + + + + +

    Prepaid Income (Unearned Revenue) Report

    +
    + Prepaid income (unearned revenue) as of + + + + + -- cgit v1.2.1