From 8ded47043e6d1f002a57c392fa95f481e697ab45 Mon Sep 17 00:00:00 2001 From: ivan Date: Fri, 21 Nov 2003 15:20:05 +0000 Subject: [PATCH] show customer status on receivables report --- httemplate/search/report_receivables.cgi | 41 +++++++++++++++++++++++++++++--- 1 file changed, 38 insertions(+), 3 deletions(-) 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 @@ -60,9 +60,31 @@ END ) 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'} ) %> -- 2.11.0