X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fsearch%2Freport_prepaid_income.cgi;h=2fe5b6f10f44108099b0b296cbc2919ec368c800;hb=8585b98f48712b459ac15619b452c682cfcceac1;hp=27dbcbf9f86acb88673681db4ac5ca5491fdd7a1;hpb=4ad29235ceb48ec0c5a0af07e6ccfcb64b40f466;p=freeside.git
diff --git a/httemplate/search/report_prepaid_income.cgi b/httemplate/search/report_prepaid_income.cgi
index 27dbcbf9f..2fe5b6f10 100644
--- a/httemplate/search/report_prepaid_income.cgi
+++ b/httemplate/search/report_prepaid_income.cgi
@@ -1,87 +1,231 @@
<% include("/elements/header.html", 'Prepaid Income (Unearned Revenue) Report') %>
-<% table() %>
-
- Actual Unearned Revenue |
- Legacy Unearned Revenue |
-
+<% include( '/elements/table-grid.html' ) %>
+
- $<% $total %>
- |
- <% $now == $time ? "\$$total_legacy" : 'N/A'%>
- |
+% if ( scalar(@agentnums) > 1 ) {
+ Agent |
+% }
+ <% $actual_label %>Unearned Revenue |
+% if ( $legacy ) {
+ Legacy Unearned Revenue |
+% }
+% my $bgcolor1 = '#eeeeee';
+% my $bgcolor2 = '#ffffff';
+% my $bgcolor;
+%
+% push @agentnums, 0 unless scalar(@agentnums) < 2;
+% foreach my $agentnum (@agentnums) {
+%
+% if ( $bgcolor eq $bgcolor1 ) {
+% $bgcolor = $bgcolor2;
+% } else {
+% $bgcolor = $bgcolor1;
+% }
+%
+% my $alink = $agentnum ? "$link;agentnum=$agentnum" : $link;
+%
+% my $agent_name = 'Total';
+% if ( $agentnum ) {
+% my $agent = qsearchs('agent', { 'agentnum' => $agentnum })
+% or die "unknown agentnum $agentnum";
+% $agent_name = $agent->agent;
+% }
+
+
+
+% if ( scalar(@agentnums) > 1 ) {
+ <% $agent_name |h %> |
+% }
+
+ <% $money_char %><% $total{$agentnum} %> |
+
+% if ( $legacy ) {
+
+ <% $now == $time ? $money_char.$total_legacy{$agentnum} : 'N/A'%>
+ |
+% }
+
+
+
+% }
+
+
-Actual unearned revenue is the amount of unearned revenue Freeside has
-actually invoiced for packages with longer-than monthly terms.
-
-Legacy unearned revenue is the amount of unearned revenue represented by
-customer packages. This number may be larger than actual unearned
-revenue if you have imported longer-than monthly customer packages from
-a previous billing system.
-