From: ivan Date: Fri, 21 Nov 2003 15:20:05 +0000 (+0000) Subject: show customer status on receivables report X-Git-Tag: freeside_1_5_0pre4^2~140 X-Git-Url: http://git.freeside.biz/gitweb/?a=commitdiff_plain;h=8ded47043e6d1f002a57c392fa95f481e697ab45;p=freeside.git show customer status on receivables report --- diff --git a/httemplate/search/report_receivables.cgi b/httemplate/search/report_receivables.cgi index 587108e33..108453d43 100755 --- a/httemplate/search/report_receivables.cgi +++ b/httemplate/search/report_receivables.cgi @@ -58,11 +58,33 @@ END ) ,0 ) as owed_total +END + + my $recurring = < Customer + Status 0-30 30-60 60-90 90+ Total -<% while ( my $row = $sth->fetchrow_hashref() ) { %> +<% while ( my $row = $sth->fetchrow_hashref() ) { + my $status = 'Cancelled'; + my $statuscol = 'FF0000'; + if ( $row->{uncancelled_pkgs} ) { + $status = 'Suspended'; + $statuscol = 'FF9900'; + if ( $row->{active_pkgs} > $row->{uncancelled_pkgs} ) { + $status = 'Active'; + $statuscol = '00CC00'; + } + } +%> <%= $row->{'company'} ? $row->{'company'}. ' (' : '' %><%= $row->{'last'}. ', '. $row->{'first'} %><%= $row->{'company'} ? ')' : '' %> + <%= $status %> $<%= sprintf("%.2f", $row->{'owed_0_30'} ) %> $<%= sprintf("%.2f", $row->{'owed_30_60'} ) %> $<%= sprintf("%.2f", $row->{'owed_60_90'} ) %> @@ -111,7 +146,7 @@ END   - Total + Total $<%= sprintf("%.2f", $row->{'owed_0_30'} ) %> $<%= sprintf("%.2f", $row->{'owed_30_60'} ) %> $<%= sprintf("%.2f", $row->{'owed_60_90'} ) %>